Skip to content

cifs: Fix gettting and setting parts of security descriptor

Pali Rohár linux-cifs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cifs: Fix getting and setting SACLs over SMB1fs/smb/client/cifsacl.c fs/smb/client/cifsproto.h fs/smb/client/cifssmb.c+17 -121 reply
2/4cifs: Change ->get_acl() API callback to request only for asked infofs/smb/client/cifsacl.c fs/smb/client/cifssmb.c fs/smb/client/smb2pdu.c +1 more+15 -110 replies
3/4cifs: Add a new xattr system.smb3_ntsd_sacl for getting or setting SACLsfs/smb/client/xattr.c+18 -00 replies
4/4cifs: Add a new xattr system.smb3_ntsd_owner for getting or setting ownerfs/smb/client/xattr.c+19 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] cifs: Fix gettting and setting parts of security descriptor

This patch series fixes getting and setting SACLs over all SMB dialects (SMB1, SMB2, SMB3) under different conditions (including the case when user does not have granted access to READ DACLs, but has privilege to access and change SACLs) and allows to change ownership of files by users who have special privilege for it, without accessing DACLs.

As for each part of security descriptor (OWNER+GROUP, DACL, SACL) is needed different permission and every user can have different access rights and privileges, it is needed to have more granularity when changing security descriptor.

Therefore this patch series introduce a new xattrs to change just SACL (system.smb3_ntsd_sacl) or just OWNER/GROUP (system.smb3_ntsd_owner).

So with this patch series there are xattrs:
- system.smb3_acl - DACL only
- system.smb3_ntsd_sacl - SACL only (new one)
- system.smb3_ntsd_owner - OWNER and GROUP only (new one)
- system.smb3_ntsd - OWNER, GROUP, DACL
- system.smb3_ntsd_full - OWNER, GROUP, DACL, SACL

Pali Rohár (4):
cifs: Fix getting and setting SACLs over SMB1
cifs: Change ->get_acl() API callback to request only for asked info
cifs: Add a new xattr system.smb3_ntsd_sacl for getting or setting
SACLs
cifs: Add a new xattr system.smb3_ntsd_owner for getting or setting
owner

 fs/smb/client/cifsacl.c   | 27 ++++++++++++---------
 fs/smb/client/cifsproto.h |  2 +-
 fs/smb/client/cifssmb.c   |  5 ++--
 fs/smb/client/smb2pdu.c   |  4 +---
 fs/smb/client/xattr.c     | 49 ++++++++++++++++++++++++++++++++++++---
 5 files changed, 66 insertions(+), 21 deletions(-)
Signature · 1 line
2.20.1