aboutsummaryrefslogtreecommitdiff
path: root/sysutils/heirloom
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2009-03-06 23:18:41 +0000
committerCy Schubert <cy@FreeBSD.org>2009-03-06 23:18:41 +0000
commit21df3ce841be05f9e2f806d2e05ad6b4552ca728 (patch)
treedb0ac4135f0919d24ca776601e508ad675d8ff65 /sysutils/heirloom
parentd8925376733929cfbacbfbd08f3d3f28c74665a5 (diff)
downloadports-21df3ce841be05f9e2f806d2e05ad6b4552ca728.tar.gz
ports-21df3ce841be05f9e2f806d2e05ad6b4552ca728.zip
Fix a SIGSEGV in ps/ps.c when ps is setuid root or when run by root.
kvm_t kv was not set to zero and therefore kvm_open(3) was not called. Fix another SIGSEGV in ps caused by the -O compile flag) when the -ef flags are passed to ps. Approved by: gahr (maintainer)
Notes
Notes: svn path=/head/; revision=229594
Diffstat (limited to 'sysutils/heirloom')
-rw-r--r--sysutils/heirloom/Makefile2
-rw-r--r--sysutils/heirloom/files/patch-build::mk.config13
-rw-r--r--sysutils/heirloom/files/patch-ps::ps.c28
3 files changed, 38 insertions, 5 deletions
diff --git a/sysutils/heirloom/Makefile b/sysutils/heirloom/Makefile
index caf429078a02..fab37a602b26 100644
--- a/sysutils/heirloom/Makefile
+++ b/sysutils/heirloom/Makefile
@@ -7,7 +7,7 @@
PORTNAME= heirloom
PORTVERSION= 070715
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= SF
diff --git a/sysutils/heirloom/files/patch-build::mk.config b/sysutils/heirloom/files/patch-build::mk.config
index 569c9699bc79..2223817c89b7 100644
--- a/sysutils/heirloom/files/patch-build::mk.config
+++ b/sysutils/heirloom/files/patch-build::mk.config
@@ -1,5 +1,5 @@
---- build/mk.config.orig Tue Feb 27 00:03:01 2007
-+++ build/mk.config Wed Mar 28 10:53:59 2007
+--- build/mk.config.orig 2007-07-15 06:36:59.000000000 -0700
++++ build/mk.config 2009-03-06 15:08:14.925988069 -0800
@@ -25,33 +25,33 @@
# Location for binaries that have no special personality. This location
# may be identical to that of one of the first three personalities below.
@@ -118,3 +118,12 @@
#
# Compiler and linker flags. HOSTCC is for cross compiling.
+@@ -195,7 +195,7 @@
+ # compiler mode (which is the default) until this issue is properly
+ # handled by the system vendor.
+ #
+-CFLAGS = -O -fomit-frame-pointer $(WARN)
++CFLAGS = -fomit-frame-pointer $(WARN)
+ CFLAGS2 = -O2 -fomit-frame-pointer $(WARN)
+ CFLAGSS = -Os -fomit-frame-pointer $(WARN)
+ CFLAGSU = -O2 -fomit-frame-pointer -funroll-loops $(WARN)
diff --git a/sysutils/heirloom/files/patch-ps::ps.c b/sysutils/heirloom/files/patch-ps::ps.c
index 8b19fdae77d8..adba8e5dcc85 100644
--- a/sysutils/heirloom/files/patch-ps::ps.c
+++ b/sysutils/heirloom/files/patch-ps::ps.c
@@ -1,5 +1,5 @@
---- ps/ps.c.orig 2007-10-05 15:41:41.000000000 +0200
-+++ ps/ps.c 2007-10-05 15:43:31.000000000 +0200
+--- ps/ps.c.orig 2007-02-02 06:40:20.000000000 -0800
++++ ps/ps.c 2009-03-06 14:51:53.455864840 -0800
@@ -88,6 +88,9 @@
#define proc process
#undef p_pgid
@@ -10,3 +10,27 @@
#if defined (__DragonFly__)
#endif /* __DragonFly__ */
#elif defined (__hpux)
+@@ -492,6 +495,7 @@
+
+ static void postproc(struct proc *);
+ static enum okay selectproc(struct proc *);
++static kvm_t *kv;
+
+ /************************************************************************
+ * Utility functions *
+@@ -2140,7 +2144,6 @@
+ static enum okay
+ getproc_kvm(struct proc *p)
+ {
+- static kvm_t *kv;
+ struct kinfo_proc *kp;
+ int c;
+
+@@ -4875,6 +4878,7 @@
+ #ifdef __GLIBC__
+ putenv("POSIXLY_CORRECT=1");
+ #endif
++ kv = NULL;
+ progname = basename(argv[0]);
+ sysname(argc, argv);
+ defaults();