wkssvc: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Thu, 13 Dec 2018 21:23:30 +0000 (22:23 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 20 Dec 2018 22:40:25 +0000 (23:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/rpc_server/wkssvc/srv_wkssvc_nt.c

index 82f5b972d747cf157517d1c9c7930b12502ccf92..f661833abe290c0b83a7438d5cf0eb223c2232dc 100644 (file)
@@ -345,6 +345,8 @@ static struct wkssvc_NetWkstaInfo102 *create_wks_info_102(TALLOC_CTX *mem_ctx)
 WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
                               struct wkssvc_NetWkstaGetInfo *r)
 {
+       struct dom_sid_buf buf;
+
        switch (r->in.level) {
        case 100:
                /* Level 100 can be allowed from anyone including anonymous
@@ -362,8 +364,9 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
                                 "101\n"));
                        DEBUGADD(3,(" - does not have sid for Authenticated "
                                    "Users %s:\n",
-                                   sid_string_dbg(
-                                           &global_sid_Authenticated_Users)));
+                                   dom_sid_str_buf(
+                                           &global_sid_Authenticated_Users,
+                                           &buf)));
                        security_token_debug(DBGC_CLASS, 3,
                                            p->session_info->security_token);
                        return WERR_ACCESS_DENIED;
@@ -381,7 +384,9 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
                                 "102\n"));
                        DEBUGADD(3,(" - does not have sid for Administrators "
                                    "group %s, sids are:\n",
-                                   sid_string_dbg(&global_sid_Builtin_Administrators)));
+                                   dom_sid_str_buf(
+                                           &global_sid_Builtin_Administrators,
+                                           &buf)));
                        security_token_debug(DBGC_CLASS, 3,
                                            p->session_info->security_token);
                        return WERR_ACCESS_DENIED;
@@ -563,10 +568,13 @@ WERROR _wkssvc_NetWkstaEnumUsers(struct pipes_struct *p,
        /* This with any level should only be allowed from a domain administrator */
        if (!nt_token_check_sid(&global_sid_Builtin_Administrators,
                                p->session_info->security_token)) {
+               struct dom_sid_buf buf;
                DEBUG(1,("User not allowed for NetWkstaEnumUsers\n"));
                DEBUGADD(3,(" - does not have sid for Administrators group "
-                           "%s\n", sid_string_dbg(
-                                   &global_sid_Builtin_Administrators)));
+                           "%s\n",
+                           dom_sid_str_buf(
+                                   &global_sid_Builtin_Administrators,
+                                   &buf)));
                security_token_debug(DBGC_CLASS, 3, p->session_info->security_token);
                return WERR_ACCESS_DENIED;
        }