From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DFDA67531E for ; Wed, 21 Apr 2021 14:53:52 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C83F0F51D for ; Wed, 21 Apr 2021 14:53:22 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 16536F511 for ; Wed, 21 Apr 2021 14:53:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D70B14620E for ; Wed, 21 Apr 2021 14:53:20 +0200 (CEST) Date: Wed, 21 Apr 2021 14:53:19 +0200 From: Wolfgang Bumiller To: Dominik Csapak Cc: pbs-devel@lists.proxmox.com Message-ID: <20210421125319.q3r2fpemlovsvgg6@wobu-vie.proxmox.com> References: <20210420091953.26325-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210420091953.26325-1-d.csapak@proxmox.com> User-Agent: NeoMutt/20180716 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.625 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [samba.org, xattr.rs] Subject: [pbs-devel] applied: [PATCH proxmox-backup] fix #3393: tools/xattr: allow xattr 'security.NTACL' X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 12:53:52 -0000 considering the reason behind not storing all of the 'security' namespace is simply the possible special semantics, and this one, at least to my knowledge, not actually having one, I think this is fine applied On Tue, Apr 20, 2021 at 11:19:53AM +0200, Dominik Csapak wrote: > in some configurations, samba stores NTFS-ACLs in this xattr[0], so > we should backup (if we can) > > altough the 'security' namespace is special (e.g. in use by > selinux, etc.) this value is normally only used by samba and we > should be able to back it up. > > to restore it, the user needs at least 'CAP_SYS_ADMIN' rights, otherwise > it cannot be set > > 0: https://www.samba.org/samba/docs/current/man-html/vfs_acl_xattr.8.html > > Signed-off-by: Dominik Csapak > --- > tested here by setting it manually with setfattr and restored > successfully as root (as user i got a permission denied warning) > > src/tools/xattr.rs | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/tools/xattr.rs b/src/tools/xattr.rs > index 6b712d14..500af326 100644 > --- a/src/tools/xattr.rs > +++ b/src/tools/xattr.rs > @@ -170,6 +170,10 @@ pub fn is_valid_xattr_name(c_name: &CStr) -> bool { > if name.starts_with(b"user.") || name.starts_with(b"trusted.") { > return true; > } > + // samba saves windows ACLs there > + if name == b"security.NTACL" { > + return true; > + } > is_security_capability(c_name) > } > > -- > 2.20.1