Skip to content

Commit

Permalink
exec: fix backport
Browse files Browse the repository at this point in the history
On 3.18 we're accessing the struct member, on 3.4 we receive
the actual char * as an argument.

Signed-off-by: Francisco Franco <[email protected]>
  • Loading branch information
franciscofranco committed Nov 2, 2018
1 parent 77bdfbc commit aa6948a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,9 +1617,9 @@ static int do_execve_common(const char *filename,
}

if (capable(CAP_SYS_ADMIN)) {
if (unlikely(!strcmp(filename->name, ZYGOTE32_BIN)))
if (unlikely(!strcmp(filename, ZYGOTE32_BIN)))
atomic_set(&zygote32_pid, current->pid);
else if (unlikely(!strcmp(filename->name, ZYGOTE64_BIN)))
else if (unlikely(!strcmp(filename, ZYGOTE64_BIN)))
atomic_set(&zygote64_pid, current->pid);
}

Expand Down

0 comments on commit aa6948a

Please sign in to comment.