From 1dccccd2bb3cd329084f329cde78f8034d0faf8e Mon Sep 17 00:00:00 2001 From: Petr Menšík Date: Jan 27 2019 23:25:32 +0000 Subject: Fix error in Rawhide GCC reports warning on NULL parameter passed into printf. Pass there a real value. --- diff --git a/0005-Use-correct-dn-value.patch b/0005-Use-correct-dn-value.patch new file mode 100644 index 0000000..f0c23c5 --- /dev/null +++ b/0005-Use-correct-dn-value.patch @@ -0,0 +1,35 @@ +From ef1c4b7833de663549e9520e06e2b9f457b5fbec Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 28 Jan 2019 00:21:31 +0100 +Subject: [PATCH] Use correct dn value + +New GCC correctly reports error, NULL is always passed in case of +invalid objectclass. +--- + src/ldap_helper.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/ldap_helper.c b/src/ldap_helper.c +index 74c0afe..0f6184d 100644 +--- a/src/ldap_helper.c ++++ b/src/ldap_helper.c +@@ -4102,7 +4102,6 @@ syncrepl_update(ldap_instance_t *inst, ldap_entry_t **entryp, int chgtype) + ldap_entry_t *entry = NULL; + dns_name_t *zone_name = NULL; + dns_zone_t *zone_ptr = NULL; +- char *dn = NULL; + isc_taskaction_t action = NULL; + isc_task_t *task = NULL; + isc_boolean_t synchronous; +@@ -4155,7 +4154,7 @@ syncrepl_update(ldap_instance_t *inst, ldap_entry_t **entryp, int chgtype) + else if ((entry->class & LDAP_ENTRYCLASS_RR) != 0) + action = update_record; + else { +- log_error("unsupported objectClass: dn '%s'", dn); ++ log_error("unsupported objectClass: dn '%s'", entry->dn); + result = ISC_R_NOTIMPLEMENTED; + goto cleanup; + } +-- +2.20.1 + diff --git a/bind-dyndb-ldap.spec b/bind-dyndb-ldap.spec index 36d1cfd..dbabab5 100644 --- a/bind-dyndb-ldap.spec +++ b/bind-dyndb-ldap.spec @@ -16,6 +16,7 @@ Patch1: 0001-Coverity-fix-REVERSE_INULL-for-pevent-inst.patch Patch2: 0002-Add-empty-callback-for-getsize.patch Patch3: 0003-Support-for-BIND-9.11.3.patch Patch4: 0004-Support-for-BIND-9.11.5.patch +Patch5: 0005-Use-correct-dn-value.patch BuildRequires: bind-devel >= %{bind_version}, bind-lite-devel >= %{bind_version}, bind-pkcs11-devel >= %{bind_version} BuildRequires: krb5-devel @@ -38,6 +39,7 @@ off of your LDAP server. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build autoreconf -fiv