summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2017-01-25 01:17:16 +0000
committermaya <maya@pkgsrc.org>2017-01-25 01:17:16 +0000
commit0c201b5fc0c6da144f1c408791dff174e02af9f0 (patch)
tree20b36ba242f9507dc85f046c41db1877346056e8 /misc
parent617f657894a2f4773ccfbaff0ab786ba2ea67879 (diff)
downloadpkgsrc-0c201b5fc0c6da144f1c408791dff174e02af9f0.tar.gz
fix previous for unpriv'd installs. from dholland.
bump PKGREVISION.
Diffstat (limited to 'misc')
-rw-r--r--misc/screen/Makefile4
-rw-r--r--misc/screen/distinfo4
-rw-r--r--misc/screen/patches/patch-screen.c10
3 files changed, 10 insertions, 8 deletions
diff --git a/misc/screen/Makefile b/misc/screen/Makefile
index 80ebde43ede..13d0f289a4d 100644
--- a/misc/screen/Makefile
+++ b/misc/screen/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.99 2017/01/25 00:18:02 maya Exp $
+# $NetBSD: Makefile,v 1.100 2017/01/25 01:17:16 maya Exp $
DISTNAME= screen-4.5.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= misc shells
MASTER_SITES= ${MASTER_SITE_GNU:=screen/}
diff --git a/misc/screen/distinfo b/misc/screen/distinfo
index 426131d9796..a548a454203 100644
--- a/misc/screen/distinfo
+++ b/misc/screen/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.44 2017/01/25 00:18:02 maya Exp $
+$NetBSD: distinfo,v 1.45 2017/01/25 01:17:16 maya Exp $
SHA1 (screen-4.5.0.tar.gz) = b329f538e7265405a5c14e13520e95ced9d2cb17
RMD160 (screen-4.5.0.tar.gz) = cb412991fa2e3ffb6e4ec34449176eccb39a24a9
@@ -15,6 +15,6 @@ SHA1 (patch-am) = a721e311e7dde7938de0e9546a7892bfd104ebd1
SHA1 (patch-an) = bda6c65148410a6c9a13afd8ad34f93e33731552
SHA1 (patch-ao) = 91eecb62351aff720447eb48ea85aae70b62f9b6
SHA1 (patch-ap) = 4176e95502754206d6840ce228c61371df947650
-SHA1 (patch-screen.c) = 1c6a8af8cbdc66723649a9f6659e963150805b32
+SHA1 (patch-screen.c) = 631d7681ef440cbab6d3795dfbb23c1e944deb7d
SHA1 (patch-socket.c) = 09683cee3685a5c6d625e86aa97f6a09f4280b56
SHA1 (patch-tty.sh) = 93b1fe856cf16640295cb822d60118dbd3734602
diff --git a/misc/screen/patches/patch-screen.c b/misc/screen/patches/patch-screen.c
index 7287cef80b3..ccb1459fc00 100644
--- a/misc/screen/patches/patch-screen.c
+++ b/misc/screen/patches/patch-screen.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-screen.c,v 1.2 2017/01/25 00:18:02 maya Exp $
+$NetBSD: patch-screen.c,v 1.3 2017/01/25 01:17:16 maya Exp $
Use standard headers.
Don't open user-supplied paths as root.
@@ -14,18 +14,20 @@ Don't open user-supplied paths as root.
#include "screen.h"
#ifdef HAVE_BRAILLE
# include "braille.h"
-@@ -674,11 +676,15 @@ int main(int ac, char** av)
+@@ -674,11 +676,17 @@ int main(int ac, char** av)
if (strlen(screenlogfile) > PATH_MAX)
Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX);
-+ if (seteuid(getuid()) < 0)
++ int issetugid = geteuid() == 0;
++
++ if (issetugid && seteuid(getuid()) < 0)
+ Panic(0, "setuid 1");
FILE *w_check;
if ((w_check = fopen(screenlogfile, "w")) == NULL)
Panic(0, "-L: logfile name access problem");
else
fclose(w_check);
-+ if (seteuid(0) < 0)
++ if (issetugid && seteuid(0) < 0)
+ Panic(0, "setuid 2");
}
nwin_options.Lflag = 1;