aboutsummaryrefslogtreecommitdiff
path: root/security/sudo
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2017-11-13 16:58:14 +0000
committerBrad Davis <brd@FreeBSD.org>2017-11-13 16:58:14 +0000
commit0c8c7cd2b0456ba9104c5e5d42aa0b018d8d3b01 (patch)
tree2a0ca662f25853da3b84035a3639de03391ba4ba /security/sudo
parent60f25f82e78eafa24a7aca1374713d2a19a3bf81 (diff)
downloadports-0c8c7cd2b0456ba9104c5e5d42aa0b018d8d3b01.tar.gz
ports-0c8c7cd2b0456ba9104c5e5d42aa0b018d8d3b01.zip
Pull in an upstream patch for security/sudo to not coredump if the hostname is not set.
PR: 222510 Approved by: garga
Notes
Notes: svn path=/head/; revision=454126
Diffstat (limited to 'security/sudo')
-rw-r--r--security/sudo/Makefile1
-rw-r--r--security/sudo/files/patch-bug22251014
2 files changed, 15 insertions, 0 deletions
diff --git a/security/sudo/Makefile b/security/sudo/Makefile
index f0bced63e267..addc2276b387 100644
--- a/security/sudo/Makefile
+++ b/security/sudo/Makefile
@@ -3,6 +3,7 @@
PORTNAME= sudo
PORTVERSION= 1.8.21p2
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SUDO
diff --git a/security/sudo/files/patch-bug222510 b/security/sudo/files/patch-bug222510
new file mode 100644
index 000000000000..673612fbc17f
--- /dev/null
+++ b/security/sudo/files/patch-bug222510
@@ -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 {
+
+