summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_interface.c7
-rw-r--r--source3/rpc_server/srv_samr_nt.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index a3b2706c35..d65b1b3463 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1023,16 +1023,15 @@ BOOL pdb_find_alias(const char *name, DOM_SID *sid)
name, sid));
}
-BOOL pdb_create_alias(const char *name, uint32 *rid)
+NTSTATUS pdb_create_alias(const char *name, uint32 *rid)
{
struct pdb_context *pdb_context = pdb_get_static_context(False);
if (!pdb_context) {
- return False;
+ return NT_STATUS_NOT_IMPLEMENTED;
}
- return NT_STATUS_IS_OK(pdb_context->pdb_create_alias(pdb_context,
- name, rid));
+ return pdb_context->pdb_create_alias(pdb_context, name, rid);
}
BOOL pdb_delete_alias(const DOM_SID *sid)
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 2e5fe295ec..f48a334fff 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3863,6 +3863,7 @@ NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, S
struct samr_info *info;
uint32 acc_granted;
gid_t gid;
+ NTSTATUS result;
/* Find the policy handle. Open a policy on it. */
if (!get_lsa_policy_samr_sid(p, &q_u->dom_pol, &dom_sid, &acc_granted))
@@ -3880,8 +3881,10 @@ NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, S
unistr2_to_ascii(name, &q_u->uni_acct_desc, sizeof(name)-1);
/* Have passdb create the alias */
- if (!pdb_create_alias(name, &r_u->rid))
- return NT_STATUS_ACCESS_DENIED;
+ result = pdb_create_alias(name, &r_u->rid);
+
+ if (!NT_STATUS_IS_OK(result))
+ return result;
sid_copy(&info_sid, get_global_sam_sid());
sid_append_rid(&info_sid, r_u->rid);