Quantcast

kernel coding of nobody/nogroup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

kernel coding of nobody/nogroup

Rick Macklem
Hi,

I need to set the default uid/gid values for nobody/nogroup into kernel
variables. I reverted the commit that hardcoded them, since I agree that
wasn't a good thing to do.

I didn't realize that "nobody" was already defined in sys/conf.h and I can
use that.

There is no definition for "nogroup" in sys/conf.h.
Would it be ok to add
#define GID_NOGROUP  65533
to syy/conf.h?
(I know bde@ doesn't like expressing this as 65533, but that is what it is in /etc/group.)

rick
ps: These values are usually set by nfsuserd(8), but need to be initialized for the case
       where is in not being run. The default uid/gid in nfsuserd.c needs to be fixed too,
       although they only get used if there isn't an entry for nobody/nogroup in the
       password/group database.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: kernel coding of nobody/nogroup

Bruce Evans-4
On Fri, 21 Apr 2017, Rick Macklem wrote:

> I need to set the default uid/gid values for nobody/nogroup into kernel
> variables. I reverted the commit that hardcoded them, since I agree that
> wasn't a good thing to do.
>
> I didn't realize that "nobody" was already defined in sys/conf.h and I can
> use that.

I didn't know nobody was already there either.  They are only used by zfs,
while the others were originally only sed for devices.

> There is no definition for "nogroup" in sys/conf.h.
> Would it be ok to add
> #define GID_NOGROUP  65533
> to syy/conf.h?
> (I know bde@ doesn't like expressing this as 65533, but that is what it is in /etc/group.)

sys/conf.h already has GID_NOBODY but it is subtly different from
GID_NOGROUP.  It seems to be a bug that zfs uses nobody's gid instead
of the gid nogroup which is used by no body.

Bruce
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Loading...