Aucsfcgl.114 fa.unix-wizards utzoo!decvax!ucbvax!ucsfcgl!katzung Thu Aug 27 09:19:03 1981 xch[ug]id The idea of having xchuid() and xchgid() sounds reasonable to me. Would there be some advantage to using a single routine called, perhaps, useeid(x) where x = EUID and/or EGID, or 0 (no change)? The return value would be the old x. The reasons for this would be: 1) This would reduce the overhead to a single system call, and 2) A program would not lose track of how many times it had switched Es and Rs. (suppose a suid-not-root catches an interrupt...) Reason 2 can be ignored if xch[ug]id returns an indicator of some sort, but reason 1 still remains. Brian Katzung