Author: jra Date: 2006-09-01 04:33:33 +0000 (Fri, 01 Sep 2006) New Revision: 17981
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17981 Log: Hmmm. Don't break helper functions that don't need the username by forcing it to be specified. Still split out domain \ user for the ones that do use it. Jeremy. Modified: branches/SAMBA_3_0/source/utils/ntlm_auth.c branches/SAMBA_3_0_23/source/utils/ntlm_auth.c Changeset: Modified: branches/SAMBA_3_0/source/utils/ntlm_auth.c =================================================================== --- branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-09-01 04:23:24 UTC (rev 17980) +++ branches/SAMBA_3_0/source/utils/ntlm_auth.c 2006-09-01 04:33:33 UTC (rev 17981) @@ -2274,11 +2274,7 @@ } } - if (!opt_username || !*opt_username) { - x_fprintf(x_stderr, "username must be specified!\n\n"); - poptPrintHelp(pc, stderr, 0); - exit(1); - } else { + if (opt_username) { char *domain = SMB_STRDUP(opt_username); char *p = strchr_m(domain, *lp_winbind_separator()); if (p) { @@ -2322,6 +2318,12 @@ exit(1); } + if (!opt_username || !*opt_username) { + x_fprintf(x_stderr, "username must be specified!\n\n"); + poptPrintHelp(pc, stderr, 0); + exit(1); + } + if (opt_challenge.length) { if (!check_auth_crap()) { exit(1); Modified: branches/SAMBA_3_0_23/source/utils/ntlm_auth.c =================================================================== --- branches/SAMBA_3_0_23/source/utils/ntlm_auth.c 2006-09-01 04:23:24 UTC (rev 17980) +++ branches/SAMBA_3_0_23/source/utils/ntlm_auth.c 2006-09-01 04:33:33 UTC (rev 17981) @@ -1816,11 +1816,7 @@ } } - if (!opt_username || !*opt_username) { - x_fprintf(x_stderr, "username must be specified!\n\n"); - poptPrintHelp(pc, stderr, 0); - exit(1); - } else { + if (opt_username) { char *domain = SMB_STRDUP(opt_username); char *p = strchr_m(domain, *lp_winbind_separator()); if (p) { @@ -1864,6 +1860,12 @@ exit(1); } + if (!opt_username || !*opt_username) { + x_fprintf(x_stderr, "username must be specified!\n\n"); + poptPrintHelp(pc, stderr, 0); + exit(1); + } + if (opt_challenge.length) { if (!check_auth_crap()) { exit(1);