From 21dd06471ba882bf0ba475d7f45e42876792093b Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Thu, 20 Sep 2007 10:23:02 +0000 Subject: r25256: Fix missing field set in libnet_ModifyUser routine. Submitted by Matthias Dieter Wallnoefer rafal (This used to be commit 4fe47e4f976f125537b6a9fc7b13b25efe3d73a6) --- source4/libnet/libnet_user.c | 5 ++++- source4/libnet/libnet_user.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/libnet') diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index fe303620fe..28b743b42e 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -1,7 +1,7 @@ /* Unix SMB/CIFS implementation. - Copyright (C) Rafal Szczesniak 2005 + Copyright (C) Rafal Szczesniak 2005 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -533,6 +533,9 @@ static NTSTATUS set_user_changes(TALLOC_CTX *mem_ctx, struct usermod_change *mod /* account expiry change */ SET_FIELD_NTTIME(r->in, user, mod, acct_expiry, USERMOD_FIELD_ACCT_EXPIRY); + /* account flags change */ + SET_FIELD_UINT32(r->in, user, mod, acct_flags, USERMOD_FIELD_ACCT_FLAGS); + return NT_STATUS_OK; } diff --git a/source4/libnet/libnet_user.h b/source4/libnet/libnet_user.h index 3bbe1cc65e..ece06f08fc 100644 --- a/source4/libnet/libnet_user.h +++ b/source4/libnet/libnet_user.h @@ -85,6 +85,12 @@ struct libnet_ModifyUser { } \ } +#define SET_FIELD_UINT32(new, current, mod, field, flag) \ + if (current->field != new.field) { \ + mod->field = new.field; \ + mod->fields |= flag; \ + } + struct libnet_UserInfo { struct { -- cgit