diff options
author | cy <cy@FreeBSD.org> | 2009-03-07 07:18:41 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2009-03-07 07:18:41 +0800 |
commit | 10135fed8075043d61b415390730e69ad03ad931 (patch) | |
tree | e2edfede0599ab26e3dc4eedac7371a5a5399ea1 /sysutils | |
parent | 8048fa5d9a35b280ad7ee67d968b1d19464d6e12 (diff) | |
download | freebsd-ports-gnome-10135fed8075043d61b415390730e69ad03ad931.tar.gz freebsd-ports-gnome-10135fed8075043d61b415390730e69ad03ad931.tar.zst freebsd-ports-gnome-10135fed8075043d61b415390730e69ad03ad931.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)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/heirloom/Makefile | 2 | ||||
-rw-r--r-- | sysutils/heirloom/files/patch-build::mk.config | 13 | ||||
-rw-r--r-- | sysutils/heirloom/files/patch-ps::ps.c | 28 |
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(); |