On Sunday 30 March 2008 16:56, Bernd Petrovitsch wrote:
> On Fre, 2008-03-28 at 17:27 +0100, Denys Vlasenko wrote:
> [...]
> > How can root use safely copy a file to user-owned directory?
> > 
> > Obviously, "cp somefile /home/user/somefile"
> >
> > What will happen if user created malicious symlink
> > /home/user/somefile -> /dev/sda? Should cp STILL write to
> > symlink's target despite it being dangerous?
> 
> Not necessarily - it could point to some harmless file (still being
> owned by that user).
> 
> Why not "rm /home/user/somefile" before he "cp" if one absolutely cares?

People who insist on "cp file /dev/something" acting as
"cat file >/dev/something" will scream murder and will hunt you,
and unfortunately they will have big heavy books with "POSIX"
on them as weapons. Lost fight.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to