ntlm_auth: Use libwbclient in winbind_separator()
authorVolker Lendecke <vl@samba.org>
Sat, 15 Jul 2017 08:52:17 +0000 (10:52 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 17 Nov 2017 23:09:16 +0000 (00:09 +0100)
Avoid direct winbindd_request_response()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/ntlm_auth.c

index 5a10e27719f8b05d099d0728687c6a093ffd25bb..faba67c3b292c72ed901deb64cfaa3fd77b9facf 100644 (file)
@@ -280,24 +280,24 @@ static void gensec_want_feature_list(struct gensec_security *state, char* featur
 
 static char winbind_separator(void)
 {
-       struct winbindd_response response;
+       struct wbcInterfaceDetails *details;
+       wbcErr ret;
        static bool got_sep;
        static char sep;
 
        if (got_sep)
                return sep;
 
-       ZERO_STRUCT(response);
-
-       /* Send off request */
-
-       if (winbindd_request_response(NULL, WINBINDD_INFO, NULL, &response) !=
-           NSS_STATUS_SUCCESS) {
+       ret = wbcInterfaceDetails(&details);
+       if (!WBC_ERROR_IS_OK(ret)) {
                d_fprintf(stderr, "could not obtain winbind separator!\n");
                return *lp_winbind_separator();
        }
 
-       sep = response.data.info.winbind_separator;
+       sep = details->winbind_separator;
+
+       wbcFreeMemory(details);
+
        got_sep = True;
 
        if (!sep) {