struct policy_handle dom_pol = { 0 };
struct wb_acct_info *info = NULL;
uint32_t num_info = 0;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
*pnum_info = 0;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct rpc_pipe_client *samr_pipe = NULL;
struct policy_handle dom_pol = { 0 };
uint32_t *rids = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
DEBUG(3,("samr_query_user_list\n"));
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct policy_handle lsa_policy = { 0 };
struct netr_DomainTrust *trusts = NULL;
uint32_t num_trusts = 0;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
ZERO_STRUCTP(ptrust_list);
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
NULL,
char **names = NULL;
uint32_t *name_types = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
/* Paranoia check */
if (sid_check_is_in_builtin(group_sid) && (type != SID_NAME_ALIAS)) {
/* There's no groups, only aliases in BUILTIN */
- return NT_STATUS_NO_SUCH_GROUP;
+ status = NT_STATUS_NO_SUCH_GROUP;
+ goto done;
}
if (pnum_names) {
*pnum_names = 0;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct policy_handle dom_pol = { 0 };
struct wb_acct_info *info = NULL;
uint32_t num_info = 0;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
*pnum_info = 0;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct dom_sid sid;
const char *dom_name;
enum lsa_SidType type;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
DEBUG(3,("sam_name_to_sid\n"));
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
NULL,
char *domain_name = NULL;
char *name = NULL;
enum lsa_SidType type;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
DEBUG(0, ("sam_sid_to_name: possible deadlock - trying to "
"lookup SID %s\n",
dom_sid_str_buf(sid, &buf)));
- return NT_STATUS_NONE_MAPPED;
- }
-
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NONE_MAPPED;
+ goto done;
}
again:
enum lsa_SidType *types = NULL;
char *domain_name = NULL;
char **names = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
DEBUG(0, ("sam_rids_to_names: possible deadlock - trying to "
"lookup SID %s\n",
dom_sid_str_buf(domain_sid, &buf)));
- return NT_STATUS_NONE_MAPPED;
- }
-
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NONE_MAPPED;
+ goto done;
}
again:
struct rpc_pipe_client *samr_pipe;
struct policy_handle dom_pol = { 0 };
union samr_DomainInfo *info = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status, result;
struct dcerpc_binding_handle *b = NULL;
bool retry = false;
DEBUG(3,("sam_lockout_policy\n"));
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct rpc_pipe_client *samr_pipe;
struct policy_handle dom_pol = { 0 };
union samr_DomainInfo *info = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status, result;
struct dcerpc_binding_handle *b = NULL;
bool retry = false;
DEBUG(3,("sam_password_policy\n"));
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct policy_handle dom_pol;
struct dom_sid *user_grpsids = NULL;
uint32_t num_groups = 0;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
*pnum_groups = 0;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct policy_handle dom_pol = { 0 };
uint32_t num_aliases = 0;
uint32_t *alias_rids = NULL;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
*pnum_aliases = 0;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,
struct rpc_pipe_client *samr_pipe;
struct policy_handle dom_pol = { 0 };
uint32_t seq = DOM_SEQUENCE_NONE;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
NTSTATUS status;
bool retry = false;
*pseq = DOM_SEQUENCE_NONE;
}
- tmp_ctx = talloc_stackframe();
- if (tmp_ctx == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
again:
status = open_cached_internal_pipe_conn(domain,
&samr_pipe,