diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f010d6c8dd14..f1f32e55d877 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -850,6 +850,7 @@ static int load_elf_binary(struct linux_binprm *bprm) current->flags |= PF_RANDOMIZE; setup_new_exec(bprm); + install_exec_creds(bprm); /* Do this so that we can load the interpreter, if need be. We will change some of these later */ @@ -1084,7 +1085,6 @@ static int load_elf_binary(struct linux_binprm *bprm) goto out; #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */ - install_exec_creds(bprm); retval = create_elf_tables(bprm, &loc->elf_ex, load_addr, interp_load_addr); if (retval < 0)