s3: Check password server loop earlier
authorVolker Lendecke <vl@samba.org>
Sun, 29 May 2011 07:16:32 +0000 (09:16 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 29 May 2011 10:49:33 +0000 (12:49 +0200)
We do that in the loop for the ip address anyway

source3/auth/auth_server.c

index 3334fde9bb231dff05dc8c031c0f9c3b6f1e85cc..46905c0a5b996673b8fa539993932865b5cee246 100644 (file)
@@ -64,6 +64,12 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
                }
                strupper_m(desthost);
 
+               if (strequal(desthost, myhostname())) {
+                       DEBUG(1,("Password server loop - disabling "
+                                "password server %s\n", desthost));
+                       continue;
+               }
+
                if(!resolve_name( desthost, &dest_ss, 0x20, false)) {
                        DEBUG(1,("server_cryptkey: Can't resolve address for %s\n",desthost));
                        continue;
@@ -110,10 +116,6 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
                return NULL;
        }
 
-       if (strequal(desthost,myhostname())) {
-               exit_server_cleanly("Password server loop!");
-       }
-
        DEBUG(3,("got session\n"));
 
        status = cli_negprot(cli);