libwbclient: implement secure channel verification for specific domains in wbcCheckTr...
authorGünther Deschner <gd@samba.org>
Tue, 6 Oct 2009 15:45:24 +0000 (17:45 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 7 Oct 2009 09:18:03 +0000 (11:18 +0200)
Guenther

nsswitch/libwbclient/wbc_pam.c
nsswitch/libwbclient/wbclient.h

index 33044b2df74f7a0df1abf0bf7fb6b34d0be3b72c..4cd212a34aefd09e4696bce7c587f3e3c73bafb8 100644 (file)
@@ -502,18 +502,14 @@ wbcErr wbcCheckTrustCredentials(const char *domain,
        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_CHECK_MACHACC,
index a87cad3b219667f958b3937bbd1a2379af9f4973..4dc6d23dfc8731fff015a76b7010704d868eeff0 100644 (file)
@@ -1183,9 +1183,7 @@ wbcErr wbcResolveWinsByIP(const char *ip, char **name);
 /**
  * @brief Trigger a verification of the trust credentials of a specific domain
  *
- * @param *domain      The name of the domain, only NULL for the default domain is
- *                     supported yet. Other values than NULL will result in
- *                     WBC_ERR_NOT_IMPLEMENTED.
+ * @param *domain      The name of the domain.
  * @param error        Output details on WBC_ERR_AUTH_ERROR
  *
  * @return #wbcErr