summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-04-26 01:01:14 +0000
committerSimo Sorce <idra@samba.org>2003-04-26 01:01:14 +0000
commit221729252b844e00f368c1e99f3010617e6781e5 (patch)
tree1312e03503cac486aa6b089174c9a204378c92cf /source3
parent6c9b614c5becb84359d8547cc5bb76d0523bea4e (diff)
downloadsamba-221729252b844e00f368c1e99f3010617e6781e5.tar.gz
samba-221729252b844e00f368c1e99f3010617e6781e5.tar.bz2
samba-221729252b844e00f368c1e99f3010617e6781e5.zip
A RID can never be zero
(This used to be commit e2d757aed27ede67cf904c01e8f23e436d764108)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_util.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c
index d7ead0d15f..b81c441811 100644
--- a/source3/rpc_server/srv_samr_util.c
+++ b/source3/rpc_server/srv_samr_util.c
@@ -169,13 +169,17 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
pdb_set_munged_dial(to , new_string, PDB_CHANGED);
}
- if (from->user_rid != pdb_get_user_rid(to)) {
+ 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));
/* we really allow this ??? metze */
/* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/
}
- if (from->group_rid != pdb_get_group_rid(to)) {
+ 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);
}
@@ -371,13 +375,16 @@ void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from)
pdb_set_munged_dial(to , new_string, PDB_CHANGED);
}
- if (from->user_rid != pdb_get_user_rid(to)) {
+ 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));
/* we really allow this ??? metze */
/* pdb_set_user_sid_from_rid(to, from->user_rid, PDB_CHANGED);*/
}
-
- if (from->group_rid != pdb_get_group_rid(to)) {
+ 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);
}