summaryrefslogtreecommitdiff
path: root/source3/rpc_server
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 /source3/rpc_server
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)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c7
1 files changed, 5 insertions, 2 deletions
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);