aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-10 07:16:12 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-04 15:14:40 -0500
commit20114f71b27cafeb7c7e41d2b0f0b68c3fbb022b (patch)
treefcbb481cfec8c11f103ba07dbb08819de3822d80 /include/linux/audit.h
parent7392906ea915b9a2c14dea32b3604b4e178f82f7 (diff)
sanitize audit_mq_notify()
* don't copy_from_user() twice * don't bother with allocations * don't duplicate parts of audit_dummy_context() * make it return void 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 b7707e577b8..8101d2c4a99 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -453,7 +453,7 @@ extern int audit_set_macxattr(const char *name);
453extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); 453extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr);
454extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); 454extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout);
455extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); 455extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout);
456extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); 456extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification);
457extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); 457extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
458extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, 458extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
459 const struct cred *new, 459 const struct cred *new,
@@ -494,11 +494,10 @@ static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned in
494 return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); 494 return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout);
495 return 0; 495 return 0;
496} 496}
497static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) 497static inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification)
498{ 498{
499 if (unlikely(!audit_dummy_context())) 499 if (unlikely(!audit_dummy_context()))
500 return __audit_mq_notify(mqdes, u_notification); 500 __audit_mq_notify(mqdes, notification);
501 return 0;
502} 501}
503static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) 502static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
504{ 503{
@@ -553,7 +552,7 @@ extern int audit_signals;
553#define audit_mq_open(o,m,a) ({ 0; }) 552#define audit_mq_open(o,m,a) ({ 0; })
554#define audit_mq_timedsend(d,l,p,t) ({ 0; }) 553#define audit_mq_timedsend(d,l,p,t) ({ 0; })
555#define audit_mq_timedreceive(d,l,p,t) ({ 0; }) 554#define audit_mq_timedreceive(d,l,p,t) ({ 0; })
556#define audit_mq_notify(d,n) ({ 0; }) 555#define audit_mq_notify(d,n) ((void)0)
557#define audit_mq_getsetattr(d,s) ((void)0) 556#define audit_mq_getsetattr(d,s) ((void)0)
558#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) 557#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
559#define audit_log_capset(pid, ncr, ocr) ({ 0; }) 558#define audit_log_capset(pid, ncr, ocr) ({ 0; })