sharesec: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Sat, 8 Dec 2018 14:20:36 +0000 (15:20 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 10 Dec 2018 23:40:30 +0000 (00:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/sharesec.c

index 375ae582ae547e32e069d4b40ff8b8713ad3c619..1342af14a6ee4a535c26742a7446ed08fea4019e 100644 (file)
@@ -222,8 +222,9 @@ static int change_share_sec(TALLOC_CTX *mem_ctx, const char *sharename, char *th
                }
 
                if (!found) {
+                   struct dom_sid_buf buf;
                    printf("ACL for SID %s not found\n",
-                          sid_string_tos(&sd->dacl->aces[i].trustee));
+                          dom_sid_str_buf(&sd->dacl->aces[i].trustee, &buf));
                }
            }
 
@@ -428,13 +429,14 @@ int main(int argc, const char *argv[])
 
        if ( initialize_sid ) {
                struct dom_sid *sid = get_global_sam_sid();
+               struct dom_sid_buf buf;
 
                if ( !sid ) {
                        fprintf( stderr, "Failed to retrieve Machine SID!\n");
                        return 3;
                }
 
-               printf ("%s\n", sid_string_tos( sid ) );
+               printf ("%s\n", dom_sid_str_buf(sid, &buf) );
                return 0;
        }