mirror of
https://github.com/samba-team/samba.git
synced 2025-12-06 16:23:49 +03:00
Ensure all callers to the rpc_client/cli_pipe functions correctly
initialize return variables. Jeremy.
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user