summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-04-26 01:15:57 +0000
committerSimo Sorce <idra@samba.org>2003-04-26 01:15:57 +0000
commit43b3ea968b0405efebf7c1cb4d5f541b50b388b0 (patch)
tree88808a105337a03ba2c7abd671004f623bcdee0c /source3/rpc_server
parentfda7b4b226d1fb6668006e34b3bfe4ac0f041117 (diff)
downloadsamba-43b3ea968b0405efebf7c1cb4d5f541b50b388b0.tar.gz
samba-43b3ea968b0405efebf7c1cb4d5f541b50b388b0.tar.bz2
samba-43b3ea968b0405efebf7c1cb4d5f541b50b388b0.zip
back port from HEAD
(This used to be commit f7cfdf20b7b3b7743c0c3af4ff62fdde00e45fdc)
Diffstat (limited to 'source3/rpc_server')
-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);
}