]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: Add a new xattr system.smb3_ntsd_owner for getting or setting owner
authorPali Rohár <pali@kernel.org>
Mon, 14 Oct 2024 11:56:26 +0000 (13:56 +0200)
committerSteve French <stfrench@microsoft.com>
Tue, 1 Apr 2025 06:54:17 +0000 (01:54 -0500)
commitb1a37df6ba2f13be341130b9fe10649ef6a42e9a
tree706577be2b9b5d11c7316d8f38f38be51013a17f
parentbf782ada459efde8fe9a488cf30a40d32caf787f
cifs: Add a new xattr system.smb3_ntsd_owner for getting or setting owner

Changing owner is controlled by DACL permission WRITE_OWNER. Changing DACL
itself is controlled by DACL permisssion WRITE_DAC. Owner of the file has
implicit WRITE_DAC permission even when it is not explicitly granted for
owner by DACL.

Reading DACL or owner is controlled only by one permission READ_CONTROL.
WRITE_OWNER permission can be bypassed by the SeTakeOwnershipPrivilege,
which is by default available for local administrators.

So if the local administrator wants to access some file to which does not
have access, it is required to first change owner to ourself and then
change DACL permissions.

Currently Linux SMB client does not support this because client does not
provide a way to change owner without touching DACL permissions.

Fix this problem by introducing a new xattr "system.smb3_ntsd_owner" for
setting/changing only owner part of the security descriptor.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/xattr.c