diff options
author | Günther Deschner <gd@samba.org> | 2008-08-28 12:05:43 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-08-29 13:58:04 +0200 |
commit | ab627f40c092fa8b1254b590203f919c05ab13d7 (patch) | |
tree | 37e8ce72f90eac0af7b39b2b99231900e5e5012d /source3 | |
parent | 29b96a63f13dba707c430638a8f0ca34b5993321 (diff) | |
download | samba-ab627f40c092fa8b1254b590203f919c05ab13d7.tar.gz samba-ab627f40c092fa8b1254b590203f919c05ab13d7.tar.bz2 samba-ab627f40c092fa8b1254b590203f919c05ab13d7.zip |
netapi: add info21_to_USER_INFO_10.
Guenther
(This used to be commit 3e0c5d4154a730fd9e4430d3e64f9c7bb654dc54)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/user.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 4e31175ebc..8ce97bedcc 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -744,6 +744,24 @@ static uint32_t samr_acb_flags_to_netapi_flags(uint32_t acb) /**************************************************************** ****************************************************************/ +static NTSTATUS info21_to_USER_INFO_10(TALLOC_CTX *mem_ctx, + const struct samr_UserInfo21 *i21, + struct USER_INFO_10 *i) +{ + ZERO_STRUCTP(i); + + i->usri10_name = talloc_strdup(mem_ctx, i21->account_name.string); + NT_STATUS_HAVE_NO_MEMORY(i->usri10_name); + i->usri10_comment = talloc_strdup(mem_ctx, i21->description.string); + i->usri10_full_name = talloc_strdup(mem_ctx, i21->full_name.string); + i->usri10_usr_comment = talloc_strdup(mem_ctx, i21->comment.string); + + return NT_STATUS_OK; +} + +/**************************************************************** +****************************************************************/ + static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *pipe_cli, struct dom_sid *domain_sid, @@ -807,18 +825,8 @@ static NTSTATUS libnetapi_samr_lookup_user_map_USER_INFO(TALLOC_CTX *mem_ctx, switch (level) { case 10: - info10.usri10_name = talloc_strdup(mem_ctx, - info21->account_name.string); - NT_STATUS_HAVE_NO_MEMORY(info10.usri10_name); - - info10.usri10_comment = talloc_strdup(mem_ctx, - info21->description.string); - - info10.usri10_full_name = talloc_strdup(mem_ctx, - info21->full_name.string); - - info10.usri10_usr_comment = talloc_strdup(mem_ctx, - info21->comment.string); + status = info21_to_USER_INFO_10(mem_ctx, info21, &info10); + NT_STATUS_NOT_OK_RETURN(status); ADD_TO_ARRAY(mem_ctx, struct USER_INFO_10, info10, (struct USER_INFO_10 **)buffer, num_entries); |