aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2009-01-03 02:16:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-03 14:45:54 -0500
commit3bfacef412b4bc993a8992217e50f1245f2fd3a6 (patch)
treebcf92bc34b30383dfc542f9850f59858681556cb /fs/exec.c
parent17580d7f2f632ff8c9786d609508c35c9f56e1f3 (diff)
get rid of special-casing the /sbin/loader on alpha
... just make it a binfmt handler like #! one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/fs/exec.c b/fs/exec.c
index dfbf7009fbe..3ef9cf9b187 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -57,11 +57,6 @@
57#include <asm/tlb.h> 57#include <asm/tlb.h>
58#include "internal.h" 58#include "internal.h"
59 59
60#ifdef __alpha__
61/* for /sbin/loader handling in search_binary_handler() */
62#include <linux/a.out.h>
63#endif
64
65int core_uses_pid; 60int core_uses_pid;
66char core_pattern[CORENAME_MAX_SIZE] = "core"; 61char core_pattern[CORENAME_MAX_SIZE] = "core";
67int suid_dumpable = 0; 62int suid_dumpable = 0;
@@ -1172,41 +1167,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
1172 unsigned int depth = bprm->recursion_depth; 1167 unsigned int depth = bprm->recursion_depth;
1173 int try,retval; 1168 int try,retval;
1174 struct linux_binfmt *fmt; 1169 struct linux_binfmt *fmt;
1175#ifdef __alpha__
1176 /* handle /sbin/loader.. */
1177 {
1178 struct exec * eh = (struct exec *) bprm->buf;
1179 1170
1180 if (!bprm->loader && eh->fh.f_magic == 0x183 &&
1181 (eh->fh.f_flags & 0x3000) == 0x3000)
1182 {
1183 struct file * file;
1184 unsigned long loader;
1185
1186 allow_write_access(bprm->file);
1187 fput(bprm->file);
1188 bprm->file = NULL;
1189
1190 loader = bprm->vma->vm_end - sizeof(void *);
1191
1192 file = open_exec("/sbin/loader");
1193 retval = PTR_ERR(file);
1194 if (IS_ERR(file))
1195 return retval;
1196
1197 /* Remember if the application is TASO. */
1198 bprm->taso = eh->ah.entry < 0x100000000UL;
1199
1200 bprm->file = file;
1201 bprm->loader = loader;
1202 retval = prepare_binprm(bprm);
1203 if (retval<0)
1204 return retval;
1205 /* should call search_binary_handler recursively here,
1206 but it does not matter */
1207 }
1208 }
1209#endif
1210 retval = security_bprm_check(bprm); 1171 retval = security_bprm_check(bprm);
1211 if (retval) 1172 if (retval)
1212 return retval; 1173 return retval;