summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-01 04:33:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:39:45 -0500
commitf5cc2b4807ac0f6c74933467f146a261e0269afb (patch)
tree884e8b9664eea5bbf091487e5973ba9ff501cc09 /source3
parent037eac706537110437b51a166cdb258a136cb626 (diff)
downloadsamba-f5cc2b4807ac0f6c74933467f146a261e0269afb.tar.gz
samba-f5cc2b4807ac0f6c74933467f146a261e0269afb.tar.bz2
samba-f5cc2b4807ac0f6c74933467f146a261e0269afb.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/ntlm_auth.c12
1 files changed, 7 insertions, 5 deletions
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);