frodo@wcom.UUCP (Jim Scardelis) (04/11/85)
It seems that under my "System III" Xenix system, the suid() call doesn't work if the user is already root. Is this normal? Proper? It causes me problems because I only have one outside line, and have to manually disable it before I can dial out, and if I crank up a uucico as root, then any directories, etc., that uucico creates, belong to root instead of uucp. Is there any solution other than going back to a non-superuser status before running uucico? Jim Scardelis -- uucp: {vax135|ihnp4}!timeinc!wcom!frodo ARPA: 1891@NJIT-EIES.MAILNET@MIT-MULTICS.ARPA "The opinions expressed herein are those of my computer, and not necessarily those of myself, Warner Computer Systems, or any other computer or company along the line. "
guy@sun.uucp (Guy Harris) (04/13/85)
> It seems that under my "System III" Xenix system, the suid() call doesn't > work if the user is already root. Is this normal? Proper? Do you mean the set-UID bit, or the "setuid()" system call? If the former, "setuid()" had better work if the user is root. If the latter, then no, it is neither normal nor proper. Standard System III (and System V, and also 4.2BSD) honor the set-UID bit even if the process is running as "root"; this was probably done for the very reason you mention - that many set-UID programs want to run with the specified UID even if by "root" happens to run them. Microsoft may have taken a V7 system and converted it into a System III system (which isn't too hard; no, they are NOT radically different versions of UNIX!), but missed the change to the handling of set-UID (when we did our System III UNIX at CCI, we did it the same way, and missed the set-UID change; I stuck it in later). > Is there any solution other than going back to a non-superuser status > before running uucico? Unfortunately, no. You could write a tiny program which resets the UID and executes "/usr/lib/uucp/uucico.rl" or somesuch, and move "/usr/lib/uucp/uucico" to "/usr/lib/uucp/uucico.rl". The 4.2BSD UUCP, which was originally the Research Triangle Institute UUCP (i.e., it wasn't just for 4.2BSD, which *does* handle set-UID properly) set the UID to "uucp"s UID if it was run as root, to handle this very problem. Guy Harris sun!guy