Setuid(geteuid()), help

Tony Field tony at ajfcal.UUCP
Fri Jun 9 13:33:34 AEST 1989


Is there any way to do a   setuid(geteuid())   when geteuid() != 0  ???

System: Xenix 2.2.3/386.

I have a shell script that is running an effective uid of "news". The
script calls a process that has a real uid of a "user". The process can
create directories with mkdir that belong to "user", however it cannot
create a file.

If the process is setuid to root, then I can create the directores and
the files, however the owner becomes "root", and I would prefer the
owner be "news".

The shell script could pass it's uid to the process as a parameter, and
the process could do a "chown" however there must be a better way:  I would
prefer not to run setuid root.

thanks a bunch...        tony....
-- 
+------------------------------------
|  Tony Field                             ..uunet!utai!calgary!ajfcal!tony
|  Co-Design Information Systems Ltd.
|  Calgary, Alberta, Canada                 voice: (403) 266-3239



More information about the Comp.unix.xenix mailing list