diff options
author | Volker Lendecke <vl@samba.org> | 2018-12-11 17:17:46 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-12-20 23:40:25 +0100 |
commit | 59f29acb2cd947d2f594a5af3d73d0cbe8298d92 (patch) | |
tree | e7a559024d055a037432c891cd77d1cef655fff9 | |
parent | c45c6d09370a15021e0158a0356af84913b068f4 (diff) | |
download | samba-59f29acb2cd947d2f594a5af3d73d0cbe8298d92.tar.gz |
vfs: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
-rw-r--r-- | source3/modules/nfs4_acls.c | 14 | ||||
-rw-r--r-- | source3/modules/vfs_afsacl.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 6 |
3 files changed, 18 insertions, 8 deletions
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 19f0fefdb98..7776caa16d2 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -317,6 +317,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { uint32_t mask; struct dom_sid sid; + struct dom_sid_buf buf; SMB_ACE4PROP_T *ace = &aceint->prop; uint32_t win_ace_flags; @@ -349,7 +350,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, } } DEBUG(10, ("mapped %d to %s\n", ace->who.id, - sid_string_dbg(&sid))); + dom_sid_str_buf(&sid, &buf))); if (!is_directory && params->map_full_control) { /* @@ -655,7 +656,10 @@ static bool smbacl4_fill_ace4( SMB_ACE4PROP_T *ace_v4 /* output */ ) { - DEBUG(10, ("got ace for %s\n", sid_string_dbg(&ace_nt->trustee))); + struct dom_sid_buf buf; + + DEBUG(10, ("got ace for %s\n", + dom_sid_str_buf(&ace_nt->trustee, &buf))); ZERO_STRUCTP(ace_v4); @@ -738,7 +742,7 @@ static bool smbacl4_fill_ace4( DEBUG(1, ("nfs4_acls.c: file [%s]: could not " "convert %s to uid or gid\n", filename->base_name, - sid_string_dbg(&ace_nt->trustee))); + dom_sid_str_buf(&ace_nt->trustee, &buf))); return false; } } @@ -882,9 +886,11 @@ static struct SMB4ACL_T *smbacl4_win2nfs4( if (!smbacl4_fill_ace4(fsp->fsp_name, pparams, ownerUID, ownerGID, dacl->aces + i, &ace_v4)) { + struct dom_sid_buf buf; DEBUG(3, ("Could not fill ace for file %s, SID %s\n", filename, - sid_string_dbg(&((dacl->aces+i)->trustee)))); + dom_sid_str_buf(&((dacl->aces+i)->trustee), + &buf))); continue; } diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index d9be513d041..40071c85431 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -761,8 +761,9 @@ static bool nt_to_afs_acl(const char *filename, } if (!mappable_sid(&ace->trustee)) { + struct dom_sid_buf buf; DEBUG(10, ("Ignoring unmappable SID %s\n", - sid_string_dbg(&ace->trustee))); + dom_sid_str_buf(&ace->trustee, &buf))); continue; } @@ -791,8 +792,9 @@ static bool nt_to_afs_acl(const char *filename, if (!lookup_sid(talloc_tos(), &ace->trustee, &dom_name, &name, &name_type)) { + struct dom_sid_buf buf; DEBUG(1, ("AFSACL: Could not lookup SID %s on file %s\n", - sid_string_dbg(&ace->trustee), + dom_sid_str_buf(&ace->trustee, &buf), filename)); continue; } diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index a492c9d3627..b1c4acc482d 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1330,6 +1330,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle, * but I have to check that --metze */ struct dom_sid sid; + struct dom_sid_buf buf; uid_t uid; size_t sid_len; @@ -1349,11 +1350,12 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle, if (!sid_parse(_in_data + 4, sid_len, &sid)) { return NT_STATUS_INVALID_PARAMETER; } - DEBUGADD(10, ("for SID: %s\n", sid_string_dbg(&sid))); + DEBUGADD(10, ("for SID: %s\n", + dom_sid_str_buf(&sid, &buf))); if (!sid_to_uid(&sid, &uid)) { DEBUG(0,("sid_to_uid: failed, sid[%s] sid_len[%lu]\n", - sid_string_dbg(&sid), + dom_sid_str_buf(&sid, &buf), (unsigned long)sid_len)); uid = (-1); } |