[PATCH -v2 4/4] AUDIT: emit new record type showing all capset information

Serge E. Hallyn serue at us.ibm.com
Tue Nov 4 16:55:40 UTC 2008


Quoting Eric Paris (eparis at redhat.com):
> diff --git a/kernel/capability.c b/kernel/capability.c
> index 33e51e7..3d7fc70 100644
> --- a/kernel/capability.c
> +++ b/kernel/capability.c
> @@ -7,6 +7,7 @@
>   * 30 May 2002:	Cleanup, Robert M. Love <rml at tech9.net>
>   */
> 
> +#include <linux/audit.h>
>  #include <linux/capability.h>
>  #include <linux/mm.h>
>  #include <linux/module.h>
> @@ -457,6 +458,8 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data)
>  		i++;
>  	}
> 
> +	audit_log_capset(pid, &effective, &inheritable, &permitted);

Shouldn't sys_capset() fail if audit_log_capset() returns -ENOMEM?

> +
>  	if (pid && (pid != task_pid_vnr(current)))
>  		ret = do_sys_capset_other_tasks(pid, &effective, &inheritable,
>  						&permitted);




More information about the Linux-audit mailing list