diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-25 07:12:04 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-04-02 17:12:47 +0200 |
commit | 6ac62b30007d5b5870443f392d41f7ebfe52a5c3 (patch) | |
tree | 84f10c9c60e98997078758d702d14041ece01e4d | |
parent | 50b9748fc5c0d49ab0720b0ddfb59fdb88c186bd (diff) | |
download | samba-6ac62b30007d5b5870443f392d41f7ebfe52a5c3.tar.gz samba-6ac62b30007d5b5870443f392d41f7ebfe52a5c3.tar.xz samba-6ac62b30007d5b5870443f392d41f7ebfe52a5c3.zip |
s4:rpc_server/samr: passdown unmodified acct_flags to the ldb layer.
The samldb module will handle the verification and magic.
Change-Id: If38e0ed229b98eac4db9b39988de4a25f9a352f2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 6877b903b2..fb7ad52703 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -109,24 +109,10 @@ set_el->flags = LDB_FLAG_MOD_REPLACE; \ } while (0) -#define CHECK_FOR_MULTIPLES(value, flag, poss_flags) \ - do { \ - if ((value & flag) && ((value & flag) != (value & (poss_flags)))) { \ - return NT_STATUS_INVALID_PARAMETER; \ - } \ - } while (0) \ - /* Set account flags, discarding flags that cannot be set with SAMR */ #define SET_AFLAGS(msg, field, attr) do { \ struct ldb_message_element *set_el; \ - if ((r->in.info->field & (ACB_NORMAL | ACB_DOMTRUST | ACB_WSTRUST | ACB_SVRTRUST)) == 0) { \ - return NT_STATUS_INVALID_PARAMETER; \ - } \ - CHECK_FOR_MULTIPLES(r->in.info->field, ACB_NORMAL, ACB_NORMAL | ACB_DOMTRUST | ACB_WSTRUST | ACB_SVRTRUST); \ - CHECK_FOR_MULTIPLES(r->in.info->field, ACB_DOMTRUST, ACB_NORMAL | ACB_DOMTRUST | ACB_WSTRUST | ACB_SVRTRUST); \ - CHECK_FOR_MULTIPLES(r->in.info->field, ACB_WSTRUST, ACB_NORMAL | ACB_DOMTRUST | ACB_WSTRUST | ACB_SVRTRUST); \ - CHECK_FOR_MULTIPLES(r->in.info->field, ACB_SVRTRUST, ACB_NORMAL | ACB_DOMTRUST | ACB_WSTRUST | ACB_SVRTRUST); \ - if (samdb_msg_add_acct_flags(sam_ctx, mem_ctx, msg, attr, (r->in.info->field & ~(ACB_AUTOLOCK|ACB_PW_EXPIRED))) != 0) { \ + if (samdb_msg_add_acct_flags(sam_ctx, mem_ctx, msg, attr, r->in.info->field) != 0) { \ return NT_STATUS_NO_MEMORY; \ } \ set_el = ldb_msg_find_element(msg, attr); \ |