[Freeipa-devel] [PATCH] ipasam: Fixes build with samba4 rc1

Sumit Bose sbose at redhat.com
Fri Sep 14 14:43:46 UTC 2012


Hi,

in samba4 rc1 there is an API change which we have to adopt in ipasam.
This patch updates ipasam and unbreaks the build with samba4 rc1.

bye,
Sumit
-------------- next part --------------
From 4e39eb306da08b29f694b9ff44ccb53865e33d92 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Fri, 14 Sep 2012 14:14:23 +0200
Subject: [PATCH] ipasam: Fixes build with samba4 rc1

---
 daemons/ipa-sam/ipa_sam.c | 20 ++++++++++----------
 freeipa.spec.in           |  5 ++++-
 2 Dateien ge?ndert, 14 Zeilen hinzugef?gt(+), 11 Zeilen entfernt(-)

diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c
index b3c336443d28d6850a283a373351043b2460eeaa..3d4f741c157fb624e272d800bd9e0cdf9edb9444 100644
--- a/daemons/ipa-sam/ipa_sam.c
+++ b/daemons/ipa-sam/ipa_sam.c
@@ -476,7 +476,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
 				    ldap_state->ipasam_privates->base_dn,
 				    LDAP_SCOPE_SUBTREE, filter, ldap_attrs, 0,
 				    &msg);
-		talloc_autofree_ldapmsg(mem_ctx, msg);
+		smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
 	}
 
 	if (rc != LDAP_SUCCESS)
@@ -546,7 +546,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
 				    ldap_state->ipasam_privates->base_dn,
 				    LDAP_SCOPE_SUBTREE, filter, ldap_attrs, 0,
 				    &msg);
-		talloc_autofree_ldapmsg(mem_ctx, msg);
+		smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
 	}
 
 	if (rc != LDAP_SUCCESS)
@@ -665,7 +665,7 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
 	if (rc != LDAP_SUCCESS) {
 		goto done;
 	}
-	talloc_autofree_ldapmsg(mem_ctx, result);
+	smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
 
 	if (ldap_count_entries(priv2ld(priv), result) != 1) {
 		DEBUG(10, ("Got %d entries, expected one\n",
@@ -755,7 +755,7 @@ static bool ldapsam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
 	if (rc != LDAP_SUCCESS) {
 		goto done;
 	}
-	talloc_autofree_ldapmsg(tmp_ctx, result);
+	smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
 
 	if (ldap_count_entries(priv2ld(priv), result) != 1) {
 		DEBUG(3, ("ERROR: Got %d entries for uid %u, expected one\n",
@@ -822,7 +822,7 @@ static bool ldapsam_gid_to_sid(struct pdb_methods *methods, gid_t gid,
 	if (rc != LDAP_SUCCESS) {
 		goto done;
 	}
-	talloc_autofree_ldapmsg(tmp_ctx, result);
+	smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
 
 	if (ldap_count_entries(priv2ld(priv), result) != 1) {
 		DEBUG(3, ("ERROR: Got %d entries for gid %u, expected one\n",
@@ -1482,7 +1482,7 @@ static bool search_krb_princ(struct ldapsam_privates *ldap_state,
 			    LDAP_SCOPE_SUBTREE, filter, NULL, 0, &result);
 
 	if (result != NULL) {
-		talloc_autofree_ldapmsg(mem_ctx, result);
+		smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
 	}
 
 	if (rc == LDAP_NO_SUCH_OBJECT) {
@@ -1782,7 +1782,7 @@ static bool get_trusted_domain_int(struct ldapsam_privates *ldap_state,
 			    LDAP_SCOPE_SUBTREE, filter, NULL, 0, &result);
 
 	if (result != NULL) {
-		talloc_autofree_ldapmsg(mem_ctx, result);
+		smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
 	}
 
 	if (rc == LDAP_NO_SUCH_OBJECT) {
@@ -2275,7 +2275,7 @@ static NTSTATUS ipasam_set_trusted_domain(struct pdb_methods *methods,
 				      &td->trust_forest_trust_info);
 	}
 
-	talloc_autofree_ldapmod(tmp_ctx, mods);
+	smbldap_talloc_autofree_ldapmod(tmp_ctx, mods);
 
 	trusted_dn = trusted_domain_dn(tmp_ctx, ldap_state, domain);
 	if (trusted_dn == NULL) {
@@ -2405,7 +2405,7 @@ static NTSTATUS ipasam_enum_trusted_domains(struct pdb_methods *methods,
 	TALLOC_FREE(filter);
 
 	if (result != NULL) {
-		talloc_autofree_ldapmsg(mem_ctx, result);
+		smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
 	}
 
 	if (rc == LDAP_NO_SUCH_OBJECT) {
@@ -2668,7 +2668,7 @@ static bool ipasam_nthash_regen(struct ldapsam_privates *ldap_state,
 	int ret;
 
 	smbldap_set_mod(&mods, LDAP_MOD_ADD, LDAP_ATTRIBUTE_NTHASH, "MagicRegen");
-	talloc_autofree_ldapmod(mem_ctx, mods);
+	smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
 
 	ret = smbldap_modify(ldap_state->smbldap_state, entry_dn, mods);
 	if (ret != LDAP_SUCCESS) {
diff --git a/freeipa.spec.in b/freeipa.spec.in
index dee262bbe0c5298b4a15b452214105345712e9d9..ed487f0d7124d517a2e53d4467e2d31c62cf169c 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -31,7 +31,7 @@ BuildRequires:  policycoreutils >= %{POLICYCOREUTILSVER}
 %if 0%{?fedora} >= 16
 BuildRequires:  systemd-units
 %endif
-BuildRequires:  samba4-devel >= 4.0.0-134
+BuildRequires:  samba4-devel >= 4.0.0-139
 BuildRequires:  samba4-python
 BuildRequires:  libtalloc-devel
 BuildRequires:  libtevent-devel
@@ -752,6 +752,9 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Fri Sep 14 2012 Sumit Bose <sbose at redhat.com> - 2.99.0-44
+- Updated samba4-devel dependency due to API change
+
 * Mon Aug 20 2012 Rob Crittenden <rcritten at redhat.com> - 2.99.0-43
 - Set min for 389-ds-base to 1.2.11.9-1 on F17+ to pull in warning about
   low nsslapd-cachememsize.
-- 
1.7.11.4



More information about the Freeipa-devel mailing list