diff options
author | Volker Lendecke <vl@samba.org> | 2018-12-08 15:37:21 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-12-11 00:40:31 +0100 |
commit | f4ee95517e37cd7c6bf2a3de87bfefb432204828 (patch) | |
tree | 17dc137ae675ec24d00a0b69cd339649181b34b1 | |
parent | bea43789bcb826006f38f2f96989953107dbbc74 (diff) | |
download | samba-f4ee95517e37cd7c6bf2a3de87bfefb432204828.tar.gz |
vfs: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/modules/vfs_acl_common.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_afsacl.c | 3 | ||||
-rw-r--r-- | source3/modules/vfs_nfs4acl_xattr.c | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 6c0d931bf43..5cc75ca99c0 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -813,6 +813,7 @@ static NTSTATUS set_underlying_acl(vfs_handle_struct *handle, files_struct *fsp, { NTSTATUS status; const struct security_token *token = NULL; + struct dom_sid_buf buf; status = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd); if (!NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) { @@ -840,7 +841,8 @@ static NTSTATUS set_underlying_acl(vfs_handle_struct *handle, files_struct *fsp, } DBG_DEBUG("overriding chown on file %s for sid %s\n", - fsp_str_dbg(fsp), sid_string_tos(psd->owner_sid)); + fsp_str_dbg(fsp), + dom_sid_str_buf(psd->owner_sid, &buf)); /* Ok, we failed to chown and we have SEC_STD_WRITE_OWNER access - override. */ diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index 54c9344a637..d9be513d041 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -814,10 +814,11 @@ static bool nt_to_afs_acl(const char *filename, } if (sidpts) { + struct dom_sid_buf buf; /* Expect all users/groups in pts as SIDs */ name = talloc_strdup( talloc_tos(), - sid_string_tos(&ace->trustee)); + dom_sid_str_buf(&ace->trustee, &buf)); if (name == NULL) { return false; } diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c index 0e52782075b..65387af2c0e 100644 --- a/source3/modules/vfs_nfs4acl_xattr.c +++ b/source3/modules/vfs_nfs4acl_xattr.c @@ -30,6 +30,7 @@ #include "system/filesys.h" #include "smbd/smbd.h" #include "libcli/security/security_token.h" +#include "libcli/security/dom_sid.h" #include "nfs4_acls.h" #include "librpc/gen_ndr/ndr_nfs4acl.h" #include "nfs4acl_xattr.h" @@ -372,6 +373,7 @@ static NTSTATUS nfs4acl_xattr_fset_nt_acl(vfs_handle_struct *handle, mode_t expected_mode; mode_t restored_mode; bool chown_needed = false; + struct dom_sid_buf buf; NTSTATUS status; int ret; @@ -467,7 +469,8 @@ static NTSTATUS nfs4acl_xattr_fset_nt_acl(vfs_handle_struct *handle, } DBG_DEBUG("overriding chown on file %s for sid %s\n", - fsp_str_dbg(fsp), sid_string_tos(psd->owner_sid)); + fsp_str_dbg(fsp), + dom_sid_str_buf(psd->owner_sid, &buf)); become_root(); status = smb_set_nt_acl_nfs4(handle, |