Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2017 16:58:14 +0000 (UTC)
From:      Brad Davis <brd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r454126 - in head/security/sudo: . files
Message-ID:  <201711131658.vADGwETq031568@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {
+
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711131658.vADGwETq031568>