]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
audit: hide auditsc_get_stamp and audit_serial prototypes
authorRichard Guy Briggs <rgb@redhat.com>
Tue, 5 Feb 2019 21:06:30 +0000 (16:06 -0500)
committerPaul Moore <paul@paul-moore.com>
Fri, 8 Feb 2019 02:44:27 +0000 (21:44 -0500)
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>
include/linux/audit.h
kernel/audit.h

index 29251b18331a61eaf016a2aaa9dd2f3f30761ef2..1e69d9fe16da6542b02290743ebcb83ce239ef77 100644 (file)
@@ -348,10 +348,6 @@ static inline void audit_ptrace(struct task_struct *t)
 }
 
                                /* Private API (for audit.c only) */
-extern unsigned int audit_serial(void);
-extern int auditsc_get_stamp(struct audit_context *ctx,
-                             struct timespec64 *t, unsigned int *serial);
-
 extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
 extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
 extern void __audit_bprm(struct linux_binprm *bprm);
@@ -531,11 +527,6 @@ static inline void audit_seccomp(unsigned long syscall, long signr, int code)
 static inline void audit_seccomp_actions_logged(const char *names,
                                                const char *old_names, int res)
 { }
-static inline int auditsc_get_stamp(struct audit_context *ctx,
-                             struct timespec64 *t, unsigned int *serial)
-{
-       return 0;
-}
 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
 { }
 static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
index 82734f438ddd525db751fa99aa970e0b17b7dff4..958d5b8fc1b3c8e2c43affb346b2e89e8a188f5c 100644 (file)
@@ -261,6 +261,10 @@ extern void audit_put_tty(struct tty_struct *tty);
 
 /* audit watch/mark/tree functions */
 #ifdef CONFIG_AUDITSYSCALL
+extern unsigned int audit_serial(void);
+extern int auditsc_get_stamp(struct audit_context *ctx,
+                             struct timespec64 *t, unsigned int *serial);
+
 extern void audit_put_watch(struct audit_watch *watch);
 extern void audit_get_watch(struct audit_watch *watch);
 extern 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,
                                struct audit_context *ctx);
 extern struct list_head *audit_killed_trees(void);
 #else /* CONFIG_AUDITSYSCALL */
+#define auditsc_get_stamp(c, t, s) 0
 #define audit_put_watch(w) {}
 #define audit_get_watch(w) {}
 #define audit_to_watch(k, p, l, o) (-EINVAL)