SYS V unlink() call
Daniel R. Levy
levy at ttrdc.UUCP
Sat Mar 1 13:49:55 AEST 1986
<Oh oh here it comes. Watch out boy, it'll chew you up! \
Oh oh here it comes. The LINE EATER! [Line eater]>
In article <1019 at brl-smoke.ARPA>, gwyn at brl-smoke.UUCP writes:
>> My question is this: In SYSV do you have* to be SU
>> to unlink directories?
>Yes, insofar as the unlink() system call is concerned.
>(Ditto for making links to directories.) This should
>be true for any UNIX that does not supply special
>directory system calls.
>> Does that mean that to delete *any* directory the program
>> must be set uid'ed to root?
>No, you can always use something like:
> system( "rm directory-name" );
>"rm", or a set-UID subprocess "rmdir" that it might
>invoke, has the necessary privilege.
Surely you mean "rm -r directory-name" or even better "rm -rf directory-name".
Just system("rm directory-name") will evince the diagnostic:
rm: directory-name directory
to stderr.
--
------------------------------- Disclaimer: The views contained herein are
| dan levy | yvel nad | my own and are not at all those of my em-
| an engihacker @ | ployer or the administrator of any computer
| at&t computer systems division | upon which I may hack.
| skokie, illinois |
-------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
vax135}!ttrdc!levy
More information about the Comp.unix.wizards
mailing list