summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_netlogond.c12
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/include/proto.h13
-rw-r--r--source3/libsmb/libsmb_dir.c2
-rw-r--r--source3/libsmb/libsmb_server.c4
-rw-r--r--source3/libsmb/passchange.c4
-rw-r--r--source3/libsmb/trusts_util.c2
-rw-r--r--source3/rpc_client/cli_pipe.c4
-rw-r--r--source3/utils/net_ads.c4
-rw-r--r--source3/utils/net_rpc_shell.c2
-rw-r--r--source3/utils/net_util.c2
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbtree.c2
13 files changed, 21 insertions, 34 deletions
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index 8c930a552a9..ebfed83d41e 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -31,8 +31,8 @@ static NTSTATUS netlogond_validate(TALLOC_CTX *mem_ctx,
struct netr_SamInfo3 **pinfo3,
NTSTATUS *schannel_bind_result)
{
- struct rpc_pipe_client *p;
- struct cli_pipe_auth_data *auth;
+ struct rpc_pipe_client *p = NULL;
+ struct cli_pipe_auth_data *auth = NULL;
struct netr_SamInfo3 *info3 = NULL;
NTSTATUS status;
@@ -158,14 +158,14 @@ static NTSTATUS check_netlogond_security(const struct auth_context *auth_context
{
TALLOC_CTX *frame = talloc_stackframe();
struct netr_SamInfo3 *info3 = NULL;
- struct rpc_pipe_client *p;
- struct cli_pipe_auth_data *auth;
+ struct rpc_pipe_client *p = NULL;
+ struct cli_pipe_auth_data *auth = NULL;
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
- char *plaintext_machinepw;
+ char *plaintext_machinepw = NULL;
uint8_t machine_password[16];
uint8_t schannel_key[16];
NTSTATUS schannel_bind_result, status;
- struct named_mutex *mutex;
+ struct named_mutex *mutex = NULL;
const char *ncalrpcsock;
ncalrpcsock = lp_parm_const_string(
diff --git a/source3/client/client.c b/source3/client/client.c
index 435ede904ed..6a3e73c710e 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3668,7 +3668,7 @@ static void browse_fn(const char *name, uint32 m,
static bool browse_host_rpc(bool sort)
{
NTSTATUS status;
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
TALLOC_CTX *frame = talloc_stackframe();
WERROR werr;
struct srvsvc_NetShareInfoCtr info_ctr;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2dc0c83e022..0eb5815f641 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5287,23 +5287,10 @@ unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
struct cli_pipe_auth_data **presult);
-NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
- enum pipe_auth_type auth_type,
- enum dcerpc_AuthLevel auth_level,
- const char *domain,
- const char *username,
- const char *password,
- struct cli_pipe_auth_data **presult);
NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain,
enum dcerpc_AuthLevel auth_level,
struct netlogon_creds_CredentialState *creds,
struct cli_pipe_auth_data **presult);
-NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
- enum dcerpc_AuthLevel auth_level,
- const char *service_princ,
- const char *username,
- const char *password,
- struct cli_pipe_auth_data **presult);
NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
const struct ndr_syntax_id *abstract_syntax,
struct rpc_pipe_client **presult);
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 6a4613c3c3d..73bbf82861e 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -267,7 +267,7 @@ net_share_enum_rpc(struct cli_state *cli,
struct srvsvc_NetShareCtr1 ctr1;
fstring name = "";
fstring comment = "";
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
NTSTATUS nt_status;
uint32_t resume_handle = 0;
uint32_t total_entries = 0;
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index db9d6de40f1..a572acde960 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -713,8 +713,8 @@ SMBC_attr_server(TALLOC_CTX *ctx,
{
int flags;
struct sockaddr_storage ss;
- struct cli_state *ipc_cli;
- struct rpc_pipe_client *pipe_hnd;
+ struct cli_state *ipc_cli = NULL;
+ struct rpc_pipe_client *pipe_hnd = NULL;
NTSTATUS nt_status;
SMBCSRV *srv=NULL;
SMBCSRV *ipc_srv=NULL;
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index 570a048502c..e8c412be46b 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -28,8 +28,8 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
char **err_str)
{
struct nmb_name calling, called;
- struct cli_state *cli;
- struct rpc_pipe_client *pipe_hnd;
+ struct cli_state *cli = NULL;
+ struct rpc_pipe_client *pipe_hnd = NULL;
struct sockaddr_storage ss;
char *user, *domain, *p;
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 5dda3c52dde..e127c9a67be 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -142,7 +142,7 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
struct sockaddr_storage dc_ss;
uint32 enum_ctx = 0;
struct cli_state *cli = NULL;
- struct rpc_pipe_client *lsa_pipe;
+ struct rpc_pipe_client *lsa_pipe = NULL;
bool retry;
struct lsa_DomainList dom_list;
int i;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index deada5acb27..da54fca85d3 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -3093,7 +3093,7 @@ static int cli_auth_ntlmssp_data_destructor(struct cli_pipe_auth_data *auth)
return 0;
}
-NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
enum pipe_auth_type auth_type,
enum dcerpc_AuthLevel auth_level,
const char *domain,
@@ -3213,7 +3213,7 @@ static int cli_auth_kerberos_data_destructor(struct kerberos_auth_struct *auth)
}
#endif
-NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
+static NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx,
enum dcerpc_AuthLevel auth_level,
const char *service_princ,
const char *username,
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 10873cacbd8..031a338835d 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1626,8 +1626,8 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
ADS_STRUCT *ads;
ADS_STATUS rc;
const char *servername, *printername;
- struct cli_state *cli;
- struct rpc_pipe_client *pipe_hnd;
+ struct cli_state *cli = NULL;
+ struct rpc_pipe_client *pipe_hnd = NULL;
struct sockaddr_storage server_ss;
NTSTATUS nt_status;
TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish");
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 5e0f1503712..39ef1cedcd0 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -69,7 +69,7 @@ static NTSTATUS net_sh_run(struct net_context *c,
int argc, const char **argv)
{
TALLOC_CTX *mem_ctx;
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
NTSTATUS status;
mem_ctx = talloc_new(ctx);
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index d0d1fc04214..eaa2125e34f 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -28,7 +28,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c,
const char **ret_name, DOM_SID *ret_sid,
enum lsa_SidType *ret_type)
{
- struct rpc_pipe_client *lsa_pipe;
+ struct rpc_pipe_client *lsa_pipe = NULL;
struct policy_handle pol;
NTSTATUS result = NT_STATUS_OK;
const char **dom_names;
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index dfc2a92031d..eefe4fe77ce 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -70,7 +70,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
char **domain, char **name)
{
uint16 orig_cnum = cli->cnum;
- struct rpc_pipe_client *p;
+ struct rpc_pipe_client *p = NULL;
struct policy_handle handle;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 02001f0abbd..717ce650068 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -148,7 +148,7 @@ static bool get_rpc_shares(struct cli_state *cli,
void *state)
{
NTSTATUS status;
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
TALLOC_CTX *mem_ctx;
WERROR werr;
struct srvsvc_NetShareInfoCtr info_ctr;