Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
5bd3c73b
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,发现更多精彩内容 >>
提交
5bd3c73b
编写于
7月 03, 2014
作者:
P
Peter Krempa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
audit: Audit smartcard devices
上级
994cc314
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
68 addition
and
0 deletion
+68
-0
docs/auditlog.html.in
docs/auditlog.html.in
+20
-0
src/conf/domain_audit.c
src/conf/domain_audit.c
+48
-0
未找到文件。
docs/auditlog.html.in
浏览文件 @
5bd3c73b
...
...
@@ -301,6 +301,26 @@
<dd>
Updated path of the backing character device for given emulated device
</dd>
</dl>
<h4><a
name=
"typeresourcesmartcard"
>
smartcard
</a></h4>
<p>
The
<code>
msg
</code>
field will include the following sub-fields
</p>
<dl>
<dt>
reason
</dt>
<dd>
The reason which caused the resource to be assigned to happen
</dd>
<dt>
resrc
</dt>
<dd>
The type of resource assigned. Set to
<code>
smartcard
</code></dd>
<dt>
old-smartcard
</dt>
<dd>
Original path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
<dt>
new-smartcard
</dt>
<dd>
Updated path of the backing character device, certificate store or
"nss-smartcard-device" for host smartcard passthrough.
</dd>
</dl>
<h4><a
name=
"typeresourceredir"
>
Redirected device
</a></h4>
<p>
The
<code>
msg
</code>
field will include the following sub-fields
...
...
src/conf/domain_audit.c
浏览文件 @
5bd3c73b
...
...
@@ -177,6 +177,51 @@ virDomainAuditChardev(virDomainObjPtr vm,
}
static
void
virDomainAuditSmartcard
(
virDomainObjPtr
vm
,
virDomainSmartcardDefPtr
def
,
const
char
*
reason
,
bool
success
)
{
const
char
*
database
=
VIR_DOMAIN_SMARTCARD_DEFAULT_DATABASE
;
size_t
i
;
if
(
def
)
{
switch
((
virDomainSmartcardType
)
def
->
type
)
{
case
VIR_DOMAIN_SMARTCARD_TYPE_HOST
:
virDomainAuditGenericDev
(
vm
,
"smartcard"
,
NULL
,
"nss-smartcard-device"
,
reason
,
success
);
break
;
case
VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES
:
for
(
i
=
0
;
i
<
VIR_DOMAIN_SMARTCARD_NUM_CERTIFICATES
;
i
++
)
{
virDomainAuditGenericDev
(
vm
,
"smartcard"
,
NULL
,
def
->
data
.
cert
.
file
[
i
],
reason
,
success
);
}
if
(
def
->
data
.
cert
.
database
)
database
=
def
->
data
.
cert
.
database
;
virDomainAuditGenericDev
(
vm
,
"smartcard"
,
NULL
,
database
,
reason
,
success
);
break
;
case
VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH
:
virDomainAuditGenericDev
(
vm
,
"smartcard"
,
NULL
,
virDomainAuditChardevPath
(
&
def
->
data
.
passthru
),
reason
,
success
);
break
;
case
VIR_DOMAIN_SMARTCARD_TYPE_LAST
:
break
;
}
}
}
void
virDomainAuditDisk
(
virDomainObjPtr
vm
,
virStorageSourcePtr
oldDef
,
...
...
@@ -814,6 +859,9 @@ virDomainAuditStart(virDomainObjPtr vm, const char *reason, bool success)
virDomainAuditChardev
(
vm
,
NULL
,
vm
->
def
->
consoles
[
i
],
"start"
,
true
);
}
for
(
i
=
0
;
i
<
vm
->
def
->
nsmartcards
;
i
++
)
virDomainAuditSmartcard
(
vm
,
vm
->
def
->
smartcards
[
i
],
"start"
,
true
);
if
(
vm
->
def
->
rng
)
virDomainAuditRNG
(
vm
,
NULL
,
vm
->
def
->
rng
,
"start"
,
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录