summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-04-10 16:09:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:11 -0500
commit69a91df4ed4fc8a8d2105d098e4572e6c0da5ebb (patch)
treea7dbb118c84f655044b66921a4870d7af48a62e1
parentd29e174608c12b31fa38a082a42d99b8365436c2 (diff)
downloadsamba-69a91df4ed4fc8a8d2105d098e4572e6c0da5ebb.tar.gz
samba-69a91df4ed4fc8a8d2105d098e4572e6c0da5ebb.tar.bz2
samba-69a91df4ed4fc8a8d2105d098e4572e6c0da5ebb.zip
r145: pdb_create_alias now returns NTSTATUS. More of this to follow.
Volker (This used to be commit 6e18bed17093e0b1792f68817096e64e0e841f26)
-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);