diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -869,9 +869,11 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
869 | if (current->euid == current->uid && current->egid == current->gid) | 869 | if (current->euid == current->uid && current->egid == current->gid) |
870 | current->mm->dumpable = 1; | 870 | current->mm->dumpable = 1; |
871 | name = bprm->filename; | 871 | name = bprm->filename; |
872 | |||
873 | /* Copies the binary name from after last slash */ | ||
872 | for (i=0; (ch = *(name++)) != '\0';) { | 874 | for (i=0; (ch = *(name++)) != '\0';) { |
873 | if (ch == '/') | 875 | if (ch == '/') |
874 | i = 0; | 876 | i = 0; /* overwrite what we wrote */ |
875 | else | 877 | else |
876 | if (i < (sizeof(tcomm) - 1)) | 878 | if (i < (sizeof(tcomm) - 1)) |
877 | tcomm[i++] = ch; | 879 | tcomm[i++] = ch; |