summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_get_set.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-11 15:39:47 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:49 +1000
commitadd8505fde9d178b3a0dbb71a207485cdb8fc161 (patch)
tree6d2ac4133765e15af15004caa368ca39e55a7533 /source3/passdb/pdb_get_set.c
parentc5e41a21dd2dad9b43b40b38f75cea0da67c2cce (diff)
downloadsamba-add8505fde9d178b3a0dbb71a207485cdb8fc161.tar.gz
samba-add8505fde9d178b3a0dbb71a207485cdb8fc161.tar.bz2
samba-add8505fde9d178b3a0dbb71a207485cdb8fc161.zip
s3-passdb Make pdb_element_is_changed available to all passdb modules
This will allow pdb_samba4 to use this Andrew Bartlett
Diffstat (limited to 'source3/passdb/pdb_get_set.c')
-rw-r--r--source3/passdb/pdb_get_set.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 4ff13808c3..d0d7317e68 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -1088,3 +1088,26 @@ uint32_t pdb_build_fields_present(struct samu *sampass)
/* value set to all for testing */
return 0x00ffffff;
}
+
+/**********************************************************************
+ Helper function to determine for update_sam_account whether
+ we need LDAP modification.
+*********************************************************************/
+
+bool pdb_element_is_changed(const struct samu *sampass,
+ enum pdb_elements element)
+{
+ return IS_SAM_CHANGED(sampass, element);
+}
+
+/**********************************************************************
+ Helper function to determine for update_sam_account whether
+ we need LDAP modification.
+ *********************************************************************/
+
+bool pdb_element_is_set_or_changed(const struct samu *sampass,
+ enum pdb_elements element)
+{
+ return (IS_SAM_SET(sampass, element) ||
+ IS_SAM_CHANGED(sampass, element));
+}