int main(int argc, const char *argv[])
{
int opt;
- int flags;
+ int flags = 0;
int debug = 0;
int numeric = 0;
int stat_and_retry = 0;
if (name) {
WERROR rv;
struct registry_key *new_key;
- struct tree_node *new_node;
+ struct tree_node *new_node = NULL;
struct tree_node *list;
struct tree_node *parent;
void multilist_driver(struct multilist *list, int c)
{
unsigned page;
- const void *tmp;
+ const void *tmp = NULL;
if (list->nrows == 0) {
return;
int type = CVAL(buf,smb_com);
unsigned x;
fstring name1,name2;
- int name_len1, name_len2;
+ int name_len1 = 0;
+ int name_len2;
int name_type1, name_type2;
if (msg_type) {
return NT_STATUS_MORE_PROCESSING_REQUIRED;
} else if (maj_stat == GSS_S_CONTEXT_EXPIRED) {
- gss_cred_id_t creds;
+ gss_cred_id_t creds = NULL;
gss_name_t name;
gss_buffer_desc buffer;
OM_uint32 lifetime = 0;
&name, &lifetime, &usage, NULL);
if (maj_stat == GSS_S_COMPLETE) {
- const char *usage_string;
+ const char *usage_string = NULL;
switch (usage) {
case GSS_C_BOTH:
usage_string = "GSS_C_BOTH";
struct tevent_req *req;
int i, ret;
struct GUID ntds_guid;
- const char *site, *dnsdomain, *dnsforest, *ntdsguid, *hostname;
+ const char *site, *dnsdomain, *dnsforest, *ntdsguid;
+ const char *hostname = NULL;
struct ldb_dn *sid_dn;
const char *attrs[] = { "dNSHostName", NULL };
struct ldb_result *res;
const struct dsdb_attribute *schema_attr;
uint32_t attr_version;
NTTIME attr_change_time;
- uint32_t attr_originating_usn;
+ uint32_t attr_originating_usn = 0;
/*
attr := attrsSeq[i]
uint32_t ctr_level = 0;
struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
- enum drsuapi_DsExtendedError extended_ret;
+ enum drsuapi_DsExtendedError extended_ret = DRSUAPI_EXOP_ERR_NONE;
state->ndr_struct_ptr = NULL;
status = dcerpc_drsuapi_DsGetNCChanges_r_recv(subreq, r);
TALLOC_CTX *tmp_ctx = talloc_new(msg);
unsigned int i;
int ret;
- const char *filter;
+ const char *filter = NULL;
NTSTATUS status;
}
for (i = 0; i < res->msgs[0]->elements[0].num_values; i++) {
- char *old_str, *new_str, *pos;
+ char *old_str, *new_str;
+ char *pos = NULL;
const char *tok;
struct ldb_val *vals;
bool found = false;
struct ldb_request *parent)
{
int ldb_err;
- struct ldb_message *msg;
+ struct ldb_message *msg = NULL;
TALLOC_CTX *temp_ctx;
temp_ctx = talloc_new(ldb_module);
DATA_BLOB data;
bool result;
char *type_str = NULL;
- char *data_str;
- char *value;
+ char *data_str = NULL;
+ char *value = NULL;
bool continue_next_line = 0;
line = afdgets(fd, mem_ctx, 0);
ret.data = hbin->data + rel_offset + 0x4; /* Skip past length */
ret.length = size - 0x4;
if (offset) {
- uint32_t new_rel_offset;
+ uint32_t new_rel_offset = 0;
*offset = hbin->offset_from_first + rel_offset + 0x20;
SMB_ASSERT(hbin_by_offset(data, *offset, &new_rel_offset) == hbin);
SMB_ASSERT(new_rel_offset == rel_offset);
struct vk_block vk;
uint32_t i;
uint32_t tmp_vk_offset, vk_offset, old_vk_offset = (uint32_t) -1;
- DATA_BLOB values;
+ DATA_BLOB values = {0};
ZERO_STRUCT(vk);
{
struct rap_NetShareEnum r;
NTSTATUS result;
+ uint32_t offset_save = 0;
+ struct rap_heap_save heap_save = {0};
RAP_GOTO(rap_srv_pull_word(call, &r.in.level));
RAP_GOTO(rap_srv_pull_bufsize(call, &r.in.bufsize));
for (r.out.count = 0; r.out.count < r.out.available; r.out.count++) {
int i = r.out.count;
- uint32_t offset_save;
- struct rap_heap_save heap_save;
offset_save = call->ndr_push_data->offset;
rap_heap_save(call->heap, &heap_save);
{
struct rap_NetServerEnum2 r;
NTSTATUS result;
+ uint32_t offset_save = 0;
+ struct rap_heap_save heap_save = {0};
RAP_GOTO(rap_srv_pull_word(call, &r.in.level));
RAP_GOTO(rap_srv_pull_bufsize(call, &r.in.bufsize));
for (r.out.count = 0; r.out.count < r.out.available; r.out.count++) {
int i = r.out.count;
- uint32_t offset_save;
- struct rap_heap_save heap_save;
offset_save = call->ndr_push_data->offset;
rap_heap_save(call->heap, &heap_save);
char *guid_string;
char *cert_secret_name;
DATA_BLOB lsa_secret;
- DATA_BLOB *uncrypted_data;
+ DATA_BLOB *uncrypted_data = NULL;
NTSTATUS status;
uint32_t requested_version;
bool has_get_all_changes)
{
struct drsuapi_DsReplicaObjectIdentifier *ncRoot = req10->naming_context;
- struct ldb_dn *obj_dn, *rodc_dn, *krbtgt_link_dn;
+ struct ldb_dn *obj_dn = NULL;
+ struct ldb_dn *rodc_dn, *krbtgt_link_dn;
int ret;
const char *rodc_attrs[] = { "msDS-KrbTgtLink", "msDS-NeverRevealGroup", "msDS-RevealOnDemandGroup", NULL };
const char *obj_attrs[] = { "tokenGroups", "objectSid", "UserAccountControl", "msDS-KrbTgtLinkBL", NULL };
struct ForestTrustInfoRecord *trec;
const char *dns_name;
const char *nb_name;
- struct dom_sid *sid;
- const char *tname;
+ struct dom_sid *sid = NULL;
+ const char *tname = NULL;
size_t dns_len;
- size_t tlen;
+ size_t tlen = 0;
NTSTATUS nt_status = NT_STATUS_OK;
uint32_t new_fti_idx;
uint32_t i;
bool sid_conflict;
bool nb_conflict;
bool exclusion;
- bool ex_rule;
+ bool ex_rule = false;
int ret;
for (new_fti_idx = 0; new_fti_idx < new_fti->count; new_fti_idx++) {
struct bkrp_client_side_wrapped data;
DATA_BLOB *xs;
DATA_BLOB *sec;
- DATA_BLOB *enc_sec;
- DATA_BLOB *enc_xs;
+ DATA_BLOB *enc_sec = NULL;
+ DATA_BLOB *enc_xs = NULL;
DATA_BLOB *blob2;
DATA_BLOB enc_sec_reverted;
DATA_BLOB des3_key;
struct lsa_CreateTrustedDomainEx r;
struct lsa_CreateTrustedDomainEx2 r2;
struct lsa_TrustDomainInfoInfoEx trustinfo;
- struct lsa_TrustDomainInfoAuthInfoInternal *authinfo_internal;
- struct lsa_TrustDomainInfoAuthInfo *authinfo;
+ struct lsa_TrustDomainInfoAuthInfoInternal *authinfo_internal = NULL;
+ struct lsa_TrustDomainInfoAuthInfo *authinfo = NULL;
struct dom_sid **domsid;
struct policy_handle *trustdom_handle;
struct lsa_QueryTrustedDomainInfo q;
struct netr_UserSessionKey key;
struct netr_LMSessionKey LMSessKey;
uint32_t validation_levels[] = { 2, 3 };
- struct netr_SamBaseInfo *base;
+ struct netr_SamBaseInfo *base = NULL;
const char *crypto_alg = "";
bool can_do_validation_6 = true;
struct policy_handle h, s;
struct dcerpc_binding_handle *b = p->binding_handle;
- uint8_t *buffer;
+ uint8_t *buffer = NULL;
uint32_t needed;
enum ndr_err_code ndr_err;
struct winbindd_request req;
struct winbindd_response rep;
const char *invalid_sid = "S-0-0-7";
- char *domain;
+ char *domain = NULL;
const char *invalid_user = "noone";
char *invalid_name;
bool strict = torture_setting_bool(torture, "strict mode", false);
struct wbsrv_service *service;
struct wbsrv_listen_socket *listen_socket;
char *errstring;
- struct dom_sid *primary_sid;
+ struct dom_sid *primary_sid = NULL;
bool ok;
task_server_set_title(task, "task[winbind]");