diff options
author | Günther Deschner <gd@samba.org> | 2008-08-27 19:25:07 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-08-29 13:58:00 +0200 |
commit | e96a99f3e2b33525cf87eff3d2a13118f21c5186 (patch) | |
tree | 725badc1d1d0b61c63ce147c95561dc1db0b4413 | |
parent | 1aee2cedc1c60435406fca8f51f237f4eebd80df (diff) | |
download | samba-e96a99f3e2b33525cf87eff3d2a13118f21c5186.tar.gz samba-e96a99f3e2b33525cf87eff3d2a13118f21c5186.tar.bz2 samba-e96a99f3e2b33525cf87eff3d2a13118f21c5186.zip |
netapi: add samr_acb_flags_to_netapi_flags for NetUserEnum and NetUserGetInfo.
Guenther
(This used to be commit 2f2c60bf91e1e2b3b24c4bb39ac598cb3c704158)
-rw-r--r-- | source3/lib/netapi/user.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 6e13a54528..3c42f8b931 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -675,6 +675,18 @@ static NTSTATUS libnetapi_samr_lookup_user(TALLOC_CTX *mem_ctx, /**************************************************************** ****************************************************************/ +static uint32_t samr_acb_flags_to_netapi_flags(uint32_t acb) +{ + uint32_t fl = UF_SCRIPT; /* god knows why */ + + fl |= ads_acb2uf(acb); + + return fl; +} + +/**************************************************************** +****************************************************************/ + static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *pipe_cli, struct dom_sid *domain_sid, @@ -763,7 +775,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, info20.usri20_full_name = talloc_strdup(mem_ctx, info21->full_name.string); - info20.usri20_flags = info21->acct_flags; + info20.usri20_flags = + samr_acb_flags_to_netapi_flags(info21->acct_flags); info20.usri20_user_id = rid; ADD_TO_ARRAY(mem_ctx, struct USER_INFO_20, info20, @@ -780,7 +793,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, info23.usri23_full_name = talloc_strdup(mem_ctx, info21->full_name.string); - info23.usri23_flags = info21->acct_flags; + info23.usri23_flags = + samr_acb_flags_to_netapi_flags(info21->acct_flags); if (!sid_compose(&sid, domain_sid, rid)) { return NT_STATUS_NO_MEMORY; |