} else {
nt_status = check_plaintext_password(smb_name, plaintext_password, &server_info);
}
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return nt_status;
}
((*auth_ntlmssp_state)->auth_context->free)(&(*auth_ntlmssp_state)->auth_context);
}
if ((*auth_ntlmssp_state)->server_info) {
- talloc_free((*auth_ntlmssp_state)->server_info);
+ TALLOC_FREE((*auth_ntlmssp_state)->server_info);
}
talloc_destroy(mem_ctx);
*auth_ntlmssp_state = NULL;
real_username, True )) != NULL )
{
nt_status = make_server_info_pw(server_info, pass->pw_name, pass);
- talloc_free(pass);
+ TALLOC_FREE(pass);
}
else
{
}
/***************************************************************************
- Make a server_info struct. Free with talloc_free().
+ Make a server_info struct. Free with TALLOC_FREE().
***************************************************************************/
static auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
}
if ( !(result = make_server_info(NULL)) ) {
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return NT_STATUS_NO_MEMORY;
}
result->gid = pwd->pw_gid;
result->uid = pwd->pw_uid;
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
status = pdb_enum_group_memberships(result, sampass,
&result->sids, &gids,
DEBUG(10, ("pdb_enum_group_memberships failed: %s\n",
nt_errstr(status)));
result->sam_account = NULL; /* Don't free on error exit. */
- talloc_free(result);
+ TALLOC_FREE(result);
return status;
}
/* For now we throw away the gids and convert via sid_to_gid
* later. This needs fixing, but I'd like to get the code straight and
* simple first. */
- talloc_free(gids);
+ TALLOC_FREE(gids);
DEBUG(5,("make_server_info_sam: made server info for user %s -> %s\n",
pdb_get_username(sampass), result->unix_name));
talloc_steal(mem_ctx, result);
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
status = log_nt_token(mem_ctx, server_info->ptok);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return status;
}
result = NT_STATUS_OK;
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
result = nt_token_check_sid(group_sid, token);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
ret = lookup_name(mem_ctx, groupname, LOOKUP_NAME_ALL,
NULL, NULL, &group_sid, NULL);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
if (!ret) {
DEBUG(10, ("lookup_name(%s) failed: %s\n", groupname,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("pdb_enum_group_memberships failed: %s\n",
nt_errstr(status)));
- talloc_free(result);
+ TALLOC_FREE(result);
return status;
}
/* For now we throw away the gids and convert via sid_to_gid
* later. This needs fixing, but I'd like to get the code straight and
* simple first. */
- talloc_free(gids);
+ TALLOC_FREE(gids);
*server_info = result;
*found_username));
nt_status = pdb_init_sam_pw(sam_account, passwd);
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
return nt_status;
}
info3->gids[i].g_rid)) {
DEBUG(3,("could not append additional group rid "
"0x%x\n", info3->gids[i].g_rid));
- talloc_free(result);
+ TALLOC_FREE(result);
return NT_STATUS_INVALID_PARAMETER;
}
add_sid_to_array(result, &sid, &result->sids,
if ((ptoken->user_sids != NULL) && (token->user_sids == NULL)) {
DEBUG(0, ("talloc_memdup failed\n"));
- talloc_free(token);
+ TALLOC_FREE(token);
return NULL;
}
exists = lookup_name(mem_ctx, name, LOOKUP_NAME_ISOLATED,
NULL, NULL, &sid, &type);
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
if (exists) {
return NT_STATUS_ALIAS_EXISTS;
}
/****************************************************************************
- Schedule a function for future calling, cancel with talloc_free().
- It's the responsibility of the handler to call talloc_free() on the event
+ Schedule a function for future calling, cancel with TALLOC_FREE().
+ It's the responsibility of the handler to call TALLOC_FREE() on the event
handed to it.
****************************************************************************/
mdfour(md4_tmp, (unsigned char *)pw->pw_passwd, strlen(pw->pw_passwd));
for (i=0;i<16;i++)
seed_inbuf[8+i] ^= md4_tmp[i];
- talloc_free(pw);
+ TALLOC_FREE(pw);
}
/*
attr_list = get_attr_list( NULL, dominfo_attr_list );
rc = smbldap_search_suffix(ldap_state, filter, attr_list, &result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_UNSUCCESSFUL;
attr_list = get_attr_list( NULL, dominfo_attr_list );
rc = smbldap_search_suffix(ldap_state, filter, attr_list , result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(2,("Problem during LDAPsearch: %s\n", ldap_err2string (rc)));
CHECK_BLOCKS(r1, 2);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(NULL, stdout);
printf("Testing NULL\n");
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
CHECK_BLOCKS(r1, 2);
printf("Freeing ref\n");
- talloc_free(ref);
+ TALLOC_FREE(ref);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(r1, 1);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p2, 2);
CHECK_BLOCKS(r1, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
CHECK_BLOCKS(r1, 2);
printf("Freeing r1\n");
- talloc_free(r1);
+ TALLOC_FREE(r1);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 5);
CHECK_BLOCKS(p2, 1);
printf("Freeing p2\n");
- talloc_free(p2);
+ TALLOC_FREE(p2);
talloc_report_full(root, stdout);
CHECK_BLOCKS(p1, 4);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
CHECK_BLOCKS(r1, 1);
printf("Freeing p1\n");
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_report_full(root, stdout);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
talloc_increase_ref_count(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
talloc_unlink(NULL, p1);
printf("failed: talloc_unlink() of parent should succeed\n");
return False;
}
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(p1, 1);
CHECK_BLOCKS(root, 2);
CHECK_BLOCKS(root, 3);
- if (talloc_free(NULL) != -1) {
- printf("talloc_free(NULL) should give -1\n");
+ if (TALLOC_FREE(NULL) != -1) {
+ printf("TALLOC_FREE(NULL) should give -1\n");
return False;
}
talloc_set_destructor(p1, fail_destructor);
- if (talloc_free(p1) != -1) {
+ if (TALLOC_FREE(p1) != -1) {
printf("Failed destructor should cause talloc_free to fail\n");
return False;
}
printf("Failed to give zero memory\n");
return False;
}
- talloc_free(p2);
+ TALLOC_FREE(p2);
if (talloc_strdup(root, NULL) != NULL) {
printf("failed: strdup on NULL should give NULL\n");
}
CHECK_BLOCKS(p2, 1);
CHECK_BLOCKS(p1, 3);
- talloc_free(p2);
+ TALLOC_FREE(p2);
d = talloc_array(p1, double, 0x20000000);
if (d) {
return False;
}
- talloc_free(p1);
+ TALLOC_FREE(p1);
CHECK_BLOCKS(root, 1);
p1 = talloc_named(root, 100, "%d bytes", 100);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
CHECK_SIZE(NULL, 0);
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
el1->list2 = talloc_realloc(el1, el1->list2, struct el2 *, 200);
el1->list3 = talloc_realloc(el1, el1->list3, struct el2 *, 300);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
return False;
}
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
}
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_steal(root, p2);
CHECK_BLOCKS(root, 2);
CHECK_SIZE(root, 20);
- talloc_free(p2);
+ TALLOC_FREE(p2);
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
p1 = talloc_size(NULL, 3);
CHECK_SIZE(NULL, 3);
- talloc_free(p1);
+ TALLOC_FREE(p1);
return True;
}
CHECK_BLOCKS(root, 1);
CHECK_SIZE(root, 0);
- talloc_free(root);
+ TALLOC_FREE(root);
return True;
c1 = talloc_named_const(p1, 1, "child");
talloc_reference(p2, c1);
- talloc_free(p1);
+ TALLOC_FREE(p1);
talloc_unlink(p2, c1);
CHECK_SIZE(root, 1);
- talloc_free(p2);
- talloc_free(root);
+ TALLOC_FREE(p2);
+ TALLOC_FREE(root);
return True;
}
p1 = talloc_size(ctx, count);
p2 = talloc_strdup(p1, "foo bar");
p3 = talloc_size(p1, 300);
- talloc_free(p1);
+ TALLOC_FREE(p1);
count += 3;
} while (timeval_elapsed(&tv) < 5.0);
printf("talloc: %.0f ops/sec\n", count/timeval_elapsed(&tv));
- talloc_free(ctx);
+ TALLOC_FREE(ctx);
tv = timeval_current();
count = 0;
*/
if (Get_Pwnam_ret) {
- talloc_free(Get_Pwnam_ret);
+ TALLOC_FREE(Get_Pwnam_ret);
}
Get_Pwnam_ret = ret;
pass = getpwuid_alloc(NULL, uid);
if (pass) {
fstrcpy(name, pass->pw_name);
- talloc_free(pass);
+ TALLOC_FREE(pass);
} else {
slprintf(name, sizeof(name) - 1, "%ld",(long int)uid);
}
pass = getpwnam_alloc(NULL, name);
if (pass) {
u = pass->pw_uid;
- talloc_free(pass);
+ TALLOC_FREE(pass);
return u;
}
void flush_pwnam_cache(void)
{
- talloc_free(pwnam_cache);
+ TALLOC_FREE(pwnam_cache);
pwnam_cache = NULL;
init_pwnam_cache();
}
i = rand() % PWNAMCACHE_SIZE;
if (pwnam_cache[i] != NULL) {
- talloc_free(pwnam_cache[i]);
+ TALLOC_FREE(pwnam_cache[i]);
}
pwnam_cache[i] = talloc_copy_passwd(pwnam_cache, temp);
DEBUG(0,("str_list_make: Unable to allocate memory"));
str_list_free(&list);
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
DEBUG(0,("str_list_make: Unable to allocate memory"));
str_list_free(&list);
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
}
if (mem_ctx) {
- talloc_free(s);
+ TALLOC_FREE(s);
} else {
SAFE_FREE(s);
}
tlist = *list;
for(; *tlist; tlist++) {
if (mem_ctx) {
- talloc_free(*tlist);
+ TALLOC_FREE(*tlist);
} else {
SAFE_FREE(*tlist);
}
}
if (mem_ctx) {
- talloc_free(*tlist);
+ TALLOC_FREE(*tlist);
} else {
SAFE_FREE(*list);
}
op->out.local_sid->domain = dom_name;
sid_copy(&op->out.local_sid->sid, local_sid);
- talloc_free(local_sid);
+ TALLOC_FREE(local_sid);
}
domain:
op->out.domain_sid->domain = dom_name;
sid_copy(&op->out.domain_sid->sid, domain_sid);
- talloc_free(domain_sid);
+ TALLOC_FREE(domain_sid);
}
done:
hnd->status = rpccli_lsa_open_account(pipe_hnd, mem_ctx, op->in.pol, op->in.sid, op->in.access, user_pol);
if(!NT_STATUS_IS_OK(hnd->status)) {
- talloc_free(user_pol);
+ TALLOC_FREE(user_pol);
return CAC_FAILURE;
}
return CAC_FAILURE;
}
- talloc_free(rid_types);
+ TALLOC_FREE(rid_types);
}
else {
map_out[i].rid = op->in.rids[i];
}
- talloc_free(names_out);
- talloc_free(name_types_out);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(name_types_out);
op->out.num_names = num_names_out;
op->out.map = map_out;
op->out.num_rids = num_rids_out;
op->out.map = map_out;
- talloc_free(rids_out);
- talloc_free(rid_types_out);
+ TALLOC_FREE(rids_out);
+ TALLOC_FREE(rid_types_out);
if(NT_STATUS_EQUAL(hnd->status, STATUS_SOME_UNMAPPED))
return CAC_PARTIAL_SUCCESS;
attr_out[i] = groups[i].attr;
}
- talloc_free(groups);
+ TALLOC_FREE(groups);
op->out.num_groups = num_groups_out;
op->out.rids = rids_out;
result = CAC_FAILURE;
}
- talloc_free(attr);
+ TALLOC_FREE(attr);
return result;
}
names_out = talloc_array(mem_ctx, char *, num_groups_out);
if(!names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
+ TALLOC_FREE(acct_buf);
return CAC_FAILURE;
}
desc_out = talloc_array(mem_ctx, char *, num_groups_out);
if(!desc_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
return CAC_FAILURE;
}
rids_out = talloc_array(mem_ctx, uint32, num_groups_out);
if(!rids_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
- talloc_free(desc_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(desc_out);
return CAC_FAILURE;
}
names_out = talloc_array(mem_ctx, char *, num_als_out);
if(!names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
+ TALLOC_FREE(acct_buf);
return CAC_FAILURE;
}
desc_out = talloc_array(mem_ctx, char *, num_als_out);
if(!desc_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
return CAC_FAILURE;
}
rids_out = talloc_array(mem_ctx, uint32, num_als_out);
if(!rids_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(acct_buf);
- talloc_free(names_out);
- talloc_free(desc_out);
+ TALLOC_FREE(acct_buf);
+ TALLOC_FREE(names_out);
+ TALLOC_FREE(desc_out);
return CAC_FAILURE;
}
result = CAC_FAILURE;
}
- talloc_free(sid);
+ TALLOC_FREE(sid);
return result;
}
/*this function does not use an output parameter to make it as convenient as possible to use*/
*op->in.dom_hnd = *od.out.dom_hnd;
- talloc_free(od.out.dom_hnd);
+ TALLOC_FREE(od.out.dom_hnd);
return CAC_SUCCESS;
}
return CAC_FAILURE;
}
- talloc_free(svc_buf);
+ TALLOC_FREE(svc_buf);
op->out.num_services = num_svc_out;
class_names_out = TALLOC_ARRAY(mem_ctx, char *, op->in.max_keys);
if(!class_names_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(key_names_out);
+ TALLOC_FREE(key_names_out);
return CAC_FAILURE;
}
mod_times_out = TALLOC_ARRAY(mem_ctx, time_t, op->in.max_keys);
if(!mod_times_out) {
hnd->status = NT_STATUS_NO_MEMORY;
- talloc_free(key_names_out);
- talloc_free(class_names_out);
+ TALLOC_FREE(key_names_out);
+ TALLOC_FREE(class_names_out);
return CAC_FAILURE;
}
values_out = talloc_array(mem_ctx, REG_VALUE_DATA *, op->in.max_values);
if(!values_out) {
- talloc_free(types_out);
+ TALLOC_FREE(types_out);
hnd->status = NT_STATUS_NO_MEMORY;
return CAC_FAILURE;
}
val_names_out = talloc_array(mem_ctx, char *, op->in.max_values);
if(!val_names_out) {
- talloc_free(types_out);
- talloc_free(values_out);
+ TALLOC_FREE(types_out);
+ TALLOC_FREE(values_out);
hnd->status = NT_STATUS_NO_MEMORY;
return CAC_FAILURE;
}
break;
default:
- talloc_free(blob);
+ TALLOC_FREE(blob);
blob = NULL;
}
if(!(blob->buffer)) {
- talloc_free(blob);
+ TALLOC_FREE(blob);
return NULL;
}
case REG_SZ:
data->reg_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len);
if(!data->reg_sz) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
data->reg_expand_sz = cac_unistr_to_str(mem_ctx, buf.buffer, buf.buf_len);
if(!data->reg_expand_sz) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
data->reg_binary.data = talloc_memdup(mem_ctx, buf.buffer, size);
if(!data->reg_binary.data) {
- talloc_free(data);
+ TALLOC_FREE(data);
errno = ENOMEM;
data = NULL;
}
strings = talloc_array(mem_ctx, char *, num_strings);
if(!strings) {
errno = ENOMEM;
- talloc_free(data);
+ TALLOC_FREE(data);
break;
}
break;
default:
- talloc_free(data);
+ TALLOC_FREE(data);
data = NULL;
}
cli_rpc_pipe_close(pipe_hnd);
/* Free all memory which was allocated for this request */
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
/* Tell 'em if it worked */
return W_ERROR_IS_OK(result) ? 0 : -1;
debug_ntlmssp_flags(ntlmssp_state->neg_flags);
if (ntlmssp_state->session_key.length < 8) {
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
DEBUG(3, ("NO session key, cannot intialise signing\n"));
return NT_STATUS_NO_USER_SESSION_KEY;
}
recv_seal_const = CLI_SEAL;
break;
default:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return NT_STATUS_INTERNAL_ERROR;
}
ntlmssp_state->ntlmv1_seq_num = 0;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return NT_STATUS_OK;
}
if (tdb_chainlock(tdb, key) != 0) {
DEBUG(3, ("Could not lock share entry\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
if (lck->fresh) {
if (fname == NULL || servicepath == NULL) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
lck->filename = talloc_strdup(lck, fname);
lck->servicepath = talloc_strdup(lck, servicepath);
if (lck->filename == NULL || lck->servicepath == NULL) {
DEBUG(0, ("talloc failed\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
} else {
if (!parse_share_modes(data, lck)) {
DEBUG(0, ("Could not parse share modes\n"));
- talloc_free(lck);
+ TALLOC_FREE(lck);
SAFE_FREE(data.dptr);
return NULL;
}
return False;
}
result = lck->delete_on_close;
- talloc_free(lck);
+ TALLOC_FREE(lck);
return result;
}
{
/* Ensure there's no token. */
if (lck->delete_token) {
- talloc_free(lck->delete_token); /* Also deletes groups... */
+ TALLOC_FREE(lck->delete_token); /* Also deletes groups... */
lck->delete_token = NULL;
}
lck->modified = True;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
return True;
}
return;
/* free up temp memory */
- lp_talloc_free();
+ lp_TALLOC_FREE();
}
}
/* Remove from list and free */
winbindd_remove_client(state);
- talloc_free(state);
+ TALLOC_FREE(state);
}
}
/* Free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
/* Initialise fd lists for select() */
for (entry = ccache_list; entry; entry = entry->next) {
if (strequal(entry->ccname, ccname)) {
DLIST_REMOVE(ccache_list, entry);
- talloc_free(entry->event); /* unregisters events */
- return talloc_free(entry) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
+ TALLOC_FREE(entry->event); /* unregisters events */
+ TALLOC_FREE(entry);
+ return NT_STATUS_OK;
}
}
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
DEBUG(10,("krb5_ticket_refresh_handler called\n"));
DEBUGADD(10,("event called for: %s, %s\n", entry->ccname, entry->username));
- talloc_free(entry->event);
+ TALLOC_FREE(entry->event);
#ifdef HAVE_KRB5
if (ret) {
DEBUG(3,("could not re-kinit: %s\n", error_message(ret)));
- talloc_free(entry->event);
+ TALLOC_FREE(entry->event);
return;
}
DEBUG(10,("account_lockout_policy_handler called\n"));
if (child->timed_event) {
- talloc_free(child->timed_event);
+ TALLOC_FREE(child->timed_event);
}
methods = child->domain->methods;
struct timeval now;
/* free up any talloc memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
run_events();
/* Free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
if (do_sigterm) {
#if 0
strlen(state->response.extra_data)+1;
no_token:
- talloc_free(afsname);
+ TALLOC_FREE(afsname);
}
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
Free up temporary memory - called from the main loop.
********************************************************************/
-void lp_talloc_free(void)
+void lp_TALLOC_FREE(void)
{
if (!lp_talloc)
return;
- talloc_free(lp_talloc);
+ TALLOC_FREE(lp_talloc);
lp_talloc = NULL;
}
}
failed:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return False;
ok:
if ((domain == NULL) || (name == NULL)) {
DEBUG(0, ("talloc failed\n"));
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return False;
}
*ret_type = type;
}
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return True;
}
result = NT_STATUS_OK;
done:
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return result;
}
DEBUG(10, ("failed to lookup sid %s\n",
sid_string_static(sid)));
}
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
return ret;
}
pdb_free_sam(new_sam_acct);
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
*pp_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, *p_num_groups);
if (*pp_sids == NULL) {
- talloc_free(*pp_gids);
+ TALLOC_FREE(*pp_gids);
return NT_STATUS_NO_MEMORY;
}
attr_list = get_userattr_list(NULL, ldap_state->schema_ver);
rc = smbldap_search(ldap_state->smbldap_state, suffix, LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &ldap_state->result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(0, ("ldapsam_setsampwent: LDAP search failed: %s\n", ldap_err2string(rc)));
append_attr(user->mem_ctx, &attr_list, "uidNumber");
rc = ldapsam_search_suffix_by_name(ldap_state, sname, &result,
attr_list);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if ( rc != LDAP_SUCCESS )
return NT_STATUS_NO_SUCH_USER;
append_attr(tmp_ctx, &attr_list, "uidNumber");
rc = ldapsam_search_suffix_by_sid(ldap_state, sid,
result, attr_list);
- talloc_free(tmp_ctx);
+ TALLOC_FREE(tmp_ctx);
if ( rc != LDAP_SUCCESS )
return rc;
attr_list = get_userattr_list(NULL,
ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_rid(ldap_state, rid, result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if ( rc != LDAP_SUCCESS )
return rc;
NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
if (!result) {
attr_list = get_userattr_list(NULL, ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_name(ldap_state, pdb_get_username(newpwd), &result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_UNSUCCESSFUL;
}
rc = ldapsam_search_suffix_by_name (ldap_state, username, &result, attr_list);
if (rc != LDAP_SUCCESS) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
DEBUG(0,("ldapsam_add_sam_account: User '%s' already in the base, with samba attributes\n",
username));
ldap_msgfree(result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
ldap_msgfree(result);
if (ldap_count_entries(ldap_state->smbldap_state->ldap_struct, result) != 0) {
DEBUG(0,("ldapsam_add_sam_account: SID '%s' already in the base, with samba attributes\n",
sid_to_string(sid_string, sid)));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
rc = smbldap_search_suffix(ldap_state->smbldap_state,
filter, attr_list, &result);
if ( rc != LDAP_SUCCESS ) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
if (num_result > 1) {
DEBUG (0, ("ldapsam_add_sam_account: More than one user with that uid exists: bailing out!\n"));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
entry = ldap_first_entry (ldap_state->smbldap_state->ldap_struct, result);
tmp = smbldap_get_dn (ldap_state->smbldap_state->ldap_struct, entry);
if (!tmp) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
filter, attr_list, &result);
if ( rc != LDAP_SUCCESS ) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
return NT_STATUS_UNSUCCESSFUL;
}
if (num_result > 1) {
DEBUG (0, ("ldapsam_add_sam_account: More than one user with that uid exists: bailing out!\n"));
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
entry = ldap_first_entry (ldap_state->smbldap_state->ldap_struct, result);
tmp = smbldap_get_dn (ldap_state->smbldap_state->ldap_struct, entry);
if (!tmp) {
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
}
}
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (num_result == 0) {
/* Check if we need to add an entry */
rc = smbldap_search(ldap_state->smbldap_state,
lp_ldap_group_suffix (), scope,
filter, attr_list, 0, result);
- talloc_free(attr_list);
+ TALLOC_FREE(attr_list);
return rc;
}
NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
result = (rc == LDAP_SUCCESS) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
rc = smbldap_search(ldap_state->smbldap_state, lp_ldap_group_suffix(),
LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &ldap_state->result);
- talloc_free(attr_list);
+ TALLOC_FREE(attr_list);
if (rc != LDAP_SUCCESS) {
DEBUG(0, ("ldapsam_setsamgrent: LDAP search failed: %s\n",
result = (num_mapped == num_rids) ?
NT_STATUS_OK : STATUS_SOME_UNMAPPED;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
*rid = nextRid;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return status;
}
ret = True;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
attr_list = get_userattr_list(NULL,
ldap_state->schema_ver);
rc = ldapsam_search_suffix_by_name(ldap_state, username, &result, attr_list );
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
return False;
}
smb_pw->smb_userid=passwd->pw_uid;
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
} else if (algorithmic_pdb_rid_is_user(rid)) {
smb_pw->smb_userid=algorithmic_pdb_user_rid_to_uid(rid);
} else {
if (!NT_STATUS_IS_OK(pdb_fill_sam_pw(sam_pass, pwfile)))
return False;
- talloc_free(pwfile);
+ TALLOC_FREE(pwfile);
/* set remaining fields */
if (!tdb_sc) {
DEBUG(0,("open_schannel_session_store: Failed to open %s\n", fname));
- talloc_free(fname);
+ TALLOC_FREE(fname);
return NULL;
}
}
SAFE_FREE(vers.dptr);
- talloc_free(fname);
+ TALLOC_FREE(fname);
return tdb_sc;
}
value.dptr = TALLOC(mem_ctx, value.dsize);
if (!value.dptr) {
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
return False;
}
tdb_sc = open_schannel_session_store(mem_ctx);
if (!tdb_sc) {
- talloc_free(keystr);
- talloc_free(value.dptr);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(value.dptr);
return False;
}
keystr ));
tdb_close(tdb_sc);
- talloc_free(keystr);
- talloc_free(value.dptr);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(value.dptr);
return ret;
}
tdb_sc = open_schannel_session_store(mem_ctx);
if (!tdb_sc) {
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
return False;
}
if (ret == -1 || l1 != 8 || l2 != 8 || l3 != 8 || l4 != 16 || l5 != 16) {
/* Bad record - delete it. */
tdb_delete_bystring(tdb_sc, keystr);
- talloc_free(keystr);
- talloc_free(pdc);
+ TALLOC_FREE(keystr);
+ TALLOC_FREE(pdc);
SAFE_FREE(pseed_chal);
SAFE_FREE(pclnt_chal);
SAFE_FREE(psrv_chal);
SAFE_FREE(psess_key);
SAFE_FREE(pmach_pw);
- talloc_free(keystr);
+ TALLOC_FREE(keystr);
SAFE_FREE(value.dptr);
*ppdc = pdc;
sid_copy(sid, &global_sid_Unix_Users);
sid_append_rid(sid, pwd->pw_uid); /* For 64-bit uid's we have enough
* space ... */
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return True;
}
free up temporary memory - called from the main loop
********************************************************************/
-void main_loop_talloc_free(void)
+void main_loop_TALLOC_FREE(void)
{
if (!main_loop_talloc)
return;
&& !is_trusted_domain(nt_domain) )
r_u->auth_resp = 0; /* We are not authoritative */
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return status;
}
/* We don't like guest domain logons... */
DEBUG(5,("_net_sam_logon: Attempted domain logon as GUEST "
"denied.\n"));
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return NT_STATUS_LOGON_FAILURE;
}
ZERO_STRUCT(user_session_key);
ZERO_STRUCT(lm_session_key);
}
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return status;
}
memset(p->wks, '\0', sizeof(p->wks));
/* Set up for non-authenticated user. */
- talloc_free(p->pipe_user.nt_user_token);
+ TALLOC_FREE(p->pipe_user.nt_user_token);
p->pipe_user.ut.ngroups = 0;
SAFE_FREE( p->pipe_user.ut.groups);
p->auth.a_u.schannel_auth = TALLOC_P(p->pipe_state_mem_ctx, struct schannel_auth_struct);
if (!p->auth.a_u.schannel_auth) {
- talloc_free(pdcinfo);
+ TALLOC_FREE(pdcinfo);
return False;
}
memcpy(p->auth.a_u.schannel_auth->sess_key, pdcinfo->sess_key,
sizeof(pdcinfo->sess_key));
- talloc_free(pdcinfo);
+ TALLOC_FREE(pdcinfo);
p->auth.a_u.schannel_auth->seq_num = 0;
/* Free the handles database. */
close_policy_by_pipe(p);
- talloc_free(p->pipe_user.nt_user_token);
+ TALLOC_FREE(p->pipe_user.nt_user_token);
data_blob_free(&p->session_key);
SAFE_FREE(p->pipe_user.ut.groups);
}
putchar(hex[i]);
}
- talloc_free(hex);
+ TALLOC_FREE(hex);
putchar('\n');
break;
}
rc = smbldap_search(ldap_state.smbldap_state, lp_ldap_idmap_suffix(),
LDAP_SCOPE_SUBTREE, filter,
attr_list, 0, &result);
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldap_allocate_id: %s object not found\n", LDAP_OBJ_IDPOOL));
ret = NT_STATUS_OK;
out:
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (result)
ldap_msgfree(result);
}
out:
- talloc_free( attr_list );
+ TALLOC_FREE( attr_list );
if (result)
ldap_msgfree(result);
SAFE_FREE(dn);
attr_list = get_attr_list( NULL, idpool_attr_list );
rc = smbldap_search(ldap_state.smbldap_state, lp_ldap_idmap_suffix(),
LDAP_SCOPE_SUBTREE, filter, attr_list, 0, &result);
- talloc_free ( attr_list );
+ TALLOC_FREE( attr_list );
if (rc != LDAP_SUCCESS)
return NT_STATUS_UNSUCCESSFUL;
process_pending_change_notify_queue((time_t)0);
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if(fsp->oplock_type)
release_file_oplock(fsp);
delete_dir = (lck->delete_on_close | lck->initial_delete_on_close);
- talloc_free(lck);
+ TALLOC_FREE(lck);
if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
delete_dir &&
}
if (conn->nt_user_token) {
- talloc_free(conn->nt_user_token);
+ TALLOC_FREE(conn->nt_user_token);
}
free_namearray(conn->veto_list);
done:
unbecome_root(); /* END ROOT BLOCK */
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ret;
}
}
unbecome_root();
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
}
data_blob_clear_free(&password);
}
&state);
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
if (NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) {
/* DELETE_PENDING is not deferred for a second */
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
create_options);
if (fsp_dup) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
if (pinfo) {
*pinfo = FILE_WAS_OPENED;
}
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (fsp_open) {
fd_close(conn, fsp);
/*
if (!fsp_open) {
if (lck != NULL) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
}
file_free(fsp);
return NULL;
defer_open(lck, request_time, timeval_zero(),
&state);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NULL;
}
*/
if ((SMB_VFS_FTRUNCATE(fsp,fsp->fh->fd,0) == -1) ||
(SMB_VFS_FSTAT(fsp,fsp->fh->fd,psbuf)==-1)) {
- talloc_free(lck);
+ TALLOC_FREE(lck);
fd_close(conn,fsp);
file_free(fsp);
return NULL;
if (!NT_STATUS_IS_OK(result)) {
/* Remember to delete the mode we just added. */
del_share_mode(lck, fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
fd_close(conn,fsp);
file_free(fsp);
set_saved_ntstatus(result);
/* If this is a successful open, we must remove any deferred open
* records. */
del_deferred_open_entry(lck, mid);
- talloc_free(lck);
+ TALLOC_FREE(lck);
conn->num_files_open++;
if (!NT_STATUS_IS_OK(status)) {
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
status = can_set_delete_on_close(fsp, True, 0);
if (!NT_STATUS_IS_OK(status)) {
set_saved_ntstatus(status);
- talloc_free(lck);
+ TALLOC_FREE(lck);
file_free(fsp);
return NULL;
}
lck->modified = True;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
/* Change the owner if required. */
if ((info == FILE_WAS_CREATED) && lp_inherit_owner(SNUM(conn))) {
(double)inode));
}
release_file_oplock(fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return ret;
}
}
downgrade_file_oplock(fsp);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return ret;
}
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
/* Async level2 request, don't send a reply, just remove the oplock. */
remove_oplock(fsp);
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
fsp->sent_oplock_break = break_to_level2 ? LEVEL_II_BREAK_SENT:BREAK_TO_NONE_SENT;
/* Restore the sign state to what it was. */
srv_oplock_set_signing(sign_state);
- talloc_free(break_msg);
+ TALLOC_FREE(break_msg);
fsp->sent_oplock_break = BREAK_TO_NONE_SENT;
fsp->num_pending_break_messages = 0;
if (fsp->oplock_timeout != NULL) {
/* Remove the timed event handler. */
- talloc_free(fsp->oplock_timeout);
+ TALLOC_FREE(fsp->oplock_timeout);
fsp->oplock_timeout = NULL;
}
return;
DEBUG(0,("release_level_2_oplocks_on_change: PANIC. "
"share mode entry %d is an exlusive "
"oplock !\n", i ));
- talloc_free(lck);
+ TALLOC_FREE(lck);
abort();
}
/* We let the message receivers handle removing the oplock state
in the share mode lock db. */
- talloc_free(lck);
+ TALLOC_FREE(lck);
}
/****************************************************************************
session_yield(vuser);
SAFE_FREE(vuser->session_keystr);
- talloc_free(vuser->server_info);
+ TALLOC_FREE(vuser->server_info);
data_blob_free(&vuser->session_key);
conn_clear_vuid_cache(vuid);
SAFE_FREE(vuser->groups);
- talloc_free(vuser->nt_user_token);
+ TALLOC_FREE(vuser->nt_user_token);
SAFE_FREE(vuser);
num_validated_vuids--;
}
"vuser->groups\n"));
data_blob_free(&session_key);
free(vuser);
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
return UID_FIELD_INVALID;
}
}
if (passwd) {
vuser->unix_homedir =
smb_xstrdup(passwd->pw_dir);
- talloc_free(passwd);
+ TALLOC_FREE(passwd);
}
}
} else {
DEBUG(1, ("server_info does not contain a user_token - "
"cannot continue\n"));
- talloc_free(server_info);
+ TALLOC_FREE(server_info);
data_blob_free(&session_key);
SAFE_FREE(vuser->homedir);
SAFE_FREE(vuser->unix_homedir);
msg->buf = data_blob_talloc(msg, buf, msg_len);
if(msg->buf.data == NULL) {
DEBUG(0,("push_message: malloc fail (2)\n"));
- talloc_free(msg);
+ TALLOC_FREE(msg);
return False;
}
private_len);
if (msg->private_data.data == NULL) {
DEBUG(0,("push_message: malloc fail (3)\n"));
- talloc_free(msg);
+ TALLOC_FREE(msg);
return False;
}
}
(unsigned int)mid,
(unsigned int)pml->buf.length ));
DLIST_REMOVE(deferred_open_queue, pml);
- talloc_free(pml);
+ TALLOC_FREE(pml);
return;
}
}
struct idle_event *event =
talloc_get_type_abort(private_data, struct idle_event);
- talloc_free(event->te);
+ TALLOC_FREE(event->te);
if (!event->handler(now, event->private_data)) {
/* Don't repeat, delete ourselves */
- talloc_free(event);
+ TALLOC_FREE(event);
return;
}
idle_event_handler, result);
if (result->te == NULL) {
DEBUG(0, ("add_timed_event failed\n"));
- talloc_free(result);
+ TALLOC_FREE(result);
return NULL;
}
errno = 0;
/* free up temporary memory */
- lp_talloc_free();
- main_loop_talloc_free();
+ lp_TALLOC_FREE();
+ main_loop_TALLOC_FREE();
/* Did someone ask for immediate checks on things like blocking locks ? */
if (select_timeout == 0) {
DEBUG(3,("rename_internals_fsp: succeeded doing rename on %s -> %s\n",
fsp->fsp_name,newname));
rename_open_files(conn, lck, fsp->dev, fsp->inode, newname);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (errno == ENOTDIR || errno == EISDIR) {
error = NT_STATUS_OBJECT_NAME_COLLISION;
DEBUG(3,("rename_internals: succeeded doing rename on %s -> %s\n",
directory,newname));
rename_open_files(conn, lck, sbuf1.st_dev, sbuf1.st_ino, newname);
- talloc_free(lck);
+ TALLOC_FREE(lck);
return NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
if (errno == ENOTDIR || errno == EISDIR)
error = NT_STATUS_OBJECT_NAME_COLLISION;
else
count++;
error = NT_STATUS_OK;
}
- talloc_free(lck);
+ TALLOC_FREE(lck);
DEBUG(3,("rename_internals: doing rename on %s -> %s\n",fname,destname));
}
CloseDir(dir_hnd);
if (ctx_p->ut.ngroups != 0) {
if (!(ctx_p->ut.groups = SMB_MALLOC_ARRAY(gid_t, ctx_p->ut.ngroups))) {
DEBUG(0, ("Out of memory in push_sec_ctx()\n"));
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
return False;
}
if (token && (token == ctx_p->token))
smb_panic("DUPLICATE_TOKEN");
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
ctx_p->ut.groups = memdup(groups, sizeof(gid_t) * ngroups);
ctx_p->token = dup_nt_token(NULL, token);
SAFE_FREE(ctx_p->ut.groups);
ctx_p->ut.ngroups = 0;
- talloc_free(ctx_p->token);
+ TALLOC_FREE(ctx_p->token);
/* Pop back previous user */
int num;
/* Free up temporary memory from the main smbd. */
- lp_talloc_free();
+ lp_TALLOC_FREE();
/* Ensure we respond to PING and DEBUG messages from the main smbd. */
message_dispatch();
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
result = NT_STATUS_OK;
done:
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return result;
}
conn->uid = pass->pw_uid;
conn->gid = pass->pw_gid;
string_set(&conn->user,pass->pw_name);
- talloc_free(pass);
+ TALLOC_FREE(pass);
DEBUG(3,("Guest only user %s\n",user));
} else if (vuser) {
if (vuser->guest) {
while (*list != NULL) {
if (token_contains_name(mem_ctx, username, sharename,
token, *list)) {
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return True;
}
list += 1;
}
- talloc_free(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return False;
}
current_user.conn = NULL;
current_user.vuid = UID_FIELD_INVALID;
- talloc_free(pass);
+ TALLOC_FREE(pass);
pass = NULL;
return True;
*/
if (must_free_token)
- talloc_free(token);
+ TALLOC_FREE(token);
current_user.conn = conn;
current_user.vuid = vuid;
if (strequal(argv[0], "..") &&
(this_ctx->parent != NULL)) {
new_ctx = this_ctx->parent;
- talloc_free(this_ctx);
+ TALLOC_FREE(this_ctx);
this_ctx = new_ctx;
return True;
}
cli_shutdown(ctx->cli);
- talloc_free(ctx);
+ TALLOC_FREE(ctx);
return 0;
}
(const unsigned char *)lm_key,
sizeof(lm_key));
x_fprintf(x_stdout, "LANMAN-Session-Key: %s\n", hex_lm_key);
- talloc_free(hex_lm_key);
+ TALLOC_FREE(hex_lm_key);
}
if (ntlm_server_1_user_session_key
(const unsigned char *)user_session_key,
sizeof(user_session_key));
x_fprintf(x_stdout, "User-Session-Key: %s\n", hex_user_session_key);
- talloc_free(hex_user_session_key);
+ TALLOC_FREE(hex_user_session_key);
}
}
}
hex_lm_key = hex_encode(NULL, (const unsigned char *)lm_key,
sizeof(lm_key));
x_fprintf(x_stdout, "LM_KEY: %s\n", hex_lm_key);
- talloc_free(hex_lm_key);
+ TALLOC_FREE(hex_lm_key);
}
if (request_user_session_key
&& (memcmp(zeros, user_session_key,
hex_user_session_key = hex_encode(NULL, (const unsigned char *)user_session_key,
sizeof(user_session_key));
x_fprintf(x_stdout, "NT_KEY: %s\n", hex_user_session_key);
- talloc_free(hex_user_session_key);
+ TALLOC_FREE(hex_user_session_key);
}
return True;
if ((pwd = getpwnam_alloc(NULL, machineaccount))) {
if (!NT_STATUS_IS_OK(pdb_init_sam_pw( &sam_pwent, pwd))) {
fprintf(stderr, "Could not init sam from pw\n");
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
return -1;
}
- talloc_free(&pwd);
+ TALLOC_FREE(pwd);
} else {
if (!NT_STATUS_IS_OK(pdb_init_sam (&sam_pwent))) {
fprintf(stderr, "Could not init sam from pw\n");
{
char *src_string = procid_str(NULL, &pid);
printf("PONG from pid %s\n", src_string);
- talloc_free(src_string);
+ TALLOC_FREE(src_string);
num_replies++;
}
if (!user_name[0] && (pwd = getpwuid_alloc(NULL, geteuid()))) {
fstrcpy(user_name, pwd->pw_name);
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
}
if (!user_name[0]) {
pwd = getpwuid_alloc(NULL, getuid());
if (pwd) {
fstrcpy(user_name,pwd->pw_name);
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
} else {
fprintf(stderr, "smbpasswd: cannot lookup user name for uid %u\n", (unsigned int)getuid());
exit(1);
head, user, (int)geteuid(), (int)getuid(), tail);
exit(0);
}
- talloc_free(pwd);
+ TALLOC_FREE(pwd);
}
/* Save the users name */
C_user = SMB_STRDUP(user);
- talloc_free(pass);
+ TALLOC_FREE(pass);
return True;
}
}
"WWW-Authenticate: Basic realm=\"SWAT\"\r\n",
"username or password incorrect");
- talloc_free(pass);
+ TALLOC_FREE(pass);
return False;
}