summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-12-09 23:31:15 +0100
committerGünther Deschner <gd@samba.org>2008-12-10 00:07:25 +0100
commit91bfd5f201f302156fac7f1bc7a685e6f3c22cf3 (patch)
tree77307aa565105b35925f950e95322ca1727af137 /source4
parente0711ffa526e22e3ffe483319ce5d7725d578647 (diff)
downloadsamba-91bfd5f201f302156fac7f1bc7a685e6f3c22cf3.tar.gz
samba-91bfd5f201f302156fac7f1bc7a685e6f3c22cf3.tar.bz2
samba-91bfd5f201f302156fac7f1bc7a685e6f3c22cf3.zip
s4-samr: Fix Bug #5946. userparameters handling in samr server.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 680fb77659..df23e11a67 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -140,11 +140,13 @@
#define SET_PARAMETERS(msg, field, attr) do { \
struct ldb_message_element *set_el; \
- if (samdb_msg_add_parameters(sam_ctx, mem_ctx, msg, attr, &r->in.info->field) != 0) { \
- return NT_STATUS_NO_MEMORY; \
+ if (r->in.info->field.length != 0) { \
+ if (samdb_msg_add_parameters(sam_ctx, mem_ctx, msg, attr, &r->in.info->field) != 0) { \
+ return NT_STATUS_NO_MEMORY; \
+ } \
+ set_el = ldb_msg_find_element(msg, attr); \
+ set_el->flags = LDB_FLAG_MOD_REPLACE; \
} \
- set_el = ldb_msg_find_element(msg, attr); \
- set_el->flags = LDB_FLAG_MOD_REPLACE; \
} while (0)