pkgsrc-Changes archive

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

CVS commit: pkgsrc/security/sudo



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

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/sudo/Makefile
diff -u pkgsrc/security/sudo/Makefile:1.157 pkgsrc/security/sudo/Makefile:1.158
--- pkgsrc/security/sudo/Makefile:1.157 Tue Sep 12 06:34:22 2017
+++ pkgsrc/security/sudo/Makefile       Sun Jan 14 15:29:38 2018
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.157 2017/09/12 06:34:22 adam Exp $
+# $NetBSD: Makefile,v 1.158 2018/01/14 15:29:38 maya 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/

Index: pkgsrc/security/sudo/distinfo
diff -u pkgsrc/security/sudo/distinfo:1.93 pkgsrc/security/sudo/distinfo:1.94
--- pkgsrc/security/sudo/distinfo:1.93  Tue Sep 12 06:34:22 2017
+++ pkgsrc/security/sudo/distinfo       Sun Jan 14 15:29:38 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.93 2017/09/12 06:34:22 adam Exp $
+$NetBSD: distinfo,v 1.94 2018/01/14 15:29:38 maya Exp $
 
 SHA1 (sudo-1.8.21p2.tar.gz) = 1a2410517a5e7b74f422b120adedf508b346df66
 RMD160 (sudo-1.8.21p2.tar.gz) = fbac868cbf7261a4e9bda538ac93792b6512628c
@@ -9,6 +9,7 @@ SHA1 (patch-af) = db54ce780c174129e2a25a
 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

Added files:

Index: pkgsrc/security/sudo/patches/patch-lib_util_gethostname.c
diff -u /dev/null pkgsrc/security/sudo/patches/patch-lib_util_gethostname.c:1.1
--- /dev/null   Sun Jan 14 15:29:38 2018
+++ pkgsrc/security/sudo/patches/patch-lib_util_gethostname.c   Sun Jan 14 15:29:38 2018
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_util_gethostname.c,v 1.1 2018/01/14 15:29:38 maya 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