binfmt: Move install_exec_creds after setup_new_exec to match binfmt_elf
[linux-2.6-block.git] / fs / binfmt_aout.c
index 8e8346a81723c4ec43bd36802fb80b8080fe4234..ace587b66904c855d519fe97d3afdb969b8dc223 100644 (file)
@@ -162,6 +162,7 @@ static int load_aout_binary(struct linux_binprm * bprm)
        set_personality(PER_LINUX);
 #endif
        setup_new_exec(bprm);
+       install_exec_creds(bprm);
 
        current->mm->end_code = ex.a_text +
                (current->mm->start_code = N_TXTADDR(ex));
@@ -174,7 +175,6 @@ static int load_aout_binary(struct linux_binprm * bprm)
        if (retval < 0)
                return retval;
 
-       install_exec_creds(bprm);
 
        if (N_MAGIC(ex) == OMAGIC) {
                unsigned long text_addr, map_size;