home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
- From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
- Newsgroups: comp.os.linux
- Subject: Re: Broken symlinks ?? (followup)
- Message-ID: <1992Aug31.125539.5089@klaava.Helsinki.FI>
- Date: 31 Aug 92 12:55:39 GMT
- References: <1992Aug31.054608.2405@athena.mit.edu>
- Organization: University of Helsinki
- Lines: 21
-
- In article <1992Aug31.054608.2405@athena.mit.edu> hammond@kwhpc.caseng.com writes:
- >
- >0.97 seems to fail if the actual executable is owned by root and has a mode of
- >711 (or actually, any mode that does not include read permission). If the executable
- >is owned by a non-root user, things do work correctly. Is this some sort of security
- >measure in the kernel? Maybe I (or anyone else) should look at the kernel code to
- >find out!
-
- It's a bug in 0.97.pl2, but I've corrected it already, and pl3 (out next
- weekend) will take care of it. The problem is that the current symlink
- code wants read-permissions to the file the symlink points to, due to me
- not thinking all the changes through when I updated to the better
- namei() routines in patch2.
-
- The interim solution while waiting for patch3 is to make all executables
- or directories that are pointed to by symlinks world readable, and the
- problem should go away. In case somebody wants to correct in in their
- kernel, the place to look at is fs/open.c and fs/namei.c - you should
- move the permission check from open_namei() to sys_open().
-
- Linus
-