From fac81ffb42245d274e5f44cacf9e1d5b245f7516 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Aug 2008 01:04:21 +0200 Subject: netapi: support level 1011 in NetUserSetInfo. Guenther (This used to be commit b3680c0482ae05b32e9cf9fbddea57f0dd6e2bd3) --- source3/lib/netapi/user.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index d70a790b81..6737012ed0 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -64,6 +64,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, if (infoX->usriX_password_age) { fields_present |= SAMR_FIELD_FORCE_PWD_CHANGE; } + if (infoX->usriX_full_name) { + fields_present |= SAMR_FIELD_FULL_NAME; + } acct_flags |= infoX->usriX_flags | ACB_NORMAL; @@ -78,7 +81,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, 0, password_age, infoX->usriX_name, - NULL, + infoX->usriX_full_name, infoX->usriX_home_dir, NULL, infoX->usriX_script_path, @@ -113,6 +116,7 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level, struct USER_INFO_2 *u2 = NULL; struct USER_INFO_1003 *u1003 = NULL; struct USER_INFO_1007 *u1007 = NULL; + struct USER_INFO_1011 *u1011 = NULL; if (!buffer || !uX) { return NT_STATUS_INVALID_PARAMETER; @@ -171,6 +175,10 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level, u1007 = (struct USER_INFO_1007 *)buffer; uX->usriX_comment = u1007->usri1007_comment; break; + case 1011: + u1011 = (struct USER_INFO_1011 *)buffer; + uX->usriX_full_name = u1011->usri1011_full_name; + break; case 3: case 4: default: @@ -1305,6 +1313,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx, user_mask = SAMR_USER_ACCESS_SET_PASSWORD; break; case 1007: + case 1011: user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES; break; default: -- cgit