summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr/dcesrv_samr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-10 12:05:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:56 -0500
commit5afbecdc2ecff643002d3c94ffcc9c4212cf6c0d (patch)
treecb3d32eea6802ba61cddfa1865e78eb7e73c6855 /source4/rpc_server/samr/dcesrv_samr.c
parent7dc054acaf5e4fca87f54971600e76295c4df8c9 (diff)
downloadsamba-5afbecdc2ecff643002d3c94ffcc9c4212cf6c0d.tar.gz
samba-5afbecdc2ecff643002d3c94ffcc9c4212cf6c0d.tar.bz2
samba-5afbecdc2ecff643002d3c94ffcc9c4212cf6c0d.zip
r625: - handle passwords longer than length 14 (thanks to abartlet for pointing out the bug)
- delete unicodePwd if not storing a plaintext password (This used to be commit 6c3f22a685c55f183f4e0e4303e3d9990f4b39b5)
Diffstat (limited to 'source4/rpc_server/samr/dcesrv_samr.c')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 1d64fad5ba..44bf55b013 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -488,7 +488,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
"(&(name=TemplateGroup)(objectclass=groupTemplate))");
if (ret != 0) {
- DEBUG(1,("Failed to load TemplateUser from samdb\n"));
+ DEBUG(1,("Failed to load TemplateGroup from samdb\n"));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
@@ -1771,9 +1771,12 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
return status;
}
- /* mark all the message elements as LDB_FLAG_MOD_REPLACE */
+ /* mark all the message elements as LDB_FLAG_MOD_REPLACE,
+ unless they are already marked with some other flag */
for (i=0;i<mod.num_elements;i++) {
- mod.elements[i].flags = LDB_FLAG_MOD_REPLACE;
+ if (mod.elements[i].flags == 0) {
+ mod.elements[i].flags = LDB_FLAG_MOD_REPLACE;
+ }
}
/* modify the samdb record */