]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
audit: change unnecessary globals into statics
authorJules Irenge <jbi.octave@gmail.com>
Mon, 3 Aug 2020 12:34:38 +0000 (13:34 +0100)
committerPaul Moore <paul@paul-moore.com>
Tue, 18 Aug 2020 00:26:58 +0000 (20:26 -0400)
Variables sig_pid, audit_sig_uid and audit_sig_sid
are only used in the audit.c file across the kernel
Hence it appears no reason for declaring them as globals
This patch removes their global declarations from the .h file
and change them into static in the .c file.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.c
kernel/audit.h

index 7efaece534a9f69de1a47f76e0f54b6603fe65fd..5cf4781d55468df5b681e6edf22a47b09a189d33 100644 (file)
@@ -123,9 +123,9 @@ static u32  audit_backlog_limit = 64;
 static u32     audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
 
 /* The identity of the user shutting down the audit system. */
-kuid_t         audit_sig_uid = INVALID_UID;
-pid_t          audit_sig_pid = -1;
-u32            audit_sig_sid = 0;
+static kuid_t          audit_sig_uid = INVALID_UID;
+static pid_t           audit_sig_pid = -1;
+static u32             audit_sig_sid = 0;
 
 /* Records can be lost in several ways:
    0) [suppressed in audit_alloc]
index ddc22878433d014303c17be97a26dc68442a5212..3b9c0945225a121e7031cfe29299925bb0b42516 100644 (file)
@@ -327,10 +327,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
 
 extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
 
-extern pid_t audit_sig_pid;
-extern kuid_t audit_sig_uid;
-extern u32 audit_sig_sid;
-
 extern int audit_filter(int msgtype, unsigned int listtype);
 
 extern void audit_ctl_lock(void);