summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-27 01:53:10 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:57:57 +0200
commit3077047a17f2d852f3d6908cd1e48783df954448 (patch)
treef9a3cfb5532994dfa8bf3f0cc18a0a338471e8fe /source3/lib
parent49db2e0ae18b9aac34faa00ef9f2a84461d13678 (diff)
downloadsamba-3077047a17f2d852f3d6908cd1e48783df954448.tar.gz
samba-3077047a17f2d852f3d6908cd1e48783df954448.tar.bz2
samba-3077047a17f2d852f3d6908cd1e48783df954448.zip
netapi: support level 1053 in NetUserSetInfo.
Guenther (This used to be commit 039904f601755678fcbdef7d6bdc1c6da0082b83)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/user.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index c68fe37344..5aff7f0d1e 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -75,6 +75,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
if (infoX->usriX_profile) {
fields_present |= SAMR_FIELD_PROFILE_PATH;
}
+ if (infoX->usriX_home_dir_drive) {
+ fields_present |= SAMR_FIELD_HOME_DRIVE;
+ }
unix_to_nt_time_abs(&password_age, infoX->usriX_password_age);
@@ -89,7 +92,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
infoX->usriX_name,
infoX->usriX_full_name,
infoX->usriX_home_dir,
- NULL,
+ infoX->usriX_home_dir_drive,
infoX->usriX_script_path,
infoX->usriX_profile,
infoX->usriX_comment,
@@ -127,6 +130,7 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level,
struct USER_INFO_1011 *u1011 = NULL;
struct USER_INFO_1012 *u1012 = NULL;
struct USER_INFO_1052 *u1052 = NULL;
+ struct USER_INFO_1053 *u1053 = NULL;
if (!buffer || !uX) {
return NT_STATUS_INVALID_PARAMETER;
@@ -205,7 +209,10 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level,
u1052 = (struct USER_INFO_1052 *)buffer;
uX->usriX_profile = u1052->usri1052_profile;
break;
-
+ case 1053:
+ u1053 = (struct USER_INFO_1053 *)buffer;
+ uX->usriX_home_dir_drive = u1053->usri1053_home_dir_drive;
+ break;
case 3:
case 4:
default:
@@ -1346,6 +1353,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
case 1009:
case 1011:
case 1052:
+ case 1053:
user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES;
break;
case 1012: