setuid() in Xenix 2.3.2

Samuel Lam skl at van-bc.UUCP
Wed Oct 11 01:24:20 AEST 1989


Could some setuid() or Xenix expert please help?

I am trying to port the letest (Rick Adams) version of the Berkeley FTP
server to run on SCO Xenix 386 2.3.2 and need to imitate the seteuid()
calls in the code with setuid()'s, since Xenix doesn't have seteuid().

What I need to be able to do is essentially the following:

 - Start with euid(root).
 - ...
 - Switch to euid(arbitrary_uid).
 - ...
 - Revert back to euid(root).
 - ...

Through the course of the program, the real uid can either remain
root or switches following the euid.

I have already spent part of the night trying out various schemes
which I thought would work, but none of them did -- I always had
trouble switching back to root after switching to the arbitrary
uid.  Could someone tell me how this is done?

Thank you very much for your help.

...Sam
-- 
Samuel Lam     <skl at wimsey.bc.ca> or {uunet,ubc-cs}!wimsey.bc.ca!skl



More information about the Comp.unix.wizards mailing list