Symlink security...

James Mastros (root@jennifer-unix.dyn.ml.org)
Sat, 24 Jan 1998 22:21:39 -0500 (EST)


I'm currently writing a patch to have owners and permissions effect
symlinks...

Here are the semantics I'm looking at:
read -- allow readlink
write -- can change the destination
execute -- can follow

I am uncertian what meening the sticky bit should have (if any), and I'm not
going to attempt to implement setuid/setgid, as I would probably introduce
security holes...

I have some questions:
1) How is a link written to (in userspace)? (Is there any way to do so, at
present, without removing the link and recreating it?)
2) Should I change chmod to not follow links, or should I make a lchown call?

-=- James Mastros