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

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.