Messages in this thread | | | From | Kay Sievers <> | Date | Wed, 13 May 2009 16:20:02 +0200 | Subject | Re: [patch 00/13] devtmpfs patches |
| |
On Wed, May 13, 2009 at 15:34, Kay Sievers <kay.sievers@vrfy.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |