diff options
author | Günther Deschner <gd@samba.org> | 2008-08-27 02:02:30 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-08-29 13:57:57 +0200 |
commit | 4874a8b3b8ce755eca62eb28a4416703db866606 (patch) | |
tree | c34c484e70fdef4d7bc151f3631a654370541954 /source3/lib | |
parent | 3077047a17f2d852f3d6908cd1e48783df954448 (diff) | |
download | samba-4874a8b3b8ce755eca62eb28a4416703db866606.tar.gz samba-4874a8b3b8ce755eca62eb28a4416703db866606.tar.bz2 samba-4874a8b3b8ce755eca62eb28a4416703db866606.zip |
netapi: support level 1051 in NetUserSetInfo.
Guenther
(This used to be commit 8da3b1cacb4ffa7ce8932dc0e9ceb78395d49b98)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/user.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 5aff7f0d1e..51c946bf6d 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -78,6 +78,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, if (infoX->usriX_home_dir_drive) { fields_present |= SAMR_FIELD_HOME_DRIVE; } + if (infoX->usriX_primary_group_id) { + fields_present |= SAMR_FIELD_PRIMARY_GID; + } unix_to_nt_time_abs(&password_age, infoX->usriX_password_age); @@ -100,7 +103,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, infoX->usriX_usr_comment, &zero_parameters, 0, - 0, + infoX->usriX_primary_group_id, infoX->usriX_flags, fields_present, zero_logon_hours, @@ -129,6 +132,7 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level, struct USER_INFO_1009 *u1009 = NULL; struct USER_INFO_1011 *u1011 = NULL; struct USER_INFO_1012 *u1012 = NULL; + struct USER_INFO_1051 *u1051 = NULL; struct USER_INFO_1052 *u1052 = NULL; struct USER_INFO_1053 *u1053 = NULL; @@ -205,6 +209,10 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level, u1012 = (struct USER_INFO_1012 *)buffer; uX->usriX_usr_comment = u1012->usri1012_usr_comment; break; + case 1051: + u1051 = (struct USER_INFO_1051 *)buffer; + uX->usriX_primary_group_id = u1051->usri1051_primary_group_id; + break; case 1052: u1052 = (struct USER_INFO_1052 *)buffer; uX->usriX_profile = u1052->usri1052_profile; @@ -1358,6 +1366,9 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx, break; case 1012: user_mask = SAMR_USER_ACCESS_SET_LOC_COM; + case 1051: + user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES | + SAMR_USER_ACCESS_GET_GROUPS; break; default: werr = WERR_NOT_SUPPORTED; |