delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/08/26/23:32:44

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=Z+qFII
QMH2TweCjPlOSzGznw2JVFsZp7kHv7ecxP9OVQP8pBORWQjex7h6ccJOeZMCrMAF
nazG0BotWi+McvvrGbt6AJkZt8+pIm+CoQsetk8dlgxhooE1a+cQBNJx6BN1LfJz
moKc1hS+xsF1aDonzqiWZjuxzFsbU7f4FguEU=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; s=default; bh=fvH3/08aGVh3
0rvbcEQVNY8JBU4=; b=OYAE5Vz+1qGull945iwoJk32hukl3zThZHjCEbXwg4uE
TdLRGOShHPGdJ+dWIJ2kODzQGqqJrIjcFiXGtocgjTKEmeg1rg7Zbmq+TGZtHQ8p
BxYwVPQlJg8/MWGCSXfY39Qm8PBVV0HOkYPcRvPS93zWQtjvicGon62yp+DJ0aA=
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-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2 autolearn=ham version=3.3.2 spammy=puts, H*r:192.168.3, numerically, sid
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <5B8370CA.5080209@tlinx.org>
Date: Sun, 26 Aug 2018 20:32:26 -0700
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: incompat in cygwin choice of using '+' as domain and user separator.
References: <5B7DE56E DOT 6060109 AT tlinx DOT org> <20180823081135 DOT GN3348 AT calimero DOT vinschen DOT de>
In-Reply-To: <20180823081135.GN3348@calimero.vinschen.de>
X-IsSubscribed: yes

--------------030504060300060206000608
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 8/23/2018 1:11 AM, Corinna Vinschen wrote:
...
> No, that's a wrong assumption.  Think about it.  The ACL given to
> acl_to_text is the binary form, so it doesn't contain user or group
> names, only uids and gids.  The usernames are only generated in the
> output.
---
	Rats.  Of course, you're right.  
	Then I nominate the problem being that it can't convert 
from domain "Unknown"-user + "Unknown"-group to something it can 
store in tar.  I'll try to elaborate.  

lsacl is an output massager that mainly compacts output of 
getfacl into a 1 line form as used by the linux chacl format 
for environments where chacl was missing (like cygwin and some linux
machines).  It's a fairly trivial script (attached), feel free
to do whatever w/it.

As far as duplication, I have /etc/passwd+/etc/group files that 
mirror my accounts on the linux-based PDC (samba 3.x).

so when lsacl puts out:
> lsacl miner.js
[u::rwx,g::rwx,o:r-x,u:Unknown+User:rwx,g:Unknown+Group:rwx,g:Administrators:rwx,g:Bliss\Domain Admins:rwx,m:rwx/] miner.js

then getfacl puts out:

> getfacl miner.js
# file: miner.js
# owner: Bliss\law
# group: Bliss\Domain Admins
user::rwx
group::rwx
other:r-x
user:Unknown+User:rwx
group:Unknown+Group:rwx
group:Administrators:rwx
group:Bliss\Domain Admins:rwx
mask:rwx

or numerically:

> getfacl -n miner.js
# file: miner.js
# owner: 5013
# group: 512
user::rwx
group::rwx
other:r-x
user:4294967295:rwx
group:4294967295:rwx
group:544:rwx
group:512:rwx
mask:rwx

In this case, that user+group appear to correspond
to non-existent users. (S-1-5-21-oldsystem-ID-1001 + -1005).
The domain/system part appears to be from some previous
value for the machine's "sid"?  Not sure how to deliberately
reproduce that, but maybe you have a tool to create an
invalid acl entry for a user like: 
Unknown+User:*:4294967295:4294967295:S-1-5-21-3457732827-2369206082-2151550420-1001
in /etc/passwd.
and something similar in /etc/group?


I can fairly easily work around it by just deleting the
invalid user/group from the GUI.

The icacls output on the file with some added line breaks 
(from D:PAI to S:P was all 1 line).

miner.js
D:PAI(A;;0x1f01bf;;;S-1-5-21-33-77-33-5013)(A;;0x1201bf;;;DA)
(A;;0x1200a9;;;WD)(A;;0x1201ff;;;S-1-5-21-33-77-33-5013)
(A;;0x1201ff;;;SY)(A;;0x1201ff;;;BA)(A;;0x1200a9;;;WD)
(A;;FA;;;S-1-5-21-33-77-33-5013)
(A;;0x1201ff;;;S-1-5-21-3457732827-2369206082-2151550420-1001)
(A;;0x1201ff;;;DA)
(A;;0x1201ff;;;S-1-5-21-3457732827-2369206082-2151550420-1005)S:P

I can work around this for the small number of files that were weird, but it seems cygwin should "more gracefully" handle such things if it can(?).

I wonder if rsync has a similar problem...yup:

> rsync -aA miner.js ../testbin/  
rsync: set_acl: sys_acl_set_file(miner.js, ACL_TYPE_ACCESS): Invalid argument (22)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]





--------------030504060300060206000608
Content-Type: text/plain;
 name="lsacl"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="lsacl"

IyEvYmluL2Jhc2ggCgojIyAkSWQ6IGxzYWNsLHYgMS41IDIwMTUtMDgtMDIg
MTA6Mjk6MjUtMDcgbGF3IEV4cCAkCiMgVmVyc2lvbiAyIC0tIHRyeSB0byB3
b3JrIHdpdGggZ2V0ZmFjbCBvbiBjeWd3aW4KIwoKCnNob3B0IC1zIGV4cGFu
ZF9hbGlhc2VzCmFsaWFzIGludD1kZWNsYXJlXCAtaQkJc3ViPWZ1bm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CXN0cmluZyBmYWNsPSQoZ2ZhY2wgLWEgIiRmbiJ8c2VkIC1yICIk
czEifHRyICJcbiIgIiwiKQoJZmFjbD0ke2ZhY2wlLH0KCXN0cmluZyBkYWNs
PSQoZ2ZhY2wgLWQgIiRmbiJ8c2VkIC1yICJzL15kZWZhdWx0Oi8vOyAkczEi
fHRyICJcbiIgIiwiKQoJZGFjbD0ke2RhY2wlLH0KCXByaW50ZiAiWyVzLyVz
XVxuIiAiJGZhY2wiICIkZGFjbCIKfQoKCgppbnQgYWNsbGVuPTAgbWF4Zm5s
bj0wCiNmb3IgZm4gaW4gIiRAIiA7IGRvIGlmICgobWF4Zm5sbjwkeyNmbn0p
KTsgdGhlbiBtYXhmbmxuPSR7I2ZufTsgZmkgOyBkb25lCgpzdWIgYWNsX3N0
ciAoKSB7CglpZiBjeWd3aW4gO3RoZW4gCgkJcGVybT0kKGZhY2wyc3RyICIk
Zm4iKQoJZWxzZSAKCQlxZm49JChwcmludGYgIiVxICIgIiRmbiIpCgkJb3V0
PSIkKGNoYWNsIC1sICIkZm4iKSIKCQlwZXJtPSIke291dCMkcWZufSIKCWZp
CglwcmludGYgIiVzXG4iICIkcGVybSIKfQoKCmZvciBmbiBpbiAiJEAiOyBk
bwoJaW50IG1heD00MAoJcGVybT0kKGFjbF9zdHIgIiRmbiIpCglpbnQgbGVu
PSR7I3Blcm19CglpZiAoKGxlbj5fYWNsX2xlbl8pKTsgdGhlbiBhY2xsZW49
bGVuOyBmaQoJaWYgKChhY2xsZW4+bWF4KSk7CQl0aGVuIGFjbGxlbj1tYXg7
IGZpCglwcmludGYgIiUtJHthY2xsZW59cyAlc1xuIiAiJHBlcm0iICIkZm4i
CmRvbmUK


--------------030504060300060206000608
Content-Type: text/plain; charset=us-ascii


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

- Raw text -


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