From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9655 invoked by alias); 24 Jun 2014 12:19:20 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 9636 invoked by uid 89); 24 Jun 2014 12:19:19 -0000 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 Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 24 Jun 2014 12:19:18 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WzPgv-0007Bo-UK for cygwin@cygwin.com; Tue, 24 Jun 2014 14:19:13 +0200 Received: from 217.10.52.10 ([217.10.52.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 14:19:13 +0200 Received: from Stromeko by 217.10.52.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2014 14:19:13 +0200 To: cygwin@cygwin.com From: Achim Gratz Subject: LDAP integration / ACL in Perl revisited Date: Tue, 24 Jun 2014 12:19:00 -0000 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 X-SW-Source: 2014-06/txt/msg00379.txt.bz2 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