union netr_Validation *validation)
{
NTSTATUS nt_status;
- struct netr_SamBaseInfo *base;
+ struct netr_SamBaseInfo *base = NULL;
switch (validation_level) {
- case 2:
- if (!validation || !validation->sam2) {
- return NT_STATUS_INVALID_PARAMETER;
- }
- base = &validation->sam2->base;
+ case 2:
+ if (!validation || !validation->sam2) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ base = &validation->sam2->base;
break;
- case 3:
- if (!validation || !validation->sam3) {
- return NT_STATUS_INVALID_PARAMETER;
- }
- base = &validation->sam3->base;
+ case 3:
+ if (!validation || !validation->sam3) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ base = &validation->sam3->base;
break;
- case 6:
- if (!validation || !validation->sam6) {
- return NT_STATUS_INVALID_PARAMETER;
- }
- base = &validation->sam6->base;
+ case 6:
+ if (!validation || !validation->sam6) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ base = &validation->sam6->base;
break;
+ default:
+ return NT_STATUS_INVALID_LEVEL;
}
nt_status = make_server_info(mem_ctx, server_info, internal_username);
return NULL;
} else {
char **matches;
- int i, len, samelen, count=1;
+ int i, len, samelen = 0, count=1;
matches = (char **)malloc(sizeof(matches[0])*MAX_COMPLETIONS);
if (!matches) return NULL;
int result = LDAP_SUCCESS;
struct samdb_context *samdb;
struct ldb_message **res;
- int i, j, y, count;
+ int i, j, y, count = 0;
enum ldb_scope scope = LDB_SCOPE_DEFAULT;
const char **attrs = NULL;
const char *errstr = NULL;
struct ldapsrv_reply *add_reply;
int ldb_ret;
struct samdb_context *samdb;
- struct ldb_message *msg;
+ struct ldb_message *msg = NULL;
int result = LDAP_SUCCESS;
const char *errstr = NULL;
int i,j;
struct ldapsrv_reply *modify_reply;
int ldb_ret;
struct samdb_context *samdb;
- struct ldb_message *msg;
+ struct ldb_message *msg = NULL;
int result = LDAP_SUCCESS;
const char *errstr = NULL;
int i,j;
struct ldb_message **res;
const char *attrs[1];
const char *errstr = NULL;
- const char *filter;
+ const char *filter = NULL;
int count;
local_ctx = talloc_named(call, 0, "sldb_Compare local_memory_context");
struct samdb_context *samdb;
const char *errstr = NULL;
int result = LDAP_SUCCESS;
- const char *newdn;
+ const char *newdn = NULL;
char *parentdn = NULL;
local_ctx = talloc_named(call, 0, "sldb_ModifyDN local memory context");
WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct dcom_interface_p ***ip, WERROR *results)
{
- struct dcom_interface_p *factory, *iunk;
+ struct dcom_interface_p *factory, *iunk = NULL;
struct QueryInterface qr;
struct Release rr;
struct CreateInstance cr;
{
char *parent_name;
char *last;
- struct registry_key *root;
+ struct registry_key *root = NULL;
WERROR error;
parent_name = strdup(key->path);
DWORD i;
DWORD offset = 0;
RGDB_KEY *rgdb_key = LOCN_RGDB_KEY((CREG *)k->hive->backend_data, rgkn_key->id.rgdb, rgkn_key->id.id);
- RGDB_VALUE *curval;
+ RGDB_VALUE *curval = NULL;
if(!rgdb_key) return WERR_FOOBAR;
{
/* Complete command */
char **matches;
- int i, len, samelen, count=1;
+ int i, len, samelen=0, count=1;
matches = (char **)malloc(sizeof(matches[0])*MAX_COMPLETIONS);
if (!matches) return NULL;
recv_sign_const = CLI_SIGN;
recv_seal_const = CLI_SEAL;
break;
+ default:
+ return NT_STATUS_INTERNAL_ERROR;
}
/**
union smb_sesssetup s2;
DATA_BLOB session_key = data_blob(NULL, 0);
DATA_BLOB null_data_blob = data_blob(NULL, 0);
- const char *chosen_oid;
+ const char *chosen_oid = NULL;
s2.generic.level = RAW_SESSSETUP_SPNEGO;
s2.spnego.in.bufsize = session->transport->options.max_xmit;
NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding, struct epm_tower *tower)
{
- const enum epm_protocols *protseq;
+ const enum epm_protocols *protseq = NULL;
int num_protocols = -1, i;
NTSTATUS status;
NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd,
struct pvfs_filename *name)
{
- dev_t device;
- ino_t inode;
+ dev_t device = 0;
+ ino_t inode = 0;
if (name->exists) {
device = name->st.st_dev;
*/
static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct RemoteActivation *r)
{
- struct CreateInstance *cr;
+ struct CreateInstance *cr = NULL;
/*struct Release *ur;*/
- struct dcom_interface_p *o;
+ struct dcom_interface_p *o = NULL;
int i;
/* FIXME: CoGetClassObject() */
union smb_fileinfo finfo;
const char *fname = "\\torture_denydos.txt";
NTSTATUS status;
- int fnum1, fnum2;
+ int fnum1 = -1, fnum2 = -1;
BOOL ret = True;
union smb_setfileinfo sfinfo;
TALLOC_CTX *mem_ctx;
struct smbcli_state *cli1;
const char *fname = "\\lockt7.lck";
int fnum1;
- int fnum2;
+ int fnum2 = -1;
size_t size;
char buf[200];
BOOL correct = False;
BOOL torture_dcom_simple(void)
{
NTSTATUS status;
- struct dcerpc_pipe *p;
+ struct dcerpc_pipe *p = NULL;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
struct GUID IID[2];
union smb_open io;
const char *fname = BASEDIR "\\sd.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_ace ace;
union smb_open io;
const char *fname = BASEDIR "\\creator.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_descriptor *sd, *sd_orig, *sd2;
printf("set a sec desc allowing no write by owner\n");
sd = security_descriptor_create(mem_ctx,
- NULL, NULL,
+ owner_sid, NULL,
owner_sid,
SEC_ACE_TYPE_ACCESS_ALLOWED,
SEC_RIGHTS_FILE_READ | SEC_STD_ALL,
union smb_open io;
const char *fname = BASEDIR "\\generic.txt";
BOOL ret = True;
- int fnum, i;
+ int fnum = -1, i;
union smb_fileinfo q;
union smb_setfileinfo set;
struct security_descriptor *sd, *sd_orig, *sd2;
union smb_open io;
const char *fname = BASEDIR "\\ea.txt";
BOOL ret = True;
- int fnum;
+ int fnum = -1;
printf("TESTING SETFILEINFO EA_SET\n");
union smb_rename io;
NTSTATUS status;
BOOL ret = True;
- int fnum;
+ int fnum = -1;
const char *fname1 = BASEDIR "\\test1.txt";
const char *fname2 = BASEDIR "\\test2.txt";
union smb_open op;
const char *fname = BASEDIR "\\stream.txt";
const char *sname1, *sname2;
BOOL ret = True;
- int fnum;
+ int fnum = -1;
ssize_t retsize;
sname1 = talloc_asprintf(mem_ctx, "%s:%s", fname, "Stream One");
struct netr_LogonSamLogonEx *r_ex = &samlogon_state->r_ex;
struct netr_LogonSamLogonWithFlags *r_flags = &samlogon_state->r_flags;
struct netr_NetworkInfo ninfo;
-
- struct netr_SamBaseInfo *base;
-
- uint16 validation_level;
+ struct netr_SamBaseInfo *base = NULL;
+ uint16 validation_level = 0;
samlogon_state->r.in.logon.network = &ninfo;
samlogon_state->r_ex.in.logon.network = &ninfo;
struct samr_Connect4 r4;
struct policy_handle connect_handle, user_handle;
struct policy_handle builtin_handle, domain_handle;
- struct dom_sid *domain_sid;
+ struct dom_sid *domain_sid = NULL;
struct dom_sid *user_sid;
struct dom_sid *primary_group_sid;
int argc_new;
const char **argv_new;
TALLOC_CTX *mem_ctx;
- struct net_context *ctx;
+ struct net_context *ctx = NULL;
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP