[nsd-users] fix compat b64_{pton,ntop} handling in nsd

Ted Unangst tedu at tedunangst.com
Fri Sep 11 02:05:34 UTC 2015


Stuart Henderson wrote:
> Currently NSD's compat functions for b64_pton and b64_ntop are always
> used. Worse, they're the old versions which abort(). This is because
> the library symbols are prefixed by __ (not just in OpenBSD) and are
> only accessible as b64_xx when resolv.h is included.
> 
> First attempt at fixing this involved borrowing tmux's autoconf checks
> to find these functions. This works on OpenBSD, but fails on OS with
> non-ancient resolv.h/nameser.h files which have #defines for T_xxx
> resource records which conflict with those in NSD.
> 
> So the diff below uses the __ versions directly (OpenSSH does similar).
> I've tested this on OpenBSD and Linux (SL6), including with the autoconf
> check artificially broken to force using the compat versions.
> The autoconf check is borrowed/adapted from the tmux one.
> 
> OK for OpenBSD?
> 
> Would this be acceptable for NSD upstream?

This seems suspicious. Where are the prototypes for these function coming
from?



More information about the nsd-users mailing list