Skip to content

Commit cd108b5

Browse files
rgbriggspcmoore
authored andcommitted
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>
1 parent 18f5c1d commit cd108b5

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎include/linux/audit.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ static inline void audit_ptrace(struct task_struct *t)
348348
}
349349

350350
/* Private API (for audit.c only) */
351-
extern unsigned int audit_serial(void);
352-
extern int auditsc_get_stamp(struct audit_context *ctx,
353-
struct timespec64 *t, unsigned int *serial);
354-
355351
extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
356352
extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
357353
extern void __audit_bprm(struct linux_binprm *bprm);
@@ -531,11 +527,6 @@ static inline void audit_seccomp(unsigned long syscall, long signr, int code)
531527
static inline void audit_seccomp_actions_logged(const char *names,
532528
const char *old_names, int res)
533529
{ }
534-
static inline int auditsc_get_stamp(struct audit_context *ctx,
535-
struct timespec64 *t, unsigned int *serial)
536-
{
537-
return 0;
538-
}
539530
static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
540531
{ }
541532
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,

‎kernel/audit.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ extern void audit_put_tty(struct tty_struct *tty);
261261

262262
/* audit watch/mark/tree functions */
263263
#ifdef CONFIG_AUDITSYSCALL
264+
extern unsigned int audit_serial(void);
265+
extern int auditsc_get_stamp(struct audit_context *ctx,
266+
struct timespec64 *t, unsigned int *serial);
267+
264268
extern void audit_put_watch(struct audit_watch *watch);
265269
extern void audit_get_watch(struct audit_watch *watch);
266270
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,
300304
struct audit_context *ctx);
301305
extern struct list_head *audit_killed_trees(void);
302306
#else /* CONFIG_AUDITSYSCALL */
307+
#define auditsc_get_stamp(c, t, s) 0
303308
#define audit_put_watch(w) {}
304309
#define audit_get_watch(w) {}
305310
#define audit_to_watch(k, p, l, o) (-EINVAL)

0 commit comments

Comments
 (0)