summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2019-02-05 16:06:30 -0500
committerPaul Moore <paul@paul-moore.com>2019-02-07 21:44:27 -0500
commitcd108b5c51db30aa01657322bb89e48c98216ff9 (patch)
tree8439e151ee074d05805be5d2e7e7b2278bfffe26
parent18f5c1d567a5d16aa6ebac6a2f42e51fc5030baa (diff)
audit: hide auditsc_get_stamp and audit_serial prototypes
auditsc_get_stamp() and audit_serial() are internal audit functions so move their prototypes from include/linux/audit.h to kernel/audit.h so they are not visible to the rest of the kernel. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r--include/linux/audit.h9
-rw-r--r--kernel/audit.h5
2 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 29251b18331a..1e69d9fe16da 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -348,10 +348,6 @@ static inline void audit_ptrace(struct task_struct *t)
348} 348}
349 349
350 /* Private API (for audit.c only) */ 350 /* Private API (for audit.c only) */
351extern unsigned int audit_serial(void);
352extern int auditsc_get_stamp(struct audit_context *ctx,
353 struct timespec64 *t, unsigned int *serial);
354
355extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 351extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
356extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); 352extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
357extern void __audit_bprm(struct linux_binprm *bprm); 353extern void __audit_bprm(struct linux_binprm *bprm);
@@ -531,11 +527,6 @@ static inline void audit_seccomp(unsigned long syscall, long signr, int code)
531static inline void audit_seccomp_actions_logged(const char *names, 527static inline void audit_seccomp_actions_logged(const char *names,
532 const char *old_names, int res) 528 const char *old_names, int res)
533{ } 529{ }
534static inline int auditsc_get_stamp(struct audit_context *ctx,
535 struct timespec64 *t, unsigned int *serial)
536{
537 return 0;
538}
539static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 530static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
540{ } 531{ }
541static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, 532static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
diff --git a/kernel/audit.h b/kernel/audit.h
index 82734f438ddd..958d5b8fc1b3 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -261,6 +261,10 @@ extern void audit_put_tty(struct tty_struct *tty);
261 261
262/* audit watch/mark/tree functions */ 262/* audit watch/mark/tree functions */
263#ifdef CONFIG_AUDITSYSCALL 263#ifdef CONFIG_AUDITSYSCALL
264extern unsigned int audit_serial(void);
265extern int auditsc_get_stamp(struct audit_context *ctx,
266 struct timespec64 *t, unsigned int *serial);
267
264extern void audit_put_watch(struct audit_watch *watch); 268extern void audit_put_watch(struct audit_watch *watch);
265extern void audit_get_watch(struct audit_watch *watch); 269extern void audit_get_watch(struct audit_watch *watch);
266extern int audit_to_watch(struct audit_krule *krule, char *path, int len, 270extern int audit_to_watch(struct audit_krule *krule, char *path, int len,
@@ -300,6 +304,7 @@ extern void audit_filter_inodes(struct task_struct *tsk,
300 struct audit_context *ctx); 304 struct audit_context *ctx);
301extern struct list_head *audit_killed_trees(void); 305extern struct list_head *audit_killed_trees(void);
302#else /* CONFIG_AUDITSYSCALL */ 306#else /* CONFIG_AUDITSYSCALL */
307#define auditsc_get_stamp(c, t, s) 0
303#define audit_put_watch(w) {} 308#define audit_put_watch(w) {}
304#define audit_get_watch(w) {} 309#define audit_get_watch(w) {}
305#define audit_to_watch(k, p, l, o) (-EINVAL) 310#define audit_to_watch(k, p, l, o) (-EINVAL)