summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-27 01:36:49 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:57:56 +0200
commit3029122f5e20671de5c440962c2a3aee3f661674 (patch)
tree682e4ac5c3cfa4f094f3a9ab7f29b2f057537a1f /source3/lib
parentf1ce72a80bb48210c2fbdc62a93578a6b5c4b5b6 (diff)
downloadsamba-3029122f5e20671de5c440962c2a3aee3f661674.tar.gz
samba-3029122f5e20671de5c440962c2a3aee3f661674.tar.bz2
samba-3029122f5e20671de5c440962c2a3aee3f661674.zip
netapi: support level 1012 in NetUserSetInfo.
Guenther (This used to be commit db650e9b6ead70152b2640415477bb26d0b16097)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/user.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 8fa0710dc1..b7581957c4 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -69,6 +69,9 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
if (infoX->usriX_full_name) {
fields_present |= SAMR_FIELD_FULL_NAME;
}
+ if (infoX->usriX_usr_comment) {
+ fields_present |= SAMR_FIELD_COMMENT;
+ }
unix_to_nt_time_abs(&password_age, infoX->usriX_password_age);
@@ -88,7 +91,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX,
NULL,
infoX->usriX_comment,
NULL,
- NULL,
+ infoX->usriX_usr_comment,
&zero_parameters,
0,
0,
@@ -118,6 +121,7 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level,
struct USER_INFO_1007 *u1007 = NULL;
struct USER_INFO_1009 *u1009 = NULL;
struct USER_INFO_1011 *u1011 = NULL;
+ struct USER_INFO_1012 *u1012 = NULL;
if (!buffer || !uX) {
return NT_STATUS_INVALID_PARAMETER;
@@ -184,6 +188,10 @@ static NTSTATUS construct_USER_INFO_X(uint32_t level,
u1011 = (struct USER_INFO_1011 *)buffer;
uX->usriX_full_name = u1011->usri1011_full_name;
break;
+ case 1012:
+ u1012 = (struct USER_INFO_1012 *)buffer;
+ uX->usriX_usr_comment = u1012->usri1012_usr_comment;
+ break;
case 3:
case 4:
default:
@@ -1324,6 +1332,9 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
case 1011:
user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES;
break;
+ case 1012:
+ user_mask = SAMR_USER_ACCESS_SET_LOC_COM;
+ break;
default:
werr = WERR_NOT_SUPPORTED;
goto done;