summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-05-01 11:47:48 +0000
committerSimo Sorce <idra@samba.org>2003-05-01 11:47:48 +0000
commit75cace04fdcb672cc6c3c3ec8403206f2b222c50 (patch)
treea0e30d36b57bb698cd4af43c769c6deee0ca232d /source3/rpc_server
parented454fe3d677a27e19b904f5d0d3199b62c9a1b0 (diff)
downloadsamba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.gz
samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.tar.bz2
samba-75cace04fdcb672cc6c3c3ec8403206f2b222c50.zip
*id_to_*id call reshape to return NTSTATUS errors
plus internal fixes 1st stage (This used to be commit 6d036761e565bc93964bb3c939d5b7d78d5778a3)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpc_server/srv_util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index d2e4ff2614..69ac60a7db 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3396,7 +3396,7 @@ NTSTATUS _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_AD
}
/* check a real user exist before we run the script to add a user to a group */
- if (!sid_to_uid(pdb_get_user_sid(sam_user), &uid)) {
+ if (NT_STATUS_IS_ERR(sid_to_uid(pdb_get_user_sid(sam_user), &uid))) {
pdb_free_sam(&sam_user);
return NT_STATUS_NO_SUCH_USER;
}
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index f948088737..f96ccaef67 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -129,7 +129,7 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui
fstrcpy(user_name, pdb_get_username(sam_pass));
grid=pdb_get_group_rid(sam_pass);
- if (!sid_to_gid(pdb_get_group_sid(sam_pass), &gid)) {
+ if (NT_STATUS_IS_ERR(sid_to_gid(pdb_get_group_sid(sam_pass), &gid))) {
/* this should never happen */
DEBUG(2,("get_alias_user_groups: sid_to_gid failed!\n"));
pdb_free_sam(&sam_pass);