]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2018 16:17:46 +0000 (17:17 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 26 Aug 2019 10:23:24 +0000 (10:23 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
(cherry picked from commit 59f29acb2cd947d2f594a5af3d73d0cbe8298d92)

source3/modules/nfs4_acls.c
source3/modules/vfs_afsacl.c
source3/modules/vfs_default.c

index 19f0fefdb98e8a4215a948fb1e17a9b888b23272..7776caa16d29c3027728438336d540ca7a2ed0bb 100644 (file)
@@ -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;
                }
 
index 54c9344a637706172978f0db37e1fb0b181223df..a69a99e8d95b8cd7a6c57df1b0894547f239f451 100644 (file)
@@ -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;
                        }
index 7dfa335190c8e824d1d6cf2e7cdec5f421d78d67..8aaa991781ebe766efdba6e97ac24f07b4317ad3 100644 (file)
@@ -1324,6 +1324,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;
 
@@ -1343,11 +1344,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);
                }