summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-02-19 17:33:28 +0000
committerGerald Carter <jerry@samba.org>2004-02-19 17:33:28 +0000
commite8cc387efa9a4844975d44350081aa62d4546e7b (patch)
treee60d03ff5103c0aa6c83881e08f911bd69a1c0ca /source3
parentfba14cbfbecb8eef8b030d46309f9fbbffbd219d (diff)
downloadsamba-e8cc387efa9a4844975d44350081aa62d4546e7b.tar.gz
samba-e8cc387efa9a4844975d44350081aa62d4546e7b.tar.bz2
samba-e8cc387efa9a4844975d44350081aa62d4546e7b.zip
fixing error in logic when checking flags changed field on user primary group sid
(This used to be commit c275d8f831490a52bae11698349a6b795d12f924)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_util.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c
index d54a858878..706c893c92 100644
--- a/source3/rpc_server/srv_samr_util.c
+++ b/source3/rpc_server/srv_samr_util.c
@@ -218,21 +218,21 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
SAFE_FREE(newstr);
}
- if ((from->fields_present & ACCT_RID) &&
- (from->user_rid == 0)) {
- DEBUG(10, ("INFO_21: Asked to set User RID to 0 !? Skipping change!\n"));
- } else if (from->user_rid != pdb_get_user_rid(to)) {
- DEBUG(10,("INFO_21 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid));
- /* we really allow this ??? metze */
- /* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/
+ if (from->fields_present & ACCT_RID) {
+ if (from->user_rid == 0) {
+ DEBUG(10, ("INFO_21: Asked to set User RID to 0 !? Skipping change!\n"));
+ } else if (from->user_rid != pdb_get_user_rid(to)) {
+ DEBUG(10,("INFO_21 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid));
+ }
}
- if ((from->fields_present & ACCT_PRIMARY_GID) &&
- (from->group_rid == 0)) {
- DEBUG(10, ("INFO_21: Asked to set Group RID to 0 !? Skipping change!\n"));
- } else if (from->group_rid != pdb_get_group_rid(to)) {
- DEBUG(10,("INFO_21 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid));
- pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED);
+ if (from->fields_present & ACCT_PRIMARY_GID) {
+ if (from->group_rid == 0) {
+ DEBUG(10, ("INFO_21: Asked to set Group RID to 0 !? Skipping change!\n"));
+ } else if (from->group_rid != pdb_get_group_rid(to)) {
+ DEBUG(10,("INFO_21 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid));
+ pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED);
+ }
}
if (from->fields_present & ACCT_FLAGS) {
@@ -474,21 +474,21 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from)
SAFE_FREE(newstr);
}
- if ((from->fields_present & ACCT_RID) &&
- (from->user_rid == 0)) {
- DEBUG(10, ("INFO_23: Asked to set User RID to 0 !? Skipping change!\n"));
- } else if (from->user_rid != pdb_get_user_rid(to)) {
- DEBUG(10,("INFO_23 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid));
- /* we really allow this ??? metze */
- /* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/
- }
-
- if ((from->fields_present & ACCT_PRIMARY_GID) &&
- (from->group_rid == 0)) {
- DEBUG(10, ("INFO_23: Asked to set Group RID to 0 !? Skipping change!\n"));
- } else if (from->group_rid != pdb_get_group_rid(to)) {
- DEBUG(10,("INFO_23 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid));
- pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED);
+ if (from->fields_present & ACCT_RID) {
+ if (from->user_rid == 0) {
+ DEBUG(10, ("INFO_23: Asked to set User RID to 0 !? Skipping change!\n"));
+ } else if (from->user_rid != pdb_get_user_rid(to)) {
+ DEBUG(10,("INFO_23 USER_RID: %u -> %u NOT UPDATED!\n",pdb_get_user_rid(to),from->user_rid));
+ }
+ }
+
+ if (from->fields_present & ACCT_PRIMARY_GID) {
+ if (from->group_rid == 0) {
+ DEBUG(10, ("INFO_23: Asked to set Group RID to 0 !? Skipping change!\n"));
+ } else if (from->group_rid != pdb_get_group_rid(to)) {
+ DEBUG(10,("INFO_23 GROUP_RID: %u -> %u\n",pdb_get_group_rid(to),from->group_rid));
+ pdb_set_group_sid_from_rid(to, from->group_rid, PDB_CHANGED);
+ }
}
if (from->fields_present & ACCT_FLAGS) {