Skip to content

Commit 6b87024

Browse files
irengepcmoore
authored andcommitted
audit: change unnecessary globals into statics
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>
1 parent 9123e3a commit 6b87024

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

kernel/audit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ static u32 audit_backlog_limit = 64;
123123
static u32 audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
124124

125125
/* The identity of the user shutting down the audit system. */
126-
kuid_t audit_sig_uid = INVALID_UID;
127-
pid_t audit_sig_pid = -1;
128-
u32 audit_sig_sid = 0;
126+
static kuid_t audit_sig_uid = INVALID_UID;
127+
static pid_t audit_sig_pid = -1;
128+
static u32 audit_sig_sid = 0;
129129

130130
/* Records can be lost in several ways:
131131
0) [suppressed in audit_alloc]

kernel/audit.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
327327

328328
extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
329329

330-
extern pid_t audit_sig_pid;
331-
extern kuid_t audit_sig_uid;
332-
extern u32 audit_sig_sid;
333-
334330
extern int audit_filter(int msgtype, unsigned int listtype);
335331

336332
extern void audit_ctl_lock(void);

0 commit comments

Comments
 (0)