This is the mail archive of the cygwin 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]

LDAP integration / ACL in Perl revisited


I've just set up a new machine with Cygwin (64bit w/ the 2014-06-23 13:20:35
snapshot), nsswitch.conf specifies "db" for both passwd and group (the files
have been moved away just to be sure they aren't picked up).  I have one
share with somewhat strange ACL that I always had to use via a "noacl" mount
option.  I thought I should try again and this is what happened (bla is a
file that has non-zero size and is owned by me):

(1014) > getfacl bla
# file: bla
# owner: gratz
# group: Domain Users
user::---
group::---
group:+Authenticated Users:rwx
mask:rwx
other:---

(1015) > [ -r bla ] && echo Hello...
Hello...
(1018) > perl -E 'say -R "bla" ? "yes" : "no"'
no
(1016) > perl -E 'say -r "bla" ? "yes" : "no"'
no
(1017) > perl -E 'say -O "bla" ? "yes" : "no"'
yes


So for whatever reason Perl still doesn't deal correctly with those ACL,
while the shell test operator does.  Now the kicker: if I run Perl under
strace, the test succeeds... huh?

   26  556465 [main] perl 5712 path_conv::check: this->path(\\share\bla),
has_acls(1)
   34  556499 [main] perl 5712 build_fh_pc: fh 0x18032C9F0, dev 000000C3
   27  556526 [main] perl 5712 stat_worker: (\??\UNC\share\bla, 0x600039498,
0x18032C9F0), file_attributes 32
12380  568906 [main] perl 5712 fhandler_base::fstat_helper: 0 = fstat
(\??\UNC\share\bla, 0x600039498) st_size=228, st_mode=0x81A4,
st_ino=8320105424607096594st_atim=53A96650.28F3A48 st_ctim=528DB9A1.13F33938
st_mtim=528DB9A1.4EE2D30 st_birthtim=528DB9A1.44615F0
   66  568972 [main] perl 5712 stat_worker: 0 = (\??\UNC\share\bla,0x600039498)
 3210  572182 [main] perl 5712 fhandler_pty_slave::write: pty0,
write(0x600082E00, 4)
   27  572209 [main] perl 5712 fhandler_pty_slave::write: (656): pty
output_mutex (0x184): waiting -1 ms
   24  572233 [main] perl 5712 fhandler_pty_slave::write: (656): pty
output_mutex: acquired
yes


Incredibly, this also works with the original script that led me onto this
hunt.  It runs a lot slower with all that stracing going on of course.

Ideas?

Regards,
Achim.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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