Patch from Andrew Bartlett <abartlet@samba.org> for security=server core
authorJeremy Allison <jra@samba.org>
Mon, 10 Nov 2003 19:33:40 +0000 (19:33 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 10 Nov 2003 19:33:40 +0000 (19:33 +0000)
dump if server goes away.
Jeremy.
(This used to be commit a646cb60a24498451d379967a1da272fcd40875f)

source3/auth/auth_server.c

index 30e0e13a56e9f5999340d0e5a5c755219d71f395..b57293943c039346b24053419d1d9e41b3fbeaaa 100644 (file)
@@ -153,14 +153,16 @@ static void free_server_private_data(void **private_data_pointer)
 
 static void send_server_keepalive(void **private_data_pointer) 
 {
-       struct cli_state **cli = (struct cli_state **)private_data_pointer;
-       
        /* also send a keepalive to the password server if its still
           connected */
-       if (cli && *cli && (*cli)->initialised) {
-               if (!send_keepalive((*cli)->fd)) {
-                       DEBUG( 2, ( "password server keepalive failed.\n"));
-                       cli_shutdown(*cli);
+       if (private_data_pointer) {
+               struct cli_state *cli = (struct cli_state *)(*private_data_pointer);
+               if (cli && cli->initialised) {
+                       if (!send_keepalive(cli->fd)) {
+                               DEBUG( 2, ( "send_server_keepalive: password server keepalive failed.\n"));
+                               cli_shutdown(cli);
+                               *private_data_pointer = NULL;
+                       }
                }
        }
 }