Quoting Eric W. Biederman (ebiederm@xmission.com):> "Serge E. Hallyn" <serue@us.ibm.com> writes:> > > Quoting Greg KH (greg@kroah.com):> >> On Tue, Apr 20, 2010 at 08:29:08PM -0500, Serge E. Hallyn wrote:> >> > This is a driver that adds Plan 9 style capability device> >> > implementation. See Documentation/p9auth.txt for a description> >> > of how to use this.> >> > >> Hm, you didn't originally write this driver, so it would be good to get> >> some original authorship information in here to keep everything correct,> >> right?> >> > That's why I left the MODULE_AUTHOR line in there - not sure what> > else to do for that. I'll add a comment in p9auth.txt, especially> > pointing back to Ashwin's original paper.> >> >> > Documentation/p9auth.txt | 47 ++++> >> > drivers/char/Kconfig | 2 +> >> > drivers/char/Makefile | 2 +> >> > drivers/char/p9auth/Kconfig | 9 +> >> > drivers/char/p9auth/Makefile | 1 +> >> > drivers/char/p9auth/p9auth.c | 517 ++++++++++++++++++++++++++++++++++++++++++> >> > >> Is this code really ready for drivers/char/? What has changed in it> >> that makes it ok to move out of the staging tree?> >> >> > all.> >> >> And who is going to maintain it? You? Or someone else?> >> > If Ashwin doesn't want to maintain it, I'll do it. Either way.> >> >> > 1> >> > +contains a privileged root shell. Shell 2 contains an> >> > +unprivileged shell as user 501 in the same user namespace. If> >> > +not already done, the privileged shell should create the p9auth> >> > +devices:> >> > +> >> > + majfile=/sys/module/p9auth/parameters/cap_major> >> > + minfile=/sys/module/p9auth/parameters/cap_minor> >> > + maj=`cat $majfile`> >> > + mknod /dev/caphash c $maj 0> >> > + min=`cat $minfile`> >> > + mknod /dev/capuse c $maj 1> >> > + chmod ugo+w /dev/capuse> >> > >> That is incorrect, you don't need the cap_major/minor files at all, the> >> device node should be automatically created for you, right?> >> > Hmm, where? Not in /dev on my SLES11 partition...> >> >> And do you really want to do all of this control through a device node?> >> Why?> >> >> > that at some point our credentials will be changes, less so.> >BTW, this current version is user namespace aware.> that becomes necessary.An fs actually seems overkill for two write-only files forprocess-related information. Would these actually be candidatesfor new /proc files? /proc/grantcred - replaces /dev/caphash, for privileged tasks to tell the kernel about new setuid capabilities /proc/self/usecred - replaces /dev/capuse for unprivileged tasks to make use of a setuid capability-serge