diff options
author | Günther Deschner <gd@samba.org> | 2008-06-09 11:01:59 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-17 19:59:50 +0200 |
commit | d0b7bccf6d7ce8b5f053a73a722d388d2483d8e8 (patch) | |
tree | 3edaff550f85296052a29104625d6c51e0f3bf75 /source3/lib/netapi | |
parent | 68064b8101d2a782c65e6558a01931b186d0ca40 (diff) | |
download | samba-d0b7bccf6d7ce8b5f053a73a722d388d2483d8e8.tar.gz samba-d0b7bccf6d7ce8b5f053a73a722d388d2483d8e8.tar.bz2 samba-d0b7bccf6d7ce8b5f053a73a722d388d2483d8e8.zip |
netapi: implement NetUserEnum filters.
Guenther
(This used to be commit 0bd69df7704789888eba2a07aba505dce037c4eb)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/user.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index f053732ac9..53a307a6aa 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -468,6 +468,7 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx, struct dom_sid2 *domain_sid = NULL; struct policy_handle domain_handle; struct samr_SamArray *sam = NULL; + uint32_t filter = ACB_NORMAL; NTSTATUS status; WERROR werr; @@ -512,11 +513,31 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx, goto done; } + switch (r->in.filter) { + case FILTER_NORMAL_ACCOUNT: + filter = ACB_NORMAL; + break; + case FILTER_TEMP_DUPLICATE_ACCOUNT: + filter = ACB_TEMPDUP; + break; + case FILTER_INTERDOMAIN_TRUST_ACCOUNT: + filter = ACB_DOMTRUST; + break; + case FILTER_WORKSTATION_TRUST_ACCOUNT: + filter = ACB_WSTRUST; + break; + case FILTER_SERVER_TRUST_ACCOUNT: + filter = ACB_SVRTRUST; + break; + default: + break; + } + status = rpccli_samr_EnumDomainUsers(pipe_cli, ctx, &domain_handle, r->in.resume_handle, - r->in.filter, + filter, &sam, r->in.prefmaxlen, r->out.entries_read); |