+hostname (3.23) unstable; urgency=medium
+
+ * Increase buffer size for all FQDNs to NI_MAXHOST as suggested by manpage.
+ (Closes: #942311)
+ * Use the same size for getdomainname().
+ * Bumped Standards-Version, no changes needed.
+ * Removed debian/compat file as suggested by lintian.
+
+ -- Michael Meskes <meskes@debian.org> Thu, 07 Nov 2019 12:31:36 +0100
+
hostname (3.22) unstable; urgency=medium
* Made build process robust against binNMUs. (Closes: #935277)
Section: admin
Priority: required
Maintainer: Michael Meskes <meskes@debian.org>
-Standards-Version: 4.4.0
-Build-Depends: debhelper (>= 12)
+Standards-Version: 4.4.1
+Build-Depends: debhelper-compat (= 12)
Package: hostname
Architecture: any
#include <ctype.h>
#include <err.h>
-#define VERSION "3.22"
+#define VERSION "3.23"
enum type_t { DEFAULT, DNS, FQDN, SHORT, ALIAS, IP, NIS, NIS_DEF, ALL_FQDNS, ALL_IPS };
char *
localnisdomain()
{
- /* The historical NIS limit is 1024, the limit on Linux is 64. */
- static char buf[1025];
+ /* The historical NIS limit is 1024, the limit on Linux is 64. We go
+ * with the limit suggested for getnameinfo(), which should be 1025. */
+ static char buf[NI_MAXHOST];
int myerror = 0;
myerror = getdomainname(buf, sizeof buf);
break;
case ALL_IPS:
case ALL_FQDNS: {
- char buf[255];
+ char buf[NI_MAXHOST];
int flags, ret, family, addrlen;
/* What kind of information do we want from getnameinfo()? */