patch-1.3.50 linux/fs/exec.c

Next file: linux/fs/ext/dir.c
Previous file: linux/fs/devices.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.49/linux/fs/exec.c linux/fs/exec.c
@@ -748,8 +748,13 @@
 		goto restart_interp;
 	}
 #ifdef __alpha__
-/* handle /sbin/loader.. */
-	if (!loader && (((struct exec *) bprm.buf)->fh.f_flags & 0x3000)) {
+	/* handle /sbin/loader.. */
+	{
+	    struct exec * eh = (struct exec *) bprm.buf;
+
+	    if (!loader && eh->fh.f_magic == 0x183 &&
+		(eh->fh.f_flags & 0x3000) == 0x3000)
+	    {
 		char * dynloader[] = { "/sbin/loader" };
 		iput(bprm.inode);
 		loader = 1;
@@ -759,6 +764,7 @@
 		if (retval)
 			goto exec_error1;
 		goto restart_interp;
+	    }
 	}
 #endif
 	if (!sh_bang) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this