diff options
author | Gerald Carter <jerry@samba.org> | 2006-01-30 17:47:24 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-01-30 17:47:24 +0000 |
commit | 75914c57a3a08880ee30c0fc3137224e5da4e2cc (patch) | |
tree | c2f4dc9537fc3bf8ca94a30af040d8050cb57e93 | |
parent | b8cde8c16f32724910a7125ee7fd9b074297aefa (diff) | |
download | samba-75914c57a3a08880ee30c0fc3137224e5da4e2cc.tar.gz samba-75914c57a3a08880ee30c0fc3137224e5da4e2cc.tar.xz samba-75914c57a3a08880ee30c0fc3137224e5da4e2cc.zip |
r13232: defensive programming in an attempt to prevent crashes due to a PDC rebooting
-rw-r--r-- | source/nsswitch/winbindd_cm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 6ac2520f44d..2ac984176c6 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/nsswitch/winbindd_cm.c @@ -101,8 +101,8 @@ static void cm_get_ipc_userpass(char **username, char **domain, char **password) static BOOL get_dc_name_via_netlogon(const struct winbindd_domain *domain, fstring dcname, struct in_addr *dc_ip) { - struct winbindd_domain *our_domain; - struct rpc_pipe_client *netlogon_pipe; + struct winbindd_domain *our_domain = NULL; + struct rpc_pipe_client *netlogon_pipe = NULL; NTSTATUS result; TALLOC_CTX *mem_ctx; @@ -1306,7 +1306,9 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain, uint8 mach_pwd[16]; uint32 sec_chan_type; const char *account_name; - struct rpc_pipe_client *netlogon_pipe; + struct rpc_pipe_client *netlogon_pipe = NULL; + + *cli = NULL; result = init_dc_connection(domain); if (!NT_STATUS_IS_OK(result)) { |