[libvirt] [PATCH 5/6] audit: Add auditing for serial/parallel/channel/console characted devs

Ján Tomko jtomko at redhat.com
Thu Jul 3 13:28:42 UTC 2014


On 07/03/2014 12:05 PM, Peter Krempa wrote:
> Add startup auditing and also hotplug auditing for said devices
> ---
>  src/conf/domain_audit.c  | 35 +++++++++++++++++++++++++++++++++++
>  src/conf/domain_audit.h  |  7 +++++++
>  src/libvirt_private.syms |  1 +
>  src/qemu/qemu_hotplug.c  | 17 +++++++++++------
>  4 files changed, 54 insertions(+), 6 deletions(-)

Missing changes in docs/auditlog.html.in

> diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
> index c4dcfa5..b7f8123 100644
> --- a/src/conf/domain_audit.c
> +++ b/src/conf/domain_audit.c

>  virDomainAuditDisk(virDomainObjPtr vm,
>                     virStorageSourcePtr oldDef,
>                     virStorageSourcePtr newDef,
> @@ -772,6 +795,18 @@ virDomainAuditStart(virDomainObjPtr vm, const char *reason, bool success)
>          virDomainAuditRedirdev(vm, redirdev, "start", true);
>      }
> 
> +    for (i = 0; i < vm->def->nserials; i++)
> +        virDomainAuditChardev(vm, NULL, vm->def->serials[i], "start", true);
> +
> +    for (i = 0; i < vm->def->nparallels; i++)
> +        virDomainAuditChardev(vm, NULL, vm->def->parallels[i], "start", true);
> +
> +    for (i = 0; i < vm->def->nchannels; i++)
> +        virDomainAuditChardev(vm, NULL, vm->def->channels[i], "start", true);
> +
> +    for (i = 0; i < vm->def->nconsoles; i++)
> +        virDomainAuditChardev(vm, NULL, vm->def->consoles[i], "start", true);
> +

I wonder if working around the first console aliased to the first serial port
(or was it the other way around?) is worth it to prevent logging the same
device twice.

ACK with the docs added.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140703/253a666c/attachment-0001.sig>


More information about the libvir-list mailing list