[PATCH] audit: fix build error when disable audit

From: Gao feng
Date: Wed Dec 18 2013 - 21:35:02 EST


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

Signed-off-by: Gao feng <gaofeng@xxxxxxxxxxxxxx>
---
include/linux/audit.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index b4d5160..6976219 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -397,8 +397,8 @@ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
{
return 0;
}
-static inline void audit_log_capset(pid_t pid, const struct cred *new,
- const struct cred *old)
+static inline void audit_log_capset(const struct cred *new,
+ const struct cred *old)
{ }
static inline void audit_mmap_fd(int fd, int flags)
{ }
--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/