diff options
author | Gerald Carter <jerry@samba.org> | 2006-01-30 17:47:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:19 -0500 |
commit | d44ad5687990fef1ffb9dca845103509188f15a3 (patch) | |
tree | e17f90fe901161cd2d1f8487fab69a39a1bf6712 | |
parent | 8724ea7ef51923fbd7f79dc3b070f0d462d78ac6 (diff) | |
download | samba-d44ad5687990fef1ffb9dca845103509188f15a3.tar.gz samba-d44ad5687990fef1ffb9dca845103509188f15a3.tar.bz2 samba-d44ad5687990fef1ffb9dca845103509188f15a3.zip |
r13232: defensive programming in an attempt to prevent crashes due to a PDC rebooting
(This used to be commit 994794383361cfe5d58098ae494489fb0164e1df)
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 6ac2520f44..2ac984176c 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/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)) { |