r9396: ntlm_auth updates, including again support for the NTLMSSP client
authorAndrew Bartlett <abartlet@samba.org>
Thu, 18 Aug 2005 22:36:12 +0000 (22:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:33 +0000 (13:33 -0500)
mode, and specification of the workstation.

Andrew Bartlett
(This used to be commit 8f53d995c63b718b40fb52ec102fa74f94719b65)

source4/utils/ntlm_auth.c

index 35520756e71f4681f2182c94a8dd1583ec1f7294..7e1ca011e4914c0cba14783584d881c25ed14f73 100644 (file)
@@ -349,7 +349,9 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
                        cli_credentials_set_conf(creds);
                        if (opt_username) {
                                cli_credentials_set_username(creds, opt_username, CRED_SPECIFIED);
-                       } 
+                       } else {
+                               cli_credentials_set_username(creds, "", CRED_GUESSED);
+                       }
                        if (opt_domain) {
                                cli_credentials_set_domain(creds, opt_domain, CRED_SPECIFIED);
                        }
@@ -360,6 +362,9 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
                                creds->password_cb = get_password;
                                creds->priv_data = (void*)mux_id;
                        }
+                       if (opt_workstation) {
+                               cli_credentials_set_workstation(creds, opt_workstation, CRED_SPECIFIED);
+                       }
 
                        gensec_set_credentials(*gensec_state, creds);
 
@@ -498,7 +503,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
                }
        } else if ((*gensec_state)->gensec_role == GENSEC_CLIENT) {
                reply_code = "AF";
-               reply_arg = NULL;
+               reply_arg = out_base64;
        } else {
                abort();
        }
@@ -862,6 +867,7 @@ enum {
                { "password", 0, POPT_ARG_STRING, &opt_password, OPT_PASSWORD, "User's plaintext password"},            
                { "multiplex", 0, POPT_ARG_NONE, &opt_multiplex, OPT_MULTIPLEX, "Multiplex Mode"},
                POPT_COMMON_SAMBA
+               POPT_COMMON_VERSION
                POPT_TABLEEND
        };