Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
73f34b31
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
73f34b31
编写于
6月 25, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix broken dominfo command when no security driver is implemented
上级
8ceac55c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
11 deletion
+30
-11
ChangeLog
ChangeLog
+10
-0
po/bn_IN.po
po/bn_IN.po
+1
-1
src/libvirt.c
src/libvirt.c
+8
-7
src/qemu_driver.c
src/qemu_driver.c
+3
-1
src/remote_internal.c
src/remote_internal.c
+4
-0
src/virsh.c
src/virsh.c
+4
-2
未找到文件。
ChangeLog
浏览文件 @
73f34b31
Thu Jun 25 10:32:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Fix broken dominfo command when no security driver is implemented
* src/libvirt.c: Clarify semantics of return value for
virDomainGetSecurityLabel and virNodeGetSecurityModel
* src/remote_internal.c src/qemu_driver.c: memset seclabel
to zero
* src/virsh.c: Check VIR_ERR_NO_SUPPORT when querying security
labels in dominfo command.
Wed Jun 24 19:40:43 CEST 2009 Daniel Veillard <veillard@redhat.com>
Wed Jun 24 19:40:43 CEST 2009 Daniel Veillard <veillard@redhat.com>
* po/*: update a lot of translations, and regenerate the po* files
* po/*: update a lot of translations, and regenerate the po* files
...
...
po/bn_IN.po
浏览文件 @
73f34b31
...
@@ -4042,7 +4042,7 @@ msgid "returned buffer is not same size as requested"
...
@@ -4042,7 +4042,7 @@ msgid "returned buffer is not same size as requested"
msgstr "প্রাপ্ত বাফারের মাপ অনুরোধ করা মাপের সমান নয়"
msgstr "প্রাপ্ত বাফারের মাপ অনুরোধ করা মাপের সমান নয়"
# comment from maintainer:
# comment from maintainer:
# Peek is the operation of reading something in that context.
# Peek is the operation of reading something in that context.
#: src/remote_internal.c:3225
#: src/remote_internal.c:3225
#, c-format
#, c-format
msgid "memory peek request too large for remote protocol, %zi > %d"
msgid "memory peek request too large for remote protocol, %zi > %d"
...
...
src/libvirt.c
浏览文件 @
73f34b31
...
@@ -4386,11 +4386,11 @@ error:
...
@@ -4386,11 +4386,11 @@ error:
* @domain: a domain object
* @domain: a domain object
* @seclabel: pointer to a virSecurityLabel structure
* @seclabel: pointer to a virSecurityLabel structure
*
*
* Extract security label of an active domain.
* Extract security label of an active domain. The 'label' field
* in the @seclabel argument will be initialized to the empty
* string if the domain is not running under a security model.
*
*
* Returns 0 in case of success, -1 in case of failure, and -2
* Returns 0 in case of success, -1 in case of failure
* if the operation is not supported (caller decides if that's
* an error).
*/
*/
int
int
virDomainGetSecurityLabel
(
virDomainPtr
domain
,
virSecurityLabelPtr
seclabel
)
virDomainGetSecurityLabel
(
virDomainPtr
domain
,
virSecurityLabelPtr
seclabel
)
...
@@ -4421,10 +4421,11 @@ virDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel)
...
@@ -4421,10 +4421,11 @@ virDomainGetSecurityLabel(virDomainPtr domain, virSecurityLabelPtr seclabel)
* @conn: a connection object
* @conn: a connection object
* @secmodel: pointer to a virSecurityModel structure
* @secmodel: pointer to a virSecurityModel structure
*
*
* Extract the security model of a hypervisor.
* Extract the security model of a hypervisor. The 'model' field
* in the @secmodel argument may be initialized to the empty
* string if the driver has not activated a security model.
*
*
* Returns 0 in case of success, -1 in case of failure, and -2 if the
* Returns 0 in case of success, -1 in case of failure
* operation is not supported (caller decides if that's an error).
*/
*/
int
int
virNodeGetSecurityModel
(
virConnectPtr
conn
,
virSecurityModelPtr
secmodel
)
virNodeGetSecurityModel
(
virConnectPtr
conn
,
virSecurityModelPtr
secmodel
)
...
...
src/qemu_driver.c
浏览文件 @
73f34b31
...
@@ -3070,6 +3070,8 @@ static int qemudDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr sec
...
@@ -3070,6 +3070,8 @@ static int qemudDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr sec
qemuDriverLock
(
driver
);
qemuDriverLock
(
driver
);
vm
=
virDomainFindByUUID
(
&
driver
->
domains
,
dom
->
uuid
);
vm
=
virDomainFindByUUID
(
&
driver
->
domains
,
dom
->
uuid
);
memset
(
seclabel
,
0
,
sizeof
(
*
seclabel
));
if
(
!
vm
)
{
if
(
!
vm
)
{
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
char
uuidstr
[
VIR_UUID_STRING_BUFLEN
];
virUUIDFormat
(
dom
->
uuid
,
uuidstr
);
virUUIDFormat
(
dom
->
uuid
,
uuidstr
);
...
@@ -3127,7 +3129,7 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn,
...
@@ -3127,7 +3129,7 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn,
qemuDriverLock
(
driver
);
qemuDriverLock
(
driver
);
if
(
!
driver
->
securityDriver
)
{
if
(
!
driver
->
securityDriver
)
{
ret
=
-
2
;
memset
(
secmodel
,
0
,
sizeof
(
*
secmodel
))
;
goto
cleanup
;
goto
cleanup
;
}
}
...
...
src/remote_internal.c
浏览文件 @
73f34b31
...
@@ -2323,6 +2323,8 @@ remoteDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel)
...
@@ -2323,6 +2323,8 @@ remoteDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel)
make_nonnull_domain
(
&
args
.
dom
,
domain
);
make_nonnull_domain
(
&
args
.
dom
,
domain
);
memset
(
&
ret
,
0
,
sizeof
ret
);
memset
(
&
ret
,
0
,
sizeof
ret
);
memset
(
seclabel
,
0
,
sizeof
(
*
seclabel
));
if
(
call
(
domain
->
conn
,
priv
,
0
,
REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL
,
if
(
call
(
domain
->
conn
,
priv
,
0
,
REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL
,
(
xdrproc_t
)
xdr_remote_domain_get_security_label_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_remote_domain_get_security_label_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_remote_domain_get_security_label_ret
,
(
char
*
)
&
ret
)
==
-
1
)
{
(
xdrproc_t
)
xdr_remote_domain_get_security_label_ret
,
(
char
*
)
&
ret
)
==
-
1
)
{
...
@@ -2356,6 +2358,8 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel)
...
@@ -2356,6 +2358,8 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel)
remoteDriverLock
(
priv
);
remoteDriverLock
(
priv
);
memset
(
&
ret
,
0
,
sizeof
ret
);
memset
(
&
ret
,
0
,
sizeof
ret
);
memset
(
secmodel
,
0
,
sizeof
(
*
secmodel
));
if
(
call
(
conn
,
priv
,
0
,
REMOTE_PROC_NODE_GET_SECURITY_MODEL
,
if
(
call
(
conn
,
priv
,
0
,
REMOTE_PROC_NODE_GET_SECURITY_MODEL
,
(
xdrproc_t
)
xdr_void
,
NULL
,
(
xdrproc_t
)
xdr_void
,
NULL
,
(
xdrproc_t
)
xdr_remote_node_get_security_model_ret
,
(
char
*
)
&
ret
)
==
-
1
)
{
(
xdrproc_t
)
xdr_remote_node_get_security_model_ret
,
(
char
*
)
&
ret
)
==
-
1
)
{
...
...
src/virsh.c
浏览文件 @
73f34b31
...
@@ -1643,8 +1643,10 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
...
@@ -1643,8 +1643,10 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
/* Security model and label information */
/* Security model and label information */
memset
(
&
secmodel
,
0
,
sizeof
secmodel
);
memset
(
&
secmodel
,
0
,
sizeof
secmodel
);
if
(
virNodeGetSecurityModel
(
ctl
->
conn
,
&
secmodel
)
==
-
1
)
{
if
(
virNodeGetSecurityModel
(
ctl
->
conn
,
&
secmodel
)
==
-
1
)
{
virDomainFree
(
dom
);
if
(
last_error
->
code
!=
VIR_ERR_NO_SUPPORT
)
{
return
FALSE
;
virDomainFree
(
dom
);
return
FALSE
;
}
}
else
{
}
else
{
/* Only print something if a security model is active */
/* Only print something if a security model is active */
if
(
secmodel
.
model
[
0
]
!=
'\0'
)
{
if
(
secmodel
.
model
[
0
]
!=
'\0'
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录