[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac3eb2510905130720x38de25adxc83b10aea0b86ce1@mail.gmail.com>
Date: Wed, 13 May 2009 16:20:02 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: David Howells <dhowells@...hat.com>
Cc: Stephen Smalley <sds@...ho.nsa.gov>,
"David P. Quigley" <dpquigl@...ho.nsa.gov>,
Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
Greg KH <gregkh@...e.de>, Jan Blunck <jblunck@...e.de>,
James Morris <jmorris@...ei.org>,
Eric Paris <eparis@...isplace.org>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [patch 00/13] devtmpfs patches
On Wed, May 13, 2009 at 15:34, Kay Sievers <kay.sievers@...y.org> wrote:
>>> + kern_cred = prepare_kernel_cred(NULL);
>>
>> If you have no intention of altering the credentials you create, you might
>> want to use &init_cred instead of kern_cred. That said, you might want to
>> allocate it and let the security module alter it before you use it.
>
> Ah, didn't know that it was exported. It's the one in
> include/linux/init_task.h, right? I'll give that a try.
That seems to work fine here. Thanks a lot for the help.
Maybe we could do the same credential swap in sysfs, and get rid of:
/**
* lookup_one_noperm - bad hack for sysfs
* @name: pathname component to lookup
* @base: base directory to lookup from
*
* This is a variant of lookup_one_len that doesn't perform any permission
* checks. It's a horrible hack to work around the braindead sysfs
* architecture and should not be used anywhere else.
*
* DON'T USE THIS FUNCTION EVER, thanks.
*/
in fs/namei.c?
Seems a bit odd to have a vfs function for a single filesystem, called
from a single location, and annotated as "do not use". Christoph added
the comment a while ago, so adding him to Cc:.
Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists