Cheers,
Mark
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 to an
int using atoi. Then it is compared to zero. In the uid case, the uid is
always compared to zero.
Merry Christmas!
if (garg != NULL) {
gid = Ns_GetGid(garg);
if (gid <0) {
gid = atoi(garg);
if (gid == 0) {
Ns_Fatal("nsmain: invalid group '%s'", garg);
}
}
}
if (uarg != NULL) {
uid = Ns_GetUid(uarg);
gid = Ns_GetUserGid(uarg);
if (uid <0) {
uid = atoi(uarg);
}
if (uid == 0) {
Ns_Fatal("nsmain: invalid user '%s'", uarg);
}
}