diff options
author | Jeremy Allison <jra@samba.org> | 2003-11-10 19:33:40 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-11-10 19:33:40 +0000 |
commit | 912289bd489f70eea345d89dff32f03bd8b8916b (patch) | |
tree | 393c10b68f277e022b69c8f1aaea676a6940cc8b /source3/auth/auth_server.c | |
parent | 649f7d749de3f09dca8415fadf1efb3d74f57e0f (diff) | |
download | samba-912289bd489f70eea345d89dff32f03bd8b8916b.tar.gz samba-912289bd489f70eea345d89dff32f03bd8b8916b.tar.bz2 samba-912289bd489f70eea345d89dff32f03bd8b8916b.zip |
Patch from Andrew Bartlett <abartlet@samba.org> for security=server core
dump if server goes away.
Jeremy.
(This used to be commit a646cb60a24498451d379967a1da272fcd40875f)
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r-- | source3/auth/auth_server.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 30e0e13a56..b57293943c 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -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; + } } } } |