diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-10 06:58:59 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-01-04 15:14:40 -0500 |
| commit | 7392906ea915b9a2c14dea32b3604b4e178f82f7 (patch) | |
| tree | 1e4fbe56e3738fade213ef805ec274ea74ac6a1b /include/linux | |
| parent | e816f370cbadd2afea9f1a42f232d0636137d563 (diff) | |
sanitize audit_mq_getsetattr()
* get rid of allocations
* make it return void
* don't duplicate parts of audit_dummy_context()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
| -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 b7abfe0d6737..b7707e577b80 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -454,7 +454,7 @@ extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr | |||
| 454 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); | 454 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); |
| 455 | extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); | 455 | extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); |
| 456 | extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); | 456 | extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); |
| 457 | extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | 457 | extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); |
| 458 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | 458 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, |
| 459 | const struct cred *new, | 459 | const struct cred *new, |
| 460 | const struct cred *old); | 460 | const struct cred *old); |
| @@ -500,11 +500,10 @@ static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_n | |||
| 500 | return __audit_mq_notify(mqdes, u_notification); | 500 | return __audit_mq_notify(mqdes, u_notification); |
| 501 | return 0; | 501 | return 0; |
| 502 | } | 502 | } |
| 503 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | 503 | static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) |
| 504 | { | 504 | { |
| 505 | if (unlikely(!audit_dummy_context())) | 505 | if (unlikely(!audit_dummy_context())) |
| 506 | return __audit_mq_getsetattr(mqdes, mqstat); | 506 | __audit_mq_getsetattr(mqdes, mqstat); |
| 507 | return 0; | ||
| 508 | } | 507 | } |
| 509 | 508 | ||
| 510 | static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, | 509 | static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, |
| @@ -555,7 +554,7 @@ extern int audit_signals; | |||
| 555 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) | 554 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) |
| 556 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 555 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) |
| 557 | #define audit_mq_notify(d,n) ({ 0; }) | 556 | #define audit_mq_notify(d,n) ({ 0; }) |
| 558 | #define audit_mq_getsetattr(d,s) ({ 0; }) | 557 | #define audit_mq_getsetattr(d,s) ((void)0) |
| 559 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) | 558 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) |
| 560 | #define audit_log_capset(pid, ncr, ocr) ({ 0; }) | 559 | #define audit_log_capset(pid, ncr, ocr) ({ 0; }) |
| 561 | #define audit_ptrace(t) ((void)0) | 560 | #define audit_ptrace(t) ((void)0) |
