Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156434
b: refs/heads/master
c: 3440625
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 7, 2009
1 parent efcc9ae commit 0c22f7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e5cf0ca2e9b65110ae5f094d7f0f7165cd1bbbb
refs/heads/master: 3440625d78711bee41a84cf29c3d8c579b522666
17 changes: 12 additions & 5 deletions trunk/fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,22 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
if (IS_ERR(bprm.file))
return res;

bprm.cred = prepare_exec_creds();
res = -ENOMEM;
if (!bprm.cred)
goto out;

res = prepare_binprm(&bprm);

if (res <= (unsigned long)-4096)
res = load_flat_file(&bprm, libs, id, NULL);
if (bprm.file) {
allow_write_access(bprm.file);
fput(bprm.file);
bprm.file = NULL;
}

abort_creds(bprm.cred);

out:
allow_write_access(bprm.file);
fput(bprm.file);

return(res);
}

Expand Down

0 comments on commit 0c22f7b

Please sign in to comment.