diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-05-09 11:40:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:21:55 -0500 |
commit | a0f9db7a169886914b4e5323c61e127011a2d16b (patch) | |
tree | b98006fec9336fabacae0c343fa315f1d5abc00b /source3/rpc_server | |
parent | 16ae8eff937c1344192a3afa84ff1eb14de5d46d (diff) | |
download | samba-a0f9db7a169886914b4e5323c61e127011a2d16b.tar.gz samba-a0f9db7a169886914b4e5323c61e127011a2d16b.tar.bz2 samba-a0f9db7a169886914b4e5323c61e127011a2d16b.zip |
r22767: Argl. Typed in 'svn ci' in the wrong branch. Revert.
(This used to be commit 2c5b951eba509e826a29775db992aca474476484)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index b392f289a8..1b9a8c375b 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1354,7 +1354,7 @@ NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAM DOM_SID sid; struct acct_info info; uint32 acc_granted; - NTSTATUS status; + BOOL ret; r_u->status = NT_STATUS_OK; @@ -1368,11 +1368,11 @@ NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAM } become_root(); - status = pdb_get_aliasinfo(&sid, &info); + ret = pdb_get_aliasinfo(&sid, &info); unbecome_root(); - if ( !NT_STATUS_IS_OK(status)) - return status; + if ( !ret ) + return NT_STATUS_NO_SUCH_ALIAS; if ( !(r_u->ctr = TALLOC_ZERO_P( p->mem_ctx, ALIAS_INFO_CTR )) ) return NT_STATUS_NO_MEMORY; @@ -4301,7 +4301,7 @@ NTSTATUS _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, S uint32 acc_granted; SE_PRIV se_rights; BOOL can_add_accounts; - NTSTATUS status; + BOOL ret; DISP_INFO *disp_info = NULL; DEBUG(5, ("_samr_delete_dom_alias: %d\n", __LINE__)); @@ -4340,15 +4340,15 @@ NTSTATUS _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, S become_root(); /* Have passdb delete the alias */ - status = pdb_delete_alias(&alias_sid); + ret = pdb_delete_alias(&alias_sid); if ( can_add_accounts ) unbecome_root(); /******** END SeAddUsers BLOCK *********/ - if ( !NT_STATUS_IS_OK(status)) - return status; + if ( !ret ) + return NT_STATUS_ACCESS_DENIED; if (!close_policy_hnd(p, &q_u->alias_pol)) return NT_STATUS_OBJECT_NAME_INVALID; @@ -4693,8 +4693,8 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_ struct acct_info info; ALIAS_INFO_CTR *ctr; uint32 acc_granted; + BOOL ret; BOOL can_mod_accounts; - NTSTATUS status; DISP_INFO *disp_info = NULL; if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &group_sid, &acc_granted, &disp_info)) @@ -4709,16 +4709,18 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_ /* get the current group information */ become_root(); - status = pdb_get_aliasinfo( &group_sid, &info ); + ret = pdb_get_aliasinfo( &group_sid, &info ); unbecome_root(); - if ( !NT_STATUS_IS_OK(status)) - return status; + if ( !ret ) { + return NT_STATUS_NO_SUCH_ALIAS; + } switch (ctr->level) { case 2: { fstring group_name, acct_name; + NTSTATUS status; /* We currently do not support renaming groups in the the BUILTIN domain. Refer to util_builtin.c to understand @@ -4774,17 +4776,18 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_ if ( can_mod_accounts ) become_root(); - status = pdb_set_aliasinfo( &group_sid, &info ); + ret = pdb_set_aliasinfo( &group_sid, &info ); if ( can_mod_accounts ) unbecome_root(); /******** End SeAddUsers BLOCK *********/ - if (NT_STATUS_IS_OK(status)) + if (ret) { force_flush_samr_cache(disp_info); + } - return status; + return ret ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED; } /********************************************************************* |