diff options
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index a40641954c29..ec1464df4c60 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -43,6 +43,7 @@ struct mq_attr; | |||
43 | struct mqstat; | 43 | struct mqstat; |
44 | struct audit_watch; | 44 | struct audit_watch; |
45 | struct audit_tree; | 45 | struct audit_tree; |
46 | struct sk_buff; | ||
46 | 47 | ||
47 | struct audit_krule { | 48 | struct audit_krule { |
48 | int vers_ops; | 49 | int vers_ops; |
@@ -137,7 +138,7 @@ static inline void audit_syscall_exit(void *pt_regs) | |||
137 | { | 138 | { |
138 | if (unlikely(current->audit_context)) { | 139 | if (unlikely(current->audit_context)) { |
139 | int success = is_syscall_success(pt_regs); | 140 | int success = is_syscall_success(pt_regs); |
140 | int return_code = regs_return_value(pt_regs); | 141 | long return_code = regs_return_value(pt_regs); |
141 | 142 | ||
142 | __audit_syscall_exit(success, return_code); | 143 | __audit_syscall_exit(success, return_code); |
143 | } | 144 | } |
@@ -202,7 +203,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk) | |||
202 | return tsk->loginuid; | 203 | return tsk->loginuid; |
203 | } | 204 | } |
204 | 205 | ||
205 | static inline int audit_get_sessionid(struct task_struct *tsk) | 206 | static inline unsigned int audit_get_sessionid(struct task_struct *tsk) |
206 | { | 207 | { |
207 | return tsk->sessionid; | 208 | return tsk->sessionid; |
208 | } | 209 | } |
@@ -220,7 +221,7 @@ extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | |||
220 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | 221 | extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, |
221 | const struct cred *new, | 222 | const struct cred *new, |
222 | const struct cred *old); | 223 | const struct cred *old); |
223 | extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); | 224 | extern void __audit_log_capset(const struct cred *new, const struct cred *old); |
224 | extern void __audit_mmap_fd(int fd, int flags); | 225 | extern void __audit_mmap_fd(int fd, int flags); |
225 | 226 | ||
226 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) | 227 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
@@ -285,11 +286,11 @@ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
285 | return 0; | 286 | return 0; |
286 | } | 287 | } |
287 | 288 | ||
288 | static inline void audit_log_capset(pid_t pid, const struct cred *new, | 289 | static inline void audit_log_capset(const struct cred *new, |
289 | const struct cred *old) | 290 | const struct cred *old) |
290 | { | 291 | { |
291 | if (unlikely(!audit_dummy_context())) | 292 | if (unlikely(!audit_dummy_context())) |
292 | __audit_log_capset(pid, new, old); | 293 | __audit_log_capset(new, old); |
293 | } | 294 | } |
294 | 295 | ||
295 | static inline void audit_mmap_fd(int fd, int flags) | 296 | static inline void audit_mmap_fd(int fd, int flags) |
@@ -359,7 +360,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk) | |||
359 | { | 360 | { |
360 | return INVALID_UID; | 361 | return INVALID_UID; |
361 | } | 362 | } |
362 | static inline int audit_get_sessionid(struct task_struct *tsk) | 363 | static inline unsigned int audit_get_sessionid(struct task_struct *tsk) |
363 | { | 364 | { |
364 | return -1; | 365 | return -1; |
365 | } | 366 | } |
@@ -397,8 +398,8 @@ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
397 | { | 398 | { |
398 | return 0; | 399 | return 0; |
399 | } | 400 | } |
400 | static inline void audit_log_capset(pid_t pid, const struct cred *new, | 401 | static inline void audit_log_capset(const struct cred *new, |
401 | const struct cred *old) | 402 | const struct cred *old) |
402 | { } | 403 | { } |
403 | static inline void audit_mmap_fd(int fd, int flags) | 404 | static inline void audit_mmap_fd(int fd, int flags) |
404 | { } | 405 | { } |
@@ -461,9 +462,11 @@ extern int audit_update_lsm_rules(void); | |||
461 | /* Private API (for audit.c only) */ | 462 | /* Private API (for audit.c only) */ |
462 | extern int audit_filter_user(int type); | 463 | extern int audit_filter_user(int type); |
463 | extern int audit_filter_type(int type); | 464 | extern int audit_filter_type(int type); |
464 | extern int audit_receive_filter(int type, int pid, int seq, | 465 | extern int audit_rule_change(int type, __u32 portid, int seq, |
465 | void *data, size_t datasz); | 466 | void *data, size_t datasz); |
466 | extern int audit_enabled; | 467 | extern int audit_list_rules_send(struct sk_buff *request_skb, int seq); |
468 | |||
469 | extern u32 audit_enabled; | ||
467 | #else /* CONFIG_AUDIT */ | 470 | #else /* CONFIG_AUDIT */ |
468 | static inline __printf(4, 5) | 471 | static inline __printf(4, 5) |
469 | void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, | 472 | void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, |