summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-27 02:11:54 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:57:57 +0200
commit502036e730902d26e384dc12faa517d1758f2925 (patch)
tree5d00f2a6a5eb2c9c0b401f74aff82336fa16f056 /source3/lib/netapi
parent4874a8b3b8ce755eca62eb28a4416703db866606 (diff)
downloadsamba-502036e730902d26e384dc12faa517d1758f2925.tar.gz
samba-502036e730902d26e384dc12faa517d1758f2925.tar.bz2
samba-502036e730902d26e384dc12faa517d1758f2925.zip
netapi: support level 1024 in NetUserSetInfo.
Guenther (This used to be commit 84bc7bf1adcde270ad20bba67345c0beed0b1d66)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/user.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 51c946bf6d..b67c5525d2 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -81,6 +81,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
if (infoX->usriX_primary_group_id) {
fields_present |= SAMR_FIELD_PRIMARY_GID;
}
+ if (infoX->usriX_country_code) {
+ fields_present |= SAMR_FIELD_COUNTRY_CODE;
+ }
unix_to_nt_time_abs(&password_age, infoX->usriX_password_age);
@@ -109,7 +112,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
zero_logon_hours,
0,
0,
- 0,
+ infoX->usriX_country_code,
0,
0,
0,
@@ -132,6 +135,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_1024 *u1024 = NULL;
struct USER_INFO_1051 *u1051 = NULL;
struct USER_INFO_1052 *u1052 = NULL;
struct USER_INFO_1053 *u1053 = NULL;
@@ -209,6 +213,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 1024:
+ u1024 = (struct USER_INFO_1024 *)buffer;
+ uX->usriX_country_code = u1024->usri1024_country_code;
+ break;
case 1051:
u1051 = (struct USER_INFO_1051 *)buffer;
uX->usriX_primary_group_id = u1051->usri1051_primary_group_id;
@@ -1365,6 +1373,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES;
break;
case 1012:
+ case 1024:
user_mask = SAMR_USER_ACCESS_SET_LOC_COM;
case 1051:
user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES |