Re: [AOLSERVER] Uid/Gid question in nsmain.c

2002-12-24 Thread Tom Jackson
If it is decided that the group command line switch should work, it look like we need a way of checking if a user is in a group before setting the group. I started playing around with this. It doesn't look like the AOLserver C API has the right group functions. It looks like the grp.h file would ne

Re: [AOLSERVER] Uid/Gid question in nsmain.c

2002-12-24 Thread Tom Jackson
Using garg, the gid is obtained. If this is less than zero, it is possible that a group number was provided on the command line. This is converted to an int with atoi. Only if the garg didn't correspond to a gid is the gid then tested to see if it is the root group (gid == 0), or as Jim said, atoi

Re: [AOLSERVER] Uid/Gid question in nsmain.c

2002-12-24 Thread Jim Davidson
In a message dated 12/24/2002 11:45:10 AM Eastern Standard Time, [EMAIL PROTECTED] writes: I'm looking at nsmain.c for the fun of it on Christmas Eve.  I don't understand the difference in the code between the gid and the uid. It seems like the gid has to be less than zero before it is converted t

Re: [AOLSERVER] Uid/Gid question in nsmain.c

2002-12-24 Thread No Name
The root of what's going on here is that both uarg and garg MAY be a username string or a groupname string.  If a username was supplied in uarg, then the name is translated to an int.  Also, a username will also yield a groupid (Ns_GetUserGid).  If it wasn't a name, Ns_GetUid returns -1, and the co

[AOLSERVER] Uid/Gid question in nsmain.c

2002-12-24 Thread Tom Jackson
I'm looking at nsmain.c for the fun of it on Christmas Eve. I don't understand the difference in the code between the gid and the uid. It seems like the gid has to be less than zero before it is converted to an int using atoi. Then it is compared to zero. In the uid case, the uid is always compare