[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-1081-g582073e
Andrew Bartlett
abartlet at samba.org
Wed Feb 27 23:45:22 GMT 2008
The branch, v4-0-test has been updated
via 582073eff1f21f81abb3e5f1ce2eca4ebef56a00 (commit)
from ba864cfd7ce4b69179431131cac9661cbf48bf32 (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 582073eff1f21f81abb3e5f1ce2eca4ebef56a00
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Feb 28 10:43:57 2008 +1100
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
-----------------------------------------------------------------------
Summary of changes:
source/libnet/libnet_user.c | 2 +-
source/libnet/libnet_user.h | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/libnet/libnet_user.c b/source/libnet/libnet_user.c
index d5ccf34..678c7a2 100644
--- a/source/libnet/libnet_user.c
+++ b/source/libnet/libnet_user.c
@@ -534,7 +534,7 @@ static NTSTATUS set_user_changes(TALLOC_CTX *mem_ctx, struct usermod_change *mod
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);
+ SET_FIELD_ACCT_FLAGS(r->in, user, mod, acct_flags, USERMOD_FIELD_ACCT_FLAGS);
return NT_STATUS_OK;
}
diff --git a/source/libnet/libnet_user.h b/source/libnet/libnet_user.h
index ece06f0..94aa384 100644
--- a/source/libnet/libnet_user.h
+++ b/source/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 {
--
Samba Shared Repository
More information about the samba-cvs
mailing list