svn commit: r454126 - in head/security/sudo: . files

Brad Davis brd at FreeBSD.org
Mon Nov 13 16:58:16 UTC 2017


Author: brd
Date: Mon Nov 13 16:58:14 2017
New Revision: 454126
URL: https://svnweb.freebsd.org/changeset/ports/454126

Log:
  Pull in an upstream patch for security/sudo to not coredump if the hostname is not set.
  
  PR:		222510
  Approved by:	garga

Added:
  head/security/sudo/files/patch-bug222510   (contents, props changed)
Modified:
  head/security/sudo/Makefile

Modified: head/security/sudo/Makefile
==============================================================================
--- head/security/sudo/Makefile	Mon Nov 13 16:49:17 2017	(r454125)
+++ head/security/sudo/Makefile	Mon Nov 13 16:58:14 2017	(r454126)
@@ -3,6 +3,7 @@
 
 PORTNAME=	sudo
 PORTVERSION=	1.8.21p2
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	SUDO
 

Added: head/security/sudo/files/patch-bug222510
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/sudo/files/patch-bug222510	Mon Nov 13 16:58:14 2017	(r454126)
@@ -0,0 +1,14 @@
+diff -r 926deea0d506 -r fafb3a3083cb lib/util/gethostname.c
+--- lib/util/gethostname.c	Tue Oct 17 14:28:38 2017 -0600
++++ lib/util/gethostname.c	Fri Oct 20 07:37:40 2017 -0600
+@@ -42,7 +42,7 @@
+ 
+     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 {
+
+


More information about the svn-ports-all mailing list