git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Linux 3.19-rc1
[pandora-kernel.git]
/
fs
/
binfmt_misc.c
diff --git
a/fs/binfmt_misc.c
b/fs/binfmt_misc.c
index
70789e1
..
97aff28
100644
(file)
--- a/
fs/binfmt_misc.c
+++ b/
fs/binfmt_misc.c
@@
-144,6
+144,10
@@
static int load_misc_binary(struct linux_binprm *bprm)
if (!fmt)
goto ret;
if (!fmt)
goto ret;
+ /* Need to be able to load the file after exec */
+ if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE)
+ return -ENOENT;
+
if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) {
retval = remove_arg_zero(bprm);
if (retval)
if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) {
retval = remove_arg_zero(bprm);
if (retval)
@@
-250,6
+254,7
@@
static char *scanarg(char *s, char del)
return NULL;
}
}
return NULL;
}
}
+ s[-1] ='\0';
return s;
}
return s;
}
@@
-374,8
+379,7
@@
static Node *create_entry(const char __user *buffer, size_t count)
p = scanarg(p, del);
if (!p)
goto einval;
p = scanarg(p, del);
if (!p)
goto einval;
- p[-1] = '\0';
- if (p == e->magic)
+ if (!e->magic[0])
goto einval;
if (USE_DEBUG)
print_hex_dump_bytes(
goto einval;
if (USE_DEBUG)
print_hex_dump_bytes(
@@
-387,8
+391,7
@@
static Node *create_entry(const char __user *buffer, size_t count)
p = scanarg(p, del);
if (!p)
goto einval;
p = scanarg(p, del);
if (!p)
goto einval;
- p[-1] = '\0';
- if (p == e->mask) {
+ if (!e->mask[0]) {
e->mask = NULL;
pr_debug("register: mask[raw]: none\n");
} else if (USE_DEBUG)
e->mask = NULL;
pr_debug("register: mask[raw]: none\n");
} else if (USE_DEBUG)