[PATCH] audit: fix build error when disable audit

Gao feng gaofeng at cn.fujitsu.com
Thu Dec 19 02:40:40 UTC 2013


On 12/19/2013 10:34 AM, Gao feng wrote:
> kernel/capability.c: In function ‘SYSC_capset’:
> kernel/capability.c:280:2: warning: passing argument 1 of ‘audit_log_capset’ makes integer from pointer without a cast [enabled by default]
>   audit_log_capset(new, current_cred());
>   ^
> In file included from kernel/capability.c:10:0:
> include/linux/audit.h:400:20: note: expected ‘pid_t’ but argument is of type ‘struct cred *’
>  static inline void audit_log_capset(pid_t pid, const struct cred *new,
>                     ^
> kernel/capability.c:280:2: error: too few arguments to function ‘audit_log_capset’
>   audit_log_capset(new, current_cred());
>   ^
> In file included from kernel/capability.c:10:0:
> include/linux/audit.h:400:20: note: declared here
>  static inline void audit_log_capset(pid_t pid, const struct cred *new,
>                     ^
> make[1]: *** [kernel/capability.o] Error 1
> 

BTW, bug introduced by commmit 26b81eb408c411d86c7cc93278fb88fbcd785f65
audit: Simplify and correct audit_log_capset




More information about the Linux-audit mailing list