From e0da0acac00a4eebdea4ba7e56c45a9e877eb3a5 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Tue, 19 Sep 2006 00:24:41 +0000 Subject: 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) --- source4/libnet/libnet_user.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source4/libnet/libnet_user.c') 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); -- cgit