r17981: Hmmm. Don't break helper functions that don't need
authorJeremy Allison <jra@samba.org>
Fri, 1 Sep 2006 04:33:33 +0000 (04:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:39:45 +0000 (11:39 -0500)
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

index 1d89c1df33b93d6dacead010d24053fc057f4994..916763ad212564023bbaa0fd2646df302d0f7251 100644 (file)
@@ -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);