diff options
author | Sumit Bose <sbose@redhat.com> | 2011-04-04 13:14:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-04-06 11:53:56 +0200 |
commit | ca22befb9c2f4bf96944fc70650435dc11b4ea3a (patch) | |
tree | 0a5b34712f4fda2a55c56d624d2b423899c059ae /source3/passdb | |
parent | f3b1a68f5f540fa3674c5594ad3ede1568bab6cb (diff) | |
download | samba-ca22befb9c2f4bf96944fc70650435dc11b4ea3a.tar.gz samba-ca22befb9c2f4bf96944fc70650435dc11b4ea3a.tar.bz2 samba-ca22befb9c2f4bf96944fc70650435dc11b4ea3a.zip |
s3-pdb_ipa: Use new smbldap_make_mod_blob() without a return value
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ipa.c | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c index f8ae30319c..2024181c5d 100644 --- a/source3/passdb/pdb_ipa.c +++ b/source3/passdb/pdb_ipa.c @@ -416,23 +416,6 @@ static bool smbldap_make_mod_uint32_t(LDAP *ldap_struct, LDAPMessage *entry, return true; } -static bool _smbldap_make_mod_blob(LDAP *ldap_struct, LDAPMessage *entry, - LDAPMod ***mods, const char *attribute, - DATA_BLOB blob) -{ - char *dummy; - - dummy = base64_encode_data_blob(talloc_tos(), blob); - if (dummy == NULL) { - return false; - } - - smbldap_make_mod(ldap_struct, entry, mods, attribute, dummy); - TALLOC_FREE(dummy); - - return true; -} - static NTSTATUS ipasam_set_trusted_domain(struct pdb_methods *methods, const char* domain, const struct pdb_trusted_domain *td) @@ -505,33 +488,21 @@ static NTSTATUS ipasam_set_trusted_domain(struct pdb_methods *methods, } if (td->trust_auth_outgoing.data != NULL) { - res = _smbldap_make_mod_blob(priv2ld(ldap_state), entry, - &mods, - LDAP_ATTRIBUTE_TRUST_AUTH_OUTGOING, - td->trust_auth_outgoing); - if (!res) { - return NT_STATUS_UNSUCCESSFUL; - } + smbldap_make_mod_blob(priv2ld(ldap_state), entry, &mods, + LDAP_ATTRIBUTE_TRUST_AUTH_OUTGOING, + &td->trust_auth_outgoing); } if (td->trust_auth_incoming.data != NULL) { - res = _smbldap_make_mod_blob(priv2ld(ldap_state), entry, - &mods, - LDAP_ATTRIBUTE_TRUST_AUTH_INCOMING, - td->trust_auth_incoming); - if (!res) { - return NT_STATUS_UNSUCCESSFUL; - } + smbldap_make_mod_blob(priv2ld(ldap_state), entry, &mods, + LDAP_ATTRIBUTE_TRUST_AUTH_INCOMING, + &td->trust_auth_incoming); } if (td->trust_forest_trust_info.data != NULL) { - res = _smbldap_make_mod_blob(priv2ld(ldap_state), entry, - &mods, - LDAP_ATTRIBUTE_TRUST_FOREST_TRUST_INFO, - td->trust_forest_trust_info); - if (!res) { - return NT_STATUS_UNSUCCESSFUL; - } + smbldap_make_mod_blob(priv2ld(ldap_state), entry, &mods, + LDAP_ATTRIBUTE_TRUST_FOREST_TRUST_INFO, + &td->trust_forest_trust_info); } talloc_autofree_ldapmod(talloc_tos(), mods); |