This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fstat weirdness


Around line 182 of fhandler-disk_file.cc there is this strange
comment:
  /* Check a special case here. If ntsec is ON it happens
     that a process creates a file using mode 000 to disallow
     other processes access. In contrast to UNIX, this results
     in a failing open call in the same process. Check that
     case. */
I have looked up cvs and the ChangeLogs to find its origin,
without success.

The comment is strange because this section runs after a query_open
has failed for access reasons. Such failure ONLY happens if there is
no access_allowed ACE (even without any rights) for the current user
nor one of his/her groups. Thus it can't happen when the file was
created by Cygwin (as implied in the comment), because Cygwin
always adds ACEs for the owner and for everyone (even with mode 000).

The only way I can get this code to be activated is by going out
of Cygwin to remove all ACEs, e.g. to provide opaqueness, and then 
doing an ls.
The current code then modifies the ACL and removes the opaqueness.

Is there a strong reason to do so? Otherwise I don't think it's desirable 
behavior for fstat to modify a file in any way, and I volunteer to patch
this code away.

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]