+ max_protocol = lp_client_max_protocol();
+ max_protocol = MIN(max_protocol, PROTOCOL_NT1);
+
+ if (!got_pass) {
+ char pwd[256] = {0};
+ int rc;
+
+ rc = samba_getpass("Password: ", pwd, sizeof(pwd), false, false);
+ if (rc == 0) {
+ fstrcpy(password, pass);
+ }
+ }
+
+ test_creds = cli_session_creds_init(frame,
+ username,
+ lp_workgroup(),
+ NULL, /* realm */
+ password,
+ false, /* use_kerberos */
+ false, /* fallback_after_kerberos */
+ false, /* use_ccache */
+ false); /* password_is_nt_hash */
+ if (test_creds == NULL) {
+ d_printf("cli_session_creds_init() failed.\n");
+ exit(1);
+ }