unexpected alarms
Ron Natalie
ron at BRL-TGR
Fri Jan 11 04:12:02 AEST 1985
All the manuals I have indicate that alarms are supposed to continue accross
execs. This is just an example of people who are writing set-uid code not
taking the time to think things out. Set-UID programs just have to be written
more robustly than non-setuid programs because of the implications. For example:
a few years ago, I managed to blow away /etc/passwd by closing down file
descriptor 1 before execing "passwd." It opens up /etc/passwd (coincidentally
on file 1) and then starts printing stuff on stdout, which is /etc/passwd.
Now I don't see anyone advocating changing it so setuid programs must return
numbers greater than 2 from open.
System Programmers Must Be Careful.
-Ron
Let the air out of your shoes and relax.
More information about the Comp.unix.wizards
mailing list