X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=iyX nBSobXM2cuG48rXESxEV7dCKEKKqFHNzjUWDMk4Pzh4mhlY1dgkkiuYrJl3zu7Fp rJqQjAPaoHHbYdkK/5X4hzzPQyAHMzE5cysu5Yh0pywSlwcWexGz8VlbfWx0woJ/ wmQVHB0pq5bsUCUL6gO/YxcHXvfRpeLFmshSXUic= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=6BS1JOGYp tsf/3nv9CfOP/ffQtc=; b=mlI5p8iXS7xIBzB/Wxn002n32WcW4hwra4b1/xTb9 S6x45LppkWUaLzxepoz7QSzdnjEWqJpkJ3wY9hWjgBsqx2DfERCaSBAXZPqEa64k Z/ahM1FEf38riBOg91acxlc+rUsOKAyiwhI0x5eAI5YdQawZZci2ofEAQ3C+ZtHp ao= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS,T_FSL_HELO_BARE_IP_2,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: Achim Gratz Subject: LDAP integration / ACL in Perl revisited Date: Tue, 24 Jun 2014 12:18:59 +0000 (UTC) Lines: 57 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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