Re: [PATCH 1/3] Keys: Pass session keyring to call_usermodehelper()

Mike Waychison
2005-03-23T22:34:29Z

Andrew Morton <akpm <at> osdl.org> writes:

>
> David Howells <dhowells <at> redhat.com> wrote:
> >
> > The attached patch makes it possible to pass a session keyring through to the
> > process spawned by call_usermodehelper().
>
> hm. Seems likely to attract angry emails due to breakage of out-of-tree
> stuff. Did you consider
>
> static inline int
> call_usermodehelper(char *path, char **argv, char **envp, int wait)
> {
> return call_usermodehelper_keys(path, argv, envp, NULL, wait);
> }
>

An alternative is to have the execve happen in a callback, similar to the
following patch I posted a couple months ago:

http://marc.theaimsgroup.com/?l=linux-kernel&m=109871749900732&w=2

IMHO, this is a better interface as it allows module writers to make arbitrary
changes.

(Some interface for allowing modules to 'safely' do execve is still required
though).

Mike Waychison