From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Subject: Re: [PATCH 20/28] HOTPLUG: call_usermodehelper callback support Date: Mon, 25 Oct 2004 11:29:17 -0400 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <417D1BCD.6020005@sun.com> References: <10987156903663@sun.com> <10987157204162@sun.com> <20041025151842.GA1858@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, raven@themaw.net Return-path: Received: from brmea-mail-3.Sun.COM ([192.18.98.34]:2787 "EHLO brmea-mail-3.sun.com") by vger.kernel.org with ESMTP id S261959AbUJYP31 (ORCPT ); Mon, 25 Oct 2004 11:29:27 -0400 Received: from phys-mpk-2 ([129.146.11.82]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id i9PFTQum023483 for ; Mon, 25 Oct 2004 09:29:27 -0600 (MDT) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I6500901C6QF0@mpk-mail1.sfbay.sun.com> (original mail from Michael.Waychison@Sun.COM) for linux-fsdevel@vger.kernel.org; Mon, 25 Oct 2004 08:29:26 -0700 (PDT) In-reply-to: <20041025151842.GA1858@infradead.org> To: Christoph Hellwig List-Id: linux-fsdevel.vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christoph Hellwig wrote: > On Mon, Oct 25, 2004 at 10:48:40AM -0400, Mike Waychison wrote: > >>This patch extends the call_usermodehelper api by adding a callback variant. >>The callback is made right when the system is about to call execve into the >>new process. This allows for the caller to provide changes to the default >>environment right before the exec takes place. Note: the context of the >>callback will be _from within another process_. > > > I don't like this at all. First it's the usual fork() + exec() vs spawn() with > gazillions of arguments debatte, second this sounds far too complex to do it in > kernelspace to me. Why can't you do the enviroment changes from the program > beeing executed? > I want to be able to do two things: - - To 'call_usermodehelper' a program, but in current's namespace. Namespaces can't be passed around in userspace. - - To give the execed program an open file. The current interface doesn't allow me to do that. I figured the _cb way of doing it remove any need for adding ad-hoc api anytime somebody wants to tweak a task before calling execve. Does this clarify why I added this? - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD4DBQFBfRvNdQs4kOxk3/MRAvInAJYmn4GlPasI0r7VcwSKv03GXoygAJ90FWDM LVQOfOrpbKp7NDSmlFRt+A== =aQ04 -----END PGP SIGNATURE-----