From owner-freebsd-bugs Sat Feb 2 2:40: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 81DFF37B405 for ; Sat, 2 Feb 2002 02:40:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g12Ae2h65743; Sat, 2 Feb 2002 02:40:02 -0800 (PST) (envelope-from gnats) Date: Sat, 2 Feb 2002 02:40:02 -0800 (PST) Message-Id: <200202021040.g12Ae2h65743@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Artem 'Zazoobr' Ignatjev" Subject: Re: bin/34483: wrong execv() call in amd for ${mount} and ${unmount} if mount type:=program in amd.map Reply-To: "Artem 'Zazoobr' Ignatjev" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/34483; it has been noted by GNATS. From: "Artem 'Zazoobr' Ignatjev" To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/34483: wrong execv() call in amd for ${mount} and ${unmount} if mount type:=program in amd.map Date: Sat, 2 Feb 2002 13:38:28 +0300 (MSK) Hi. Here is reply from author, Erez Zadok (from amd-dev mailing list): > From ezk@shekel.mcl.cs.columbia.edu Sat Feb 2 07:11:08 2002 > Date: Fri, 1 Feb 2002 23:11:02 -0500 (EST) > From: Erez Zadok > To: "Artem 'Zazoobr' Ignatjev" > Cc: amd-dev@cs.columbia.edu > Subject: Re: wrong execv() call for ${mount} and ${unmount} if mount type:=program in amd.map > I don't think that's a bug. The mount:= variable in amd requires special > syntax that's a little different than an argv[] list. If the command to > mount something is, say, "mount /this /here", then you have to specify the > map entry as > > type:=program;mount:="/etc/mount mount /this /here" > > IOW, you also list the program name's full path (here etc/mount) in the list > of args to the program type's mount:= variable. > > That has been the syntax for amd's program type since the beginning. It's a > source of unfortunate confusion to programmers who are used to think that > it's just an argv[] list. It's not. > Erez. But I still think, that in case of hardlinks, this patch will work, and all man have to do is to write the correct path in map; in other cases there could be no possibility to mount filesystem "by hands", without writing shell script/tiny program, which will call exec...() on one path, giving argv[0] with other prog's name. Wishes & regards, Artem. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message