Skip to content

Commit e84d9f5

Browse files
rgbriggspcmoore
authored andcommitted
audit: audit_context pid unused, context enum comment fix
The pid member of struct audit_context is never used. Remove it. The audit_reset_context() comment about unconditionally resetting "ctx->state" should read "ctx->context". Signed-off-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 0351dc5 commit e84d9f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kernel/audit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct audit_context {
133133
struct sockaddr_storage *sockaddr;
134134
size_t sockaddr_len;
135135
/* Save things to print about task_struct */
136-
pid_t pid, ppid;
136+
pid_t ppid;
137137
kuid_t uid, euid, suid, fsuid;
138138
kgid_t gid, egid, sgid, fsgid;
139139
unsigned long personality;

kernel/auditsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ static void audit_reset_context(struct audit_context *ctx)
965965
if (!ctx)
966966
return;
967967

968-
/* if ctx is non-null, reset the "ctx->state" regardless */
968+
/* if ctx is non-null, reset the "ctx->context" regardless */
969969
ctx->context = AUDIT_CTX_UNUSED;
970970
if (ctx->dummy)
971971
return;
@@ -1002,7 +1002,7 @@ static void audit_reset_context(struct audit_context *ctx)
10021002
kfree(ctx->sockaddr);
10031003
ctx->sockaddr = NULL;
10041004
ctx->sockaddr_len = 0;
1005-
ctx->pid = ctx->ppid = 0;
1005+
ctx->ppid = 0;
10061006
ctx->uid = ctx->euid = ctx->suid = ctx->fsuid = KUIDT_INIT(0);
10071007
ctx->gid = ctx->egid = ctx->sgid = ctx->fsgid = KGIDT_INIT(0);
10081008
ctx->personality = 0;

0 commit comments

Comments
 (0)