From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13230 invoked from network); 20 Oct 1998 13:56:25 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 20 Oct 1998 13:56:25 -0000 Received: from phobos.hvrlab.ml.org (root@cable-modem113.m2.kabelnet.net [195.202.132.113]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id JAA08226 for ; Tue, 20 Oct 1998 09:47:58 -0400 Received: from phoenix.twisted.hvrlab.ml.org (phoenix.twisted.hvrlab.ml.org [10.51.1.3]) by phobos.hvrlab.ml.org (8.8.7/8.8.7) with ESMTP id PAA05751 for ; Tue, 20 Oct 1998 15:47:31 +0200 Date: Tue, 20 Oct 1998 15:47:37 +0200 (CEST) From: Herbert Riedel X-Sender: hvr@phoenix.twisted.hvrlab.ml.org To: axp-list@redhat.com Subject: Re: DU binaries and /sbin/loader (argv[0] problem?) In-Reply-To: <13868.32374.553367.438108@pan.persimmon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 20 Oct 1998, Aideen McConville wrote: > I've tried running some 3.2 DU binaries under RH 5.1 (both 2.0.34 and > 2.0.35 kernels) and don't know what to do about the "/sbin/loader > being passed as argv[0]" problem. > --- exec.c Tue Jan 20 17:57:24 1998 > +++ exec.c~ Tue Dec 2 18:35:05 1997 > @@ -654,7 +654,7 @@ > dput(bprm->dentry); > bprm->dentry = NULL; > remove_arg_zero(bprm); > - bprm->p = copy_strings(1, &bprm->filename, bprm->page, bprm->p, 2); > + bprm->p = copy_strings(1, dynloader, bprm->page, bprm->p, 2); > bprm->argc++; > bprm->loader = bprm->p; > dentry = open_namei(dynloader[0], 0, 0); > This worked for xemacs but sent communicator into a loop at startup. > > Is there any other fix? Well... one night I was quite annoyed by that argv0 bug that I dared to do fix it myself :) --- exec.c-dist Sat Oct 10 12:31:27 1998 +++ exec.c Mon Oct 12 01:43:12 1998 @@ -761,9 +761,11 @@ dput(bprm->dentry); bprm->dentry = NULL; - remove_arg_zero(bprm); - bprm->p = copy_strings(1, dynloader, bprm->page, bprm->p, 2); - bprm->argc++; +/* test by HVR + * remove_arg_zero(bprm); + * bprm->p = copy_strings(1, dynloader, bprm->page, bprm->p, 2); + */ bprm->argc++; + bprm->argc--; bprm->loader = bprm->p; dentry = open_namei(dynloader[0], 0, 0); retval = PTR_ERR(dentry); Well... I don't know exactly what bprm->loader is needed for... actually I didn't notice any problems with it being pointed to argv0 ... maybe someone can enlighten me on that? :) -- "The idea that Bill Gates has appeared like a knight in shining armour to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he who, by peddling second-rate technology, led them into it in the first place." - Douglas Adams, on Windows '95.