From 2a209a6a9dcd0c6b7814fa7eb3838dbaf5d57481 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 28 Feb 2008 10:43:57 +1100 Subject: Ensure we don't try and set the acct_flags if they are 0 (meaning unchanged in this interface). We seem to have two very similar interfaces here, and this is the poorer interface, for this reason. Andrew Bartlett (This used to be commit 582073eff1f21f81abb3e5f1ce2eca4ebef56a00) --- source4/libnet/libnet_user.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/libnet/libnet_user.h') diff --git a/source4/libnet/libnet_user.h b/source4/libnet/libnet_user.h index ece06f08fc..94aa38464f 100644 --- a/source4/libnet/libnet_user.h +++ b/source4/libnet/libnet_user.h @@ -91,6 +91,14 @@ struct libnet_ModifyUser { mod->fields |= flag; \ } +#define SET_FIELD_ACCT_FLAGS(new, current, mod, field, flag) \ + if (new.field) { \ + if (current->field != new.field) { \ + mod->field = new.field; \ + mod->fields |= flag; \ + } \ + } + struct libnet_UserInfo { struct { -- cgit