Solaris looks at the file permissions only, not the owner, to
determine whether the filename can be deleted in a sticky directory.
This is the case even for symlinks, so if you create a symlink in
/tmp, then I, or any other user, can delete that symlink. This is not
a feature that Linux should copy!
>For example, on OSF/1 4.x "tar x.." doesn't lchown() symlinks to the
>original owner when invoked as root.
>From the version number, I presume that's DEC OSF/1?
Some OSF/1 variants still don't have lchown. At least one variant
allows you to chown symlinks if and only if they are dangling. Yuck.
> This dark corner in commercial UNIXes needs to be cleaned up but that's
> not our task :-)
You won't get any argument from me there.
Personally I'd like the Linux sticky semantics to stay as they are. I
think they give the user the least surprise. Programs that create
world-writable lock files in /tmp are actually quite common, even on
systems where anyone can delete such files; Linux gives the user some
protection from broken programs that use these files.
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/