aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-10 03:47:15 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-04 15:14:40 -0500
commite816f370cbadd2afea9f1a42f232d0636137d563 (patch)
tree8a9fe488ced59cd9864fcbf15292641c3b95143c /include/linux/audit.h
parenta33e6751003c5ade603737d828b1519d980ce392 (diff)
sanitize audit_ipc_set_perm()
* get rid of allocations * make it return void * simplify callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index f8578b9088e1..b7abfe0d6737 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -444,7 +444,7 @@ extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
444#define audit_get_sessionid(t) ((t)->sessionid) 444#define audit_get_sessionid(t) ((t)->sessionid)
445extern void audit_log_task_context(struct audit_buffer *ab); 445extern void audit_log_task_context(struct audit_buffer *ab);
446extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 446extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
447extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); 447extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
448extern int audit_bprm(struct linux_binprm *bprm); 448extern int audit_bprm(struct linux_binprm *bprm);
449extern void audit_socketcall(int nargs, unsigned long *args); 449extern void audit_socketcall(int nargs, unsigned long *args);
450extern int audit_sockaddr(int len, void *addr); 450extern int audit_sockaddr(int len, void *addr);
@@ -471,11 +471,10 @@ static inline int audit_fd_pair(int fd1, int fd2)
471 return __audit_fd_pair(fd1, fd2); 471 return __audit_fd_pair(fd1, fd2);
472 return 0; 472 return 0;
473} 473}
474static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) 474static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode)
475{ 475{
476 if (unlikely(!audit_dummy_context())) 476 if (unlikely(!audit_dummy_context()))
477 return __audit_ipc_set_perm(qbytes, uid, gid, mode); 477 __audit_ipc_set_perm(qbytes, uid, gid, mode);
478 return 0;
479} 478}
480static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) 479static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr)
481{ 480{
@@ -546,7 +545,7 @@ extern int audit_signals;
546#define audit_get_sessionid(t) (-1) 545#define audit_get_sessionid(t) (-1)
547#define audit_log_task_context(b) do { ; } while (0) 546#define audit_log_task_context(b) do { ; } while (0)
548#define audit_ipc_obj(i) ((void)0) 547#define audit_ipc_obj(i) ((void)0)
549#define audit_ipc_set_perm(q,u,g,m) ({ 0; }) 548#define audit_ipc_set_perm(q,u,g,m) ((void)0)
550#define audit_bprm(p) ({ 0; }) 549#define audit_bprm(p) ({ 0; })
551#define audit_socketcall(n,a) ((void)0) 550#define audit_socketcall(n,a) ((void)0)
552#define audit_fd_pair(n,a) ({ 0; }) 551#define audit_fd_pair(n,a) ({ 0; })