[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Darwin - chmod broken?
From: |
mwoehlke |
Subject: |
Re: Darwin - chmod broken? |
Date: |
Wed, 27 Sep 2006 11:03:48 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 |
Paul Eggert wrote:
mwoehlke <address@hidden> writes:
10487 chmod CALL chmod(0x2800600,0x1a4)
10487 chmod NAMI "."
10487 chmod RET chmod 0
10487 chmod CALL chmod(0x2800600,0x1a4)
10487 chmod NAMI "b"
10487 chmod RET chmod 0
10487 chmod CALL close(0x1)
10487 chmod RET close 0
10487 chmod CALL exit(0)
Does that look right?
No. It looks like your kernel is busted. The first chmod sets
the permissions of "." to 644, i.e., nobody can search it.
But the second chmod searches "." successfully.
Yup, that's what I'm seeing.
Are you running this test as root?
Nope.
If I am reading 'man 2 chmod' right, the second chmod() is expected
to fail with EACCES?
Yes, that's right. It looks like your operating system is buggy.
Wow... you ain't kidding...
$ ll -d . b
drwxr-xr-x 3 install sstest 512 Sep 27 08:26 .
drwxr-xr-x 2 install sstest 512 Sep 26 15:20 b
$ /bin/chmod a-x . b
$ ll -d . b
drw-r--r-- 3 install sstest 512 Sep 27 08:26 .
drw-r--r-- 2 install sstest 512 Sep 26 15:20 b
$ ll -d . b
drw-r--r-- 3 install sstest 512 Sep 27 08:26 .
drw-r--r-- 2 install sstest 512 Sep 26 15:20 b
$ chmod a+x .
chmod: changing permissions of `.': Permission denied
$ chmod a+x b
chmod: cannot access `b': Permission denied
$ /bin/chmod a+x .
chmod: .: Permission denied
$ ll -d . b
ls: .: Permission denied
ls: b: Permission denied
$
WTF just happened there?! :-)
Apparently the permissions are being cached and not flushed immediately
as far as access control, but are being returned accurately for 'ls'...
that's pretty messed up. So I guess this failure is a red herring at
least as far as anything being wrong with coreutils. Wow, that's a
broken OS/kernel/driver/one-of-the-above... (Might be the NFS driver,
since this didn't break when run on a local mount.)
Can you reproduce this bug with /bin/chmod?
Yup (See above).
I'll investigate the other failures, but if I can demonstrate that a:
the OS is broken, and b: the OS's version of the same utility is
similarly broken, I'll just leave my reports at that (unless someone
objects to this plan).
Anyway, thanks for all the help!
--
Matthew
The hippo made me do it! What? What do you mean you can't see the hippo?
- Re: What to do with 'make check'?, (continued)
- Re: What to do with 'make check'?, mwoehlke, 2006/09/26
- Re: What to do with 'make check'?, Paul Eggert, 2006/09/26
- Re: What to do with 'make check'?, mwoehlke, 2006/09/26
- Re: What to do with 'make check'?, Paul Eggert, 2006/09/26
- Dawrin- why does pinky SIGBUS (was: What to do with 'make check'?), mwoehlke, 2006/09/26
- Re: Dawrin- why does pinky SIGBUS, Paul Eggert, 2006/09/27
- Re: Dawrin- why does pinky SIGBUS, mwoehlke, 2006/09/27
- Re: Dawrin- why does pinky SIGBUS, Paul Eggert, 2006/09/27
- Darwin - chmod broken? (was: What to do with 'make check'?), mwoehlke, 2006/09/26
- Re: Darwin - chmod broken?, Paul Eggert, 2006/09/27
- Re: Darwin - chmod broken?,
mwoehlke <=
- Re: Darwin - chmod broken?, Jim Meyering, 2006/09/27