summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_user.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-02-28 10:43:57 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-02-28 10:43:57 +1100
commit2a209a6a9dcd0c6b7814fa7eb3838dbaf5d57481 (patch)
treef32d81caee74ec343aefacf6de95e67058db2bec /source4/libnet/libnet_user.h
parentb33873ae5d13993030f41f5304d78640fe07d25c (diff)
downloadsamba-2a209a6a9dcd0c6b7814fa7eb3838dbaf5d57481.tar.gz
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)
Diffstat (limited to 'source4/libnet/libnet_user.h')
-rw-r--r--source4/libnet/libnet_user.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libnet/libnet_user.h b/source4/libnet/libnet_user.h
index ece06f08fc0..94aa38464f6 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 {