diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-10 03:40:06 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-01-04 15:14:39 -0500 |
commit | a33e6751003c5ade603737d828b1519d980ce392 (patch) | |
tree | aa484d033e886945aed78172dbdd4d2fd928bacf /include | |
parent | f3298dc4f2277874d40cb4fc3a6e277317d6603b (diff) |
sanitize audit_ipc_obj()
* get rid of allocations
* make it return void
* simplify callers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/audit.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 466a953d4bf6..f8578b9088e1 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -443,7 +443,7 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | |||
443 | #define audit_get_loginuid(t) ((t)->loginuid) | 443 | #define audit_get_loginuid(t) ((t)->loginuid) |
444 | #define audit_get_sessionid(t) ((t)->sessionid) | 444 | #define audit_get_sessionid(t) ((t)->sessionid) |
445 | extern void audit_log_task_context(struct audit_buffer *ab); | 445 | extern void audit_log_task_context(struct audit_buffer *ab); |
446 | extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 446 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
447 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 447 | extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
448 | extern int audit_bprm(struct linux_binprm *bprm); | 448 | extern int audit_bprm(struct linux_binprm *bprm); |
449 | extern void audit_socketcall(int nargs, unsigned long *args); | 449 | extern void audit_socketcall(int nargs, unsigned long *args); |
@@ -460,11 +460,10 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
460 | const struct cred *old); | 460 | const struct cred *old); |
461 | extern int __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); | 461 | extern int __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); |
462 | 462 | ||
463 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 463 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
464 | { | 464 | { |
465 | if (unlikely(!audit_dummy_context())) | 465 | if (unlikely(!audit_dummy_context())) |
466 | return __audit_ipc_obj(ipcp); | 466 | __audit_ipc_obj(ipcp); |
467 | return 0; | ||
468 | } | 467 | } |
469 | static inline int audit_fd_pair(int fd1, int fd2) | 468 | static inline int audit_fd_pair(int fd1, int fd2) |
470 | { | 469 | { |
@@ -546,7 +545,7 @@ extern int audit_signals; | |||
546 | #define audit_get_loginuid(t) (-1) | 545 | #define audit_get_loginuid(t) (-1) |
547 | #define audit_get_sessionid(t) (-1) | 546 | #define audit_get_sessionid(t) (-1) |
548 | #define audit_log_task_context(b) do { ; } while (0) | 547 | #define audit_log_task_context(b) do { ; } while (0) |
549 | #define audit_ipc_obj(i) ({ 0; }) | 548 | #define audit_ipc_obj(i) ((void)0) |
550 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) | 549 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) |
551 | #define audit_bprm(p) ({ 0; }) | 550 | #define audit_bprm(p) ({ 0; }) |
552 | #define audit_socketcall(n,a) ((void)0) | 551 | #define audit_socketcall(n,a) ((void)0) |