summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-09-19 00:24:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:19:00 -0500
commite0da0acac00a4eebdea4ba7e56c45a9e877eb3a5 (patch)
treeccef17b864c99f3e9f3ee3325e70b2e8fb2b0c25
parent602b604599c6a7c5fd6e3f8b6b1de61045a173da (diff)
downloadsamba-e0da0acac00a4eebdea4ba7e56c45a9e877eb3a5.tar.gz
samba-e0da0acac00a4eebdea4ba7e56c45a9e877eb3a5.tar.bz2
samba-e0da0acac00a4eebdea4ba7e56c45a9e877eb3a5.zip
r18656: fix stupid mistake causing segfaults in torture test
and also add one more field to be set. rafal (This used to be commit e2621d00638f7dbf9f0bf862d2841da73f26d0af)
-rw-r--r--source4/libnet/libnet_user.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index 787d7cac2e..c06000481f 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -447,6 +447,7 @@ struct composite_context *libnet_ModifyUser_send(struct libnet_context *ctx,
struct libnet_ModifyUser *r,
void (*monitor)(struct monitor_msg*))
{
+ const uint16_t level = 21;
struct composite_context *c;
struct modify_user_state *s;
struct composite_context *prereq_ctx;
@@ -469,8 +470,9 @@ struct composite_context *libnet_ModifyUser_send(struct libnet_context *ctx,
continue_domain_open_modify, monitor);
if (prereq_ctx) return prereq_ctx;
- s->user_mod.in.username = r->in.user_name;
- s->user_mod.in.domain_handle = ctx->samr.handle;
+ s->user_info.in.username = r->in.user_name;
+ s->user_info.in.domain_handle = ctx->samr.handle;
+ s->user_info.in.level = level;
userinfo_req = libnet_rpc_userinfo_send(ctx->samr.pipe, &s->user_info, monitor);
if (composite_nomem(userinfo_req, c)) return c;
@@ -579,6 +581,9 @@ static NTSTATUS set_user_changes(TALLOC_CTX *mem_ctx, struct usermod_change *mod
/* last logoff change time */
SET_FIELD_NTTIME(r->in, user, mod, last_logoff, USERMOD_FIELD_LAST_LOGOFF);
+ /* last password change time */
+ SET_FIELD_NTTIME(r->in, user, mod, last_password_change, USERMOD_FIELD_LAST_PASS_CHG);
+
/* account expiry change */
SET_FIELD_NTTIME(r->in, user, mod, acct_expiry, USERMOD_FIELD_ACCT_EXPIRY);