Discussion:
Use of gethostbyaddr_r on openSUSE
Michael Ströder
2015-07-02 18:01:56 UTC
Permalink
HI!

I'm still fighting with building newer OpenLDAP RPMs for openSUSE.

Originally Ralf Haferkamp generated the .spec files several years ago but is
not involved anymore.

He added this patch:

https://build.opensuse.org/package/view_file/home:stroeder:branches:network:ldap/openldap2/0004-libldap-use-gethostbyname_r.dif?expand=1

This patch seems to fail now (see below). I'm inclined to remove it but I
wonder whether it might be still needed/useful today.

Ciao, Michael.

------------------------ snip ------------------------
[ 85s] configure:20167: cc -c -Wno-format-extra-args -fno-strict-aliasing
-DSLAP_CONFIG_DELETE -DSLAP_SCHEMA_EXPOSE -DLDAP_COLLECTIVE_ATTRIBUTES
conftest.c >&5
[ 85s] configure:20167: $? = 0
[ 85s] configure:20189: result: 6
[ 85s] configure:20204: checking number of arguments of gethostbyaddr_r
[ 85s] configure:20229: cc -c -Wno-format-extra-args -fno-strict-aliasing
-DSLAP_CONFIG_DELETE -DSLAP_SCHEMA_EXPOSE -DLDAP_COLLECTIVE_ATTRIBUTES
conftest.c >&5
[ 85s] conftest.c: In function 'main':
[ 85s] conftest.c:139:43: warning: passing argument 7 of 'gethostbyaddr_r'
from incompatible pointer type [-Wincompatible-pointer-types]
[ 85s] alen, AF_INET, &hent, buffer, bufsize, &h_errno);
[ 85s] ^
[ 85s] In file included from conftest.c:129:0:
[ 85s] /usr/include/netdb.h:172:12: note: expected 'struct hostent **
restrict' but argument is of type 'int *'
[ 85s] extern int gethostbyaddr_r (const void *__restrict __addr,
__socklen_t __len,
[ 85s] ^
[ 85s] conftest.c:138:9: error: too few arguments to function 'gethostbyaddr_r'
[ 85s] (void)gethostbyaddr_r( (void *)&(add.s_addr),
[ 85s] ^
[ 85s] In file included from conftest.c:129:0:
[ 85s] /usr/include/netdb.h:172:12: note: declared here
[ 85s] extern int gethostbyaddr_r (const void *__restrict __addr,
__socklen_t __len,
[ 85s] ^
[ 85s] configure:20229: $? = 1
[ 85s] configure: failed program was:
[ 85s] | /* confdefs.h */
Aaron Richton
2015-07-02 18:34:48 UTC
Permalink
Content preview: On Thu, 2 Jul 2015, Michael Str?der wrote: [...] > https://build.opensuse.org/package/view_file/home:stroeder:branches:network:ldap/openldap2/0004-libldap-use-gethostbyname_r.dif?expand=1
Post by Michael Ströder
Post by Michael Ströder
This patch seems to fail now (see below). I'm inclined to remove it but
I > wonder whether it might be still needed/useful today. [...]

Content analysis details: (-1.9 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information.
[URIs: openldap.org]
-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]

On Thu, 2 Jul 2015, Michael Str?der wrote:

[...]
Post by Michael Ströder
https://build.opensuse.org/package/view_file/home:stroeder:branches:network:ldap/openldap2/0004-libldap-use-gethostbyname_r.dif?expand=1
This patch seems to fail now (see below). I'm inclined to remove it but I
wonder whether it might be still needed/useful today.
This probably goes back to lines of thought (from Ralf, even) i.e.:

http://www.openldap.org/lists/openldap-devel/200505/msg00065.html



In an age of nssov, nslcd, etc etc. the entire question is redefined. A
patch like that probably causes more pain (either directly or by hiding
issues) than it helps. I'd drop it.
Michael Ströder
2015-07-02 22:01:32 UTC
Permalink
Post by Aaron Richton
[...]
Post by Michael Ströder
https://build.opensuse.org/package/view_file/home:stroeder:branches:network:ldap/openldap2/0004-libldap-use-gethostbyname_r.dif?expand=1
This patch seems to fail now (see below). I'm inclined to remove it but I
wonder whether it might be still needed/useful today.
http://www.openldap.org/lists/openldap-devel/200505/msg00065.html
Thanks for digging out this.
Post by Aaron Richton
In an age of nssov, nslcd, etc etc. the entire question is redefined. A patch
like that probably causes more pain (either directly or by hiding issues) than
it helps. I'd drop it.
Dropped for now.

Ciao, Michael.

Loading...