Overview
| Artifact ID: | e43fca38285e69c3c467e315dbe478e695795d06 |
|---|---|
| Ticket: | 930225ffffffffffffffffffffffffffffffffff
access() - safe to use? |
| User & Date: | dkf on 2004-04-06 16:36:42 |
Changes
- icomment:
Logged In: YES user_id=79902 Which OS states this in its manpages? The security problems of access() only really bite when running setuid/setgid, since you otherwise go through the same set of checks internally when you manipulate the file with open(), etc. Luckily, that's not a normal configuration of Tcl so we can ignore it for now. The alternatives are to stat() and check the permissions on the file ourselves (which has exactly the same security problems) or open the file and either check the result or do an fstat(), which has its own set of problems (especially when writing a file.) Everything gets *much* more complex when you use AFS or some other filesystem with ACLs, and it turns out that the access(2) manpage on RH9 is wrong (as access() checks ACLs) and is therefore not replacable with any *stat() based solution. I think the only "fix" is to warn people writing scripts that run setuid/setgid to be very careful. And beware of scaremongering manual pages.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"