Re: Proposal "LUID"

Albert D. Cahalan (acahalan@cs.uml.edu)
Sat, 15 Apr 2000 12:12:22 -0400 (EDT)


>> 1) init should start up with LUID==-1 (it's not a valid login ID).
>
> Our UID space is unsigned.

kernel$ grep uid * | grep -- -1
sys.c: if (ruid != (uid_t) -1) {
sys.c: if (euid != (uid_t) -1) {
sys.c: if (ruid != (uid_t) -1 ||
sys.c: (euid != (uid_t) -1 && euid != old_ruid))
sys.c: if ((ruid != (uid_t) -1) && (ruid != current->uid) &&
sys.c: if ((euid != (uid_t) -1) && (euid != current->uid) &&
sys.c: if ((suid != (uid_t) -1) && (suid != current->uid) &&
sys.c: if (ruid != (uid_t) -1) {
sys.c: if (euid != (uid_t) -1) {
sys.c: if (suid != (uid_t) -1)

Well then, "(uid_t) -1" if you prefer. C doesn't seem to care much,
at least on two's-complement hardware.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/