diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -197,7 +197,8 @@ static int count(char __user * __user * argv, int max) | |||
197 | * memory to free pages in kernel mem. These are in a format ready | 197 | * memory to free pages in kernel mem. These are in a format ready |
198 | * to be put directly into the top of new user memory. | 198 | * to be put directly into the top of new user memory. |
199 | */ | 199 | */ |
200 | int copy_strings(int argc,char __user * __user * argv, struct linux_binprm *bprm) | 200 | static int copy_strings(int argc, char __user * __user * argv, |
201 | struct linux_binprm *bprm) | ||
201 | { | 202 | { |
202 | struct page *kmapped_page = NULL; | 203 | struct page *kmapped_page = NULL; |
203 | char *kaddr = NULL; | 204 | char *kaddr = NULL; |
@@ -868,9 +869,11 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
868 | if (current->euid == current->uid && current->egid == current->gid) | 869 | if (current->euid == current->uid && current->egid == current->gid) |
869 | current->mm->dumpable = 1; | 870 | current->mm->dumpable = 1; |
870 | name = bprm->filename; | 871 | name = bprm->filename; |
872 | |||
873 | /* Copies the binary name from after last slash */ | ||
871 | for (i=0; (ch = *(name++)) != '\0';) { | 874 | for (i=0; (ch = *(name++)) != '\0';) { |
872 | if (ch == '/') | 875 | if (ch == '/') |
873 | i = 0; | 876 | i = 0; /* overwrite what we wrote */ |
874 | else | 877 | else |
875 | if (i < (sizeof(tcomm) - 1)) | 878 | if (i < (sizeof(tcomm) - 1)) |
876 | tcomm[i++] = ch; | 879 | tcomm[i++] = ch; |