DEBUG(3,("sam_enum_dom_groups\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pnum_info) {
*pnum_info = 0;
}
}
error:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("samr_query_user_list\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pnum_info) {
*pnum_info = 0;
}
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_query_user\n"));
+ ZERO_STRUCT(dom_pol);
+
/* Paranoia check */
if (!sid_check_is_in_our_domain(user_sid)) {
return NT_STATUS_NO_SUCH_USER;
user_info);
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("samr: trusted domains\n"));
+ ZERO_STRUCT(lsa_policy);
+
if (ptrust_list) {
ZERO_STRUCTP(ptrust_list);
}
}
done:
+ if (is_valid_policy_hnd(&lsa_policy)) {
+ rpccli_lsa_Close(lsa_pipe, mem_ctx, &lsa_policy);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_lookup_groupmem\n"));
+ ZERO_STRUCT(dom_pol);
+
/* Paranoia check */
if (sid_check_is_in_builtin(group_sid) && (type != SID_NAME_ALIAS)) {
/* There's no groups, only aliases in BUILTIN */
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("samr: enum local groups\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pnum_info) {
*pnum_info = 0;
}
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_name_to_sid\n"));
+ ZERO_STRUCT(lsa_policy);
+
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return NT_STATUS_NO_MEMORY;
}
done:
+ if (is_valid_policy_hnd(&lsa_policy)) {
+ rpccli_lsa_Close(lsa_pipe, mem_ctx, &lsa_policy);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_sid_to_name\n"));
+ ZERO_STRUCT(lsa_policy);
+
/* Paranoia check */
if (!sid_check_is_in_builtin(sid) &&
!sid_check_is_in_our_domain(sid) &&
}
done:
+ if (is_valid_policy_hnd(&lsa_policy)) {
+ rpccli_lsa_Close(lsa_pipe, mem_ctx, &lsa_policy);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_rids_to_names for %s\n", domain->name));
+ ZERO_STRUCT(lsa_policy);
+
/* Paranoia check */
if (!sid_check_is_in_builtin(sid) &&
!sid_check_is_in_our_domain(sid) &&
}
done:
+ if (is_valid_policy_hnd(&lsa_policy)) {
+ rpccli_lsa_Close(lsa_pipe, mem_ctx, &lsa_policy);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_lockout_policy\n"));
+ ZERO_STRUCT(dom_pol);
+
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return NT_STATUS_NO_MEMORY;
*lockout_policy = info->info12;
error:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_password_policy\n"));
+ ZERO_STRUCT(dom_pol);
+
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return NT_STATUS_NO_MEMORY;
*passwd_policy = info->info1;
error:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_lookup_usergroups\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pnum_groups) {
*pnum_groups = 0;
}
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("sam_lookup_useraliases\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pnum_aliases) {
*pnum_aliases = 0;
}
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, mem_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}
DEBUG(3,("samr: sequence number\n"));
+ ZERO_STRUCT(dom_pol);
+
if (pseq) {
*pseq = DOM_SEQUENCE_NONE;
}
*pseq = seq;
}
done:
+ if (is_valid_policy_hnd(&dom_pol)) {
+ rpccli_samr_Close(samr_pipe, tmp_ctx, &dom_pol);
+ }
+
TALLOC_FREE(tmp_ctx);
return status;
}