nsswitch: allow passing the domain name to wbcPingDC[2]()
[obnox/samba/samba-obnox.git] / nsswitch / libwbclient / wbc_pam.c
index 11b59f6f30ce76b7d2acb4c43a77f80e88a76cac..e243538b818d31f66367081a88a77eff74b0e248 100644 (file)
@@ -639,18 +639,14 @@ wbcErr wbcPingDc2(const char *domain, struct wbcAuthErrorInfo **error,
        struct winbindd_response response;
        wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
 
-       if (domain) {
-               /*
-                * the current protocol doesn't support
-                * specifying a domain
-                */
-               wbc_status = WBC_ERR_NOT_IMPLEMENTED;
-               BAIL_ON_WBC_ERROR(wbc_status);
-       }
-
        ZERO_STRUCT(request);
        ZERO_STRUCT(response);
 
+       if (domain) {
+               strncpy(request.domain_name, domain,
+                       sizeof(request.domain_name)-1);
+       }
+
        /* Send request */
 
        wbc_status = wbcRequestResponse(WINBINDD_PING_DC,