aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h23
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;
43struct mqstat; 43struct mqstat;
44struct audit_watch; 44struct audit_watch;
45struct audit_tree; 45struct audit_tree;
46struct sk_buff;
46 47
47struct audit_krule { 48struct 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
205static inline int audit_get_sessionid(struct task_struct *tsk) 206static 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);
220extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, 221extern 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);
223extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); 224extern void __audit_log_capset(const struct cred *new, const struct cred *old);
224extern void __audit_mmap_fd(int fd, int flags); 225extern void __audit_mmap_fd(int fd, int flags);
225 226
226static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 227static 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
288static inline void audit_log_capset(pid_t pid, const struct cred *new, 289static 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
295static inline void audit_mmap_fd(int fd, int flags) 296static 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}
362static inline int audit_get_sessionid(struct task_struct *tsk) 363static 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}
400static inline void audit_log_capset(pid_t pid, const struct cred *new, 401static inline void audit_log_capset(const struct cred *new,
401 const struct cred *old) 402 const struct cred *old)
402{ } 403{ }
403static inline void audit_mmap_fd(int fd, int flags) 404static 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) */
462extern int audit_filter_user(int type); 463extern int audit_filter_user(int type);
463extern int audit_filter_type(int type); 464extern int audit_filter_type(int type);
464extern int audit_receive_filter(int type, int pid, int seq, 465extern int audit_rule_change(int type, __u32 portid, int seq,
465 void *data, size_t datasz); 466 void *data, size_t datasz);
466extern int audit_enabled; 467extern int audit_list_rules_send(struct sk_buff *request_skb, int seq);
468
469extern u32 audit_enabled;
467#else /* CONFIG_AUDIT */ 470#else /* CONFIG_AUDIT */
468static inline __printf(4, 5) 471static inline __printf(4, 5)
469void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, 472void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,