s3: Fill in workstation in winbindd_pam_auth_crap_send
authorVolker Lendecke <vl@samba.org>
Thu, 9 Sep 2010 01:09:07 +0000 (18:09 -0700)
committerVolker Lendecke <vl@samba.org>
Thu, 9 Sep 2010 04:19:24 +0000 (06:19 +0200)
source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_pam_auth_crap.c

index 47bcb6a8474b414c355994b1289bf24b33c7014f..eda812ef3cc7bb796c9e53a6baf696f0b7f65eed 100644 (file)
@@ -1690,16 +1690,11 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
 
        name_user = state->request->data.auth_crap.user;
        name_domain = state->request->data.auth_crap.domain;
+       workstation = state->request->data.auth_crap.workstation;
 
        DEBUG(3, ("[%5lu]: pam auth crap domain: %s user: %s\n", (unsigned long)state->pid,
                  name_domain, name_user));
 
-       if (*state->request->data.auth_crap.workstation) {
-               workstation = state->request->data.auth_crap.workstation;
-       } else {
-               workstation = global_myname();
-       }
-
        if (state->request->data.auth_crap.lm_resp_len > sizeof(state->request->data.auth_crap.lm_resp)
                || state->request->data.auth_crap.nt_resp_len > sizeof(state->request->data.auth_crap.nt_resp)) {
                if (!(state->request->flags & WBFLAG_BIG_NTLMV2_BLOB) ||
index d62c4aa209071e5b583a8814ea62fa11fc656759..d9f0273219f96d6437a032969cf312ac5aacae21 100644 (file)
@@ -80,6 +80,10 @@ struct tevent_req *winbindd_pam_auth_crap_send(
 
        fstrcpy(request->data.auth_crap.domain, domain->name);
 
+       if (request->data.auth_crap.workstation[0] == '\0') {
+               fstrcpy(request->data.auth_crap.workstation, global_myname());
+       }
+
        subreq = wb_domain_request_send(state, winbind_event_context(), domain,
                                        request);
        if (tevent_req_nomem(subreq, req)) {