delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/12/19/08:04:09

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:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; q=
dns; s=default; b=A4XBASLd1i7HsliTUiMX6X3gBVO2ZUejS278VAPN4gVasw
3Gr7b9PK+4yz49tqtbxWC0IR4iEjqQLmW2py6dKAXZbAwdps5xst8OpWHpOLAwml
gjOEjef8WpoWp9fmtD7KCJgwwn1Tv74/QZfjSxmp0g4IbXMgOWvZgfjPuTE9g=
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:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; s=
default; bh=OjcgqV7+MQvmlZSZgQlyumofsd8=; b=aYIxNbHb9wsPopV+vnXS
vxW9CdzzOeHZX6VdPm/IH7yV9eP9lgSff3l1jADT8+ZGeTG7qwaj3am214TlqBLs
O01okEmLm3n3EakfiXEMUQV/D0rAHNNyLW8L5zR69NV8lwY+87EXrsdEgjSZW2S6
2I+J7Ss+Uof+n4sKX93V0i4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=acl, ACL, setfacl, deny
X-HELO: lb1-smtp-cloud3.xs4all.net
MIME-Version: 1.0
Date: Sat, 19 Dec 2015 14:03:47 +0100
From: Houder <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
Subject: setfacl(2.4.0): colon missing after x (opts string)?
Message-ID: <1a02ff09135c3348ca91c9cc96228095@xs4all.nl>
X-Sender: houder AT xs4all DOT nl (XfeaNraL8MvyoWnfL8Z4Gw==)
User-Agent: XS4ALL Webmail

Hi Corinna,

setfacl(2.4.0) does not accept -x <acl_entry> (-d <acl_entry> is 
accepted).

Looking at the source of setfacl.c, I believe a colon is missing after x 
in
the opts string (const char *opts).

Regards,
Henri

newlib-cygwin-2.4.0/gnewlib-cygwin-2.4.0/newlib-cygwin/winsup/utils/setfacl.c

shows:

struct option longopts[] = {
   {"remove-all", no_argument, NULL, 'b'},
   {"delete", required_argument, NULL, 'x'},
   {"file", required_argument, NULL, 'f'},
   {"remove-default", no_argument, NULL, 'k'},
   {"modify", required_argument, NULL, 'm'},
   {"no-mask", required_argument, NULL, 'n'},
   {"mask", required_argument, NULL, '\n'},
   {"replace", no_argument, NULL, 'r'},
   {"substitute", required_argument, NULL, 's'},
   {"help", no_argument, NULL, 'h'},
   {"version", no_argument, NULL, 'V'},
   {0, no_argument, NULL, 0}
};
const char *opts = "bd:f:hkm:nrs:Vx"; <==== colon missing after x ?????

static void
print_version ()
...

-----
64-%% uname -a
CYGWIN_NT-6.1 Seven 2.4.0(0.292/5/3) 2015-12-17 23:10 x86_64 Cygwin

64-%% touch bar.txt
64-%% setfacl -n -m g:Replicator:r-- bar.txt
64-%% icacls bar.txt
bar.txt NULL SID:(DENY)(Rc,S,X,DC)
         Seven\Henri:(R,W,D,WDAC,WO)
         Seven\None:(R)
         BUILTIN\Replicator:(R)
         Everyone:(R)

Successfully processed 1 files; Failed processing 0 files

64-%% setfacl -n -x g:Replicator: bar.txt  # remove it again ...
setfacl: No such file or directory         <==== euh?
64-%% setfacl -n -d g:Replicator: bar.txt
64-%% icacls bar.txt
bar.txt NULL SID:(DENY)(Rc,S,X,DC)
         Seven\Henri:(R,W,D,WDAC,WO)
         Seven\None:(R)
         Everyone:(R)

Successfully processed 1 files; Failed processing 0 files

-----
64-%% setfacl --help
Usage: setfacl [-n] {-f ACL_FILE | -s acl_entries} FILE...
        setfacl [-n] {[-bk]|[-x acl_entries] [-m acl_entries]} FILE...

Modify file and directory access control lists (ACLs)

   -b, --remove-all       remove all extended ACL entries
   -x, --delete           delete one or more specified ACL entries
...

At least one of (-b, -x, -f, -k, -m, -s) must be specified <==== REMOVE 
-x here

   Acl_entries are one or more comma-separated ACL entries from the 
following
   list:

     u[ser]::perm
     u[ser]:uid:perm
     g[roup]::perm
     g[roup]:gid:perm
     m[ask]:perm
     o[ther]:perm
...

-x, --delete
   Delete one or more specified entries from the file's ACL.  The owner, 
group
   and others entries must not be deleted.  Acl_entries to be deleted 
should
   be specified without permissions, as in the following list:

     u[ser]:uid[:]
     g[roup]:gid[:]
     m[ask][:]
     d[efault]:u[ser][:uid]
     d[efault]:g[roup][:gid]
     d[efault]:m[ask][:]
     d[efault]:o[ther][:]

=====

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019