From f5cc2b4807ac0f6c74933467f146a261e0269afb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Sep 2006 04:33:33 +0000 Subject: r17981: 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. (This used to be commit c097e107391cd97dd829c19b672b6a7adece504f) --- source3/utils/ntlm_auth.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/utils/ntlm_auth.c') diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 1d89c1df33..916763ad21 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2274,11 +2274,7 @@ enum { } } - 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 @@ enum { 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); -- cgit