netapi: support level 1053 in NetUserSetInfo.
authorGünther Deschner <gd@samba.org>
Tue, 26 Aug 2008 23:53:10 +0000 (01:53 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 29 Aug 2008 11:57:57 +0000 (13:57 +0200)
Guenther
(This used to be commit 039904f601755678fcbdef7d6bdc1c6da0082b83)

source3/lib/netapi/user.c

index c68fe37344dade1abb70e0f9977a08e511919570..5aff7f0d1ec193328869c09a5da20465f3eb00ef 100644 (file)
@@ -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: