From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] fix #3393: tools/xattr: allow xattr 'security.NTACL'
Date: Tue, 20 Apr 2021 11:19:53 +0200 [thread overview]
Message-ID: <20210420091953.26325-1-d.csapak@proxmox.com> (raw)
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 <d.csapak@proxmox.com>
---
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
next reply other threads:[~2021-04-20 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 9:19 Dominik Csapak [this message]
2021-04-21 12:53 ` [pbs-devel] applied: " Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210420091953.26325-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox