pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2017Q4]: pkgsrc/security/sudo Pullup ticket #5680 - requested ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3edfe18530ef
branches:  pkgsrc-2017Q4
changeset: 373110:3edfe18530ef
user:      spz <spz%pkgsrc.org@localhost>
date:      Fri Jan 19 20:22:40 2018 +0000

description:
Pullup ticket #5680 - requested by maya
security/sudo: function fix

Revisions pulled up:
- security/sudo/Makefile                                        1.158
- security/sudo/distinfo                                        1.94
- security/sudo/patches/patch-lib_util_gethostname.c            1.1

-------------------------------------------------------------------
   Module Name: pkgsrc
   Committed By:        maya
   Date:                Sun Jan 14 15:29:38 UTC 2018

   Modified Files:
        pkgsrc/security/sudo: Makefile distinfo
   Added Files:
        pkgsrc/security/sudo/patches: patch-lib_util_gethostname.c

   Log Message:
   sudo: avoid segfault if hostname is empty

   from andrew hall in pr pkg/52923
   PKGREVISION++


   To generate a diff of this commit:
   cvs rdiff -u -r1.157 -r1.158 pkgsrc/security/sudo/Makefile
   cvs rdiff -u -r1.93 -r1.94 pkgsrc/security/sudo/distinfo
   cvs rdiff -u -r0 -r1.1 \
       pkgsrc/security/sudo/patches/patch-lib_util_gethostname.c

diffstat:

 security/sudo/Makefile                             |   3 ++-
 security/sudo/distinfo                             |   3 ++-
 security/sudo/patches/patch-lib_util_gethostname.c |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r fb91a577fdac -r 3edfe18530ef security/sudo/Makefile
--- a/security/sudo/Makefile    Fri Jan 19 20:20:44 2018 +0000
+++ b/security/sudo/Makefile    Fri Jan 19 20:22:40 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.157 2017/09/12 06:34:22 adam Exp $
+# $NetBSD: Makefile,v 1.157.6.1 2018/01/19 20:22:40 spz Exp $
 
 DISTNAME=      sudo-1.8.21p2
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  https://www.sudo.ws/dist/
 MASTER_SITES+= ftp://ftp.sudo.ws/pub/sudo/
diff -r fb91a577fdac -r 3edfe18530ef security/sudo/distinfo
--- a/security/sudo/distinfo    Fri Jan 19 20:20:44 2018 +0000
+++ b/security/sudo/distinfo    Fri Jan 19 20:22:40 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.93 2017/09/12 06:34:22 adam Exp $
+$NetBSD: distinfo,v 1.93.6.1 2018/01/19 20:22:40 spz Exp $
 
 SHA1 (sudo-1.8.21p2.tar.gz) = 1a2410517a5e7b74f422b120adedf508b346df66
 RMD160 (sudo-1.8.21p2.tar.gz) = fbac868cbf7261a4e9bda538ac93792b6512628c
@@ -9,6 +9,7 @@
 SHA1 (patch-ag) = 460b9575346c263b944535aa8e2408e959840c77
 SHA1 (patch-include_sudo__compat.h) = 4f9b021ebdd507949f13e289deabdb6090ab334c
 SHA1 (patch-include_sudo__event.h) = 4d0787a45c2c7d4a7d3ae3111ccb3a4a4b84d083
+SHA1 (patch-lib_util_gethostname.c) = 5ec89ca91d483277c844a9e8941ece37918864c8
 SHA1 (patch-plugins_sudoers_Makefile.in) = d8612ac7bf2f5a892d9720c4df91810ca807f4ed
 SHA1 (patch-plugins_sudoers_logging.c) = a42e54af2b6057804aecb3b6a48c565e8ac4df82
 SHA1 (patch-src_Makefile.in) = fc2b7ea0835d7fe3192fb12cac8ab2eac61bf132
diff -r fb91a577fdac -r 3edfe18530ef security/sudo/patches/patch-lib_util_gethostname.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/sudo/patches/patch-lib_util_gethostname.c        Fri Jan 19 20:22:40 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_util_gethostname.c,v 1.1.2.2 2018/01/19 20:22:41 spz Exp $
+
+Avoid segfault if hostname is not set
+(upstream commit)
+
+--- lib/util/gethostname.c.orig        2017-01-14 04:30:15.000000000 +0000
++++ lib/util/gethostname.c
+@@ -42,7 +42,7 @@ sudo_gethostname_v1(void)
+ 
+     hname = malloc(host_name_max + 1);
+     if (hname != NULL) {
+-      if (gethostname(hname, host_name_max + 1) == 0) {
++      if (gethostname(hname, host_name_max + 1) == 0 && *hname != '\0') {
+           /* Old gethostname() may not NUL-terminate if there is no room. */
+           hname[host_name_max] = '\0';
+       } else {



Home | Main Index | Thread Index | Old Index