bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed tests compiling tcl8.4a1 on SuSE6.4 Linux - need guidance


From: Don Porter
Subject: Re: Failed tests compiling tcl8.4a1 on SuSE6.4 Linux - need guidance
Date: Mon, 2 Oct 2000 23:16:13 -0400

Dan Kuchler  <address@hidden> wrote:
> Interestingly, on Linux you can execute /bin/pwd in the directory that
> has permissions 000
>
> Does anyone know why linux made this decision (I assume it was
> a concious decision made by someone to do things different).

I'm not sure of that.  I don't see any indication in the source
code for the GNU C library that this was done intentionally.

According to the source code

        <URL: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/
        sysdeps/unix/sysv/linux/getcwd.c?rev=1.17&content-type=text/
        x-cvsweb-markup&cvsroot=glibc>

recent Linux kernels have a /proc file system, where the working
directory of a process is available as the target of the symbolic
link /proc/self/cwd .  The getcwd() uses a readlink() on that to get
the working directory without even checking permissions on the working
directory itself.

I don't see any comment in the source or the CVS log entries that this
end-run around the permissions of the directory was intended, or even
recognized. 

I tried checking the GNATS database to see if this is known, but
I can't connect, so I'm CC'ing this Usenet post to the mailing
list <address@hidden>.

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| address@hidden             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]