diff options
author | Günther Deschner <gd@samba.org> | 2008-08-27 01:36:06 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-08-29 13:57:55 +0200 |
commit | f1ce72a80bb48210c2fbdc62a93578a6b5c4b5b6 (patch) | |
tree | ce8029e9a9c0b633c2a72232dde9a1a49e57c95b | |
parent | bd450a7c3a0cd20a940ce631fdb2a7724c0cdd68 (diff) | |
download | samba-f1ce72a80bb48210c2fbdc62a93578a6b5c4b5b6.tar.gz samba-f1ce72a80bb48210c2fbdc62a93578a6b5c4b5b6.tar.bz2 samba-f1ce72a80bb48210c2fbdc62a93578a6b5c4b5b6.zip |
netapi: fix acct_flags handling in convert_USER_INFO_X_to_samr_user_info21.
Guenther
(This used to be commit d3625b321f666bd506603b7c58ee89cd6b902d86)
-rw-r--r-- | source3/lib/netapi/user.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index 70bb353317..8fa0710dc1 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -30,16 +30,18 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, struct samr_UserInfo21 *info21) { - uint32_t fields_present = SAMR_FIELD_ACCT_FLAGS; + uint32_t fields_present = 0; struct samr_LogonHours zero_logon_hours; struct lsa_BinaryString zero_parameters; - uint32_t acct_flags = 0; NTTIME password_age; ZERO_STRUCTP(info21); ZERO_STRUCT(zero_logon_hours); ZERO_STRUCT(zero_parameters); + if (infoX->usriX_flags) { + fields_present |= SAMR_FIELD_ACCT_FLAGS; + } if (infoX->usriX_name) { fields_present |= SAMR_FIELD_ACCOUNT_NAME; } @@ -68,8 +70,6 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, fields_present |= SAMR_FIELD_FULL_NAME; } - acct_flags |= infoX->usriX_flags | ACB_NORMAL; - unix_to_nt_time_abs(&password_age, infoX->usriX_password_age); /* TODO: infoX->usriX_priv */ @@ -92,7 +92,7 @@ static void convert_USER_INFO_X_to_samr_user_info21(struct USER_INFO_X *infoX, &zero_parameters, 0, 0, - acct_flags, + infoX->usriX_flags, fields_present, zero_logon_hours, 0, @@ -359,6 +359,8 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx, goto done; } + uX.usriX_flags |= ACB_NORMAL; + status = set_user_info_USER_INFO_X(ctx, pipe_cli, &cli->user_session_key, &user_handle, |