From: Hyunjee Kim Date: Wed, 4 Dec 2019 01:39:59 +0000 (+0900) Subject: Imported Upstream version 3.23 X-Git-Tag: upstream/3.23^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fupstream;p=platform%2Fupstream%2Fhostname.git Imported Upstream version 3.23 Change-Id: I15a87f873bab6a28a5452ddc95a4bfee905554fa Signed-off-by: Hyunjee Kim --- diff --git a/debian/changelog b/debian/changelog index ed10697..a9dc0f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +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 Thu, 07 Nov 2019 12:31:36 +0100 + hostname (3.22) unstable; urgency=medium * Made build process robust against binNMUs. (Closes: #935277) diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 48082f7..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control index 096246e..9609d2e 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: hostname Section: admin Priority: required Maintainer: Michael Meskes -Standards-Version: 4.4.0 -Build-Depends: debhelper (>= 12) +Standards-Version: 4.4.1 +Build-Depends: debhelper-compat (= 12) Package: hostname Architecture: any diff --git a/hostname.c b/hostname.c index 31cbcb2..5be268e 100644 --- a/hostname.c +++ b/hostname.c @@ -43,7 +43,7 @@ #include #include -#define VERSION "3.22" +#define VERSION "3.23" enum type_t { DEFAULT, DNS, FQDN, SHORT, ALIAS, IP, NIS, NIS_DEF, ALL_FQDNS, ALL_IPS }; @@ -56,8 +56,9 @@ char *progname; 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); @@ -276,7 +277,7 @@ show_name(enum type_t type) 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()? */