From: Volker Lendecke Date: Sat, 8 Dec 2018 14:37:21 +0000 (+0100) Subject: vfs: Use dom_sid_str_buf X-Git-Tag: tdb-1.3.17~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ee95517e37cd7c6bf2a3de87bfefb432204828;p=thirdparty%2Fsamba.git vfs: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- 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,