]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netapi: support level 1014 in NetUserSetInfo.
authorGünther Deschner <gd@samba.org>
Wed, 27 Aug 2008 00:18:30 +0000 (02:18 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 29 Aug 2008 11:57:57 +0000 (13:57 +0200)
Guenther

source/lib/netapi/user.c

index b67c5525d25bd0521122844c1c208c8fa16fe061..dba7542235e6dd7881e616351f8d32740711fb15 100644 (file)
@@ -84,6 +84,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
        if (infoX->usriX_country_code) {
                fields_present |= SAMR_FIELD_COUNTRY_CODE;
        }
+       if (infoX->usriX_workstations) {
+               fields_present |= SAMR_FIELD_WORKSTATIONS;
+       }
 
        unix_to_nt_time_abs(&password_age, infoX->usriX_password_age);
 
@@ -102,7 +105,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
                              infoX->usriX_script_path,
                              infoX->usriX_profile,
                              infoX->usriX_comment,
-                             NULL,
+                             infoX->usriX_workstations,
                              infoX->usriX_usr_comment,
                              &zero_parameters,
                              0,
@@ -135,6 +138,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_1014 *u1014 = NULL;
        struct USER_INFO_1024 *u1024 = NULL;
        struct USER_INFO_1051 *u1051 = NULL;
        struct USER_INFO_1052 *u1052 = NULL;
@@ -213,6 +217,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 1014:
+                       u1014 = (struct USER_INFO_1014 *)buffer;
+                       uX->usriX_workstations  = u1014->usri1014_workstations;
+                       break;
                case 1024:
                        u1024 = (struct USER_INFO_1024 *)buffer;
                        uX->usriX_country_code  = u1024->usri1024_country_code;
@@ -1368,6 +1376,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
                case 1007:
                case 1009:
                case 1011:
+               case 1014:
                case 1052:
                case 1053:
                        user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES;