bug-coreutils
[Top][All Lists]
Advanced

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

Darwin - chmod broken? (was: What to do with 'make check'?)


From: mwoehlke
Subject: Darwin - chmod broken? (was: What to do with 'make check'?)
Date: Tue, 26 Sep 2006 17:39:14 -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:
  [for chmod/no-x]
  + mkdir -p a/b
  + cd a
  + chmod a-x . b
  + fail=1

This indicates that "chmod a-x . b" succeeded, but it should have
failed because it should have made "." unsearchable before attempting
to access "b" (aka "./b").  Again, can you please try to see what
system calls chmod is doing, with "ktrace -o /tmp/tr chmod a-x . b"?

You are looking for this, yes?
 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? Is chmod (the program) supposed to re-evaluate its permissions before calling chmod() the second time (if so, that's not happening), or is the second chmod() supposed to fail (which would mean the OS is buggy)? If I am reading 'man 2 chmod' right, the second chmod() is expected to fail with EACCES?

--
Matthew
Download. Untar. Configure. Make. Install. Lather. Rinse. Repeat.





reply via email to

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