Files
core/system/base/procps/files/procps-3.2.7-libselinux.patch
T
2015-02-24 11:18:35 +02:00

62 lines
1.9 KiB
Diff

diff -up procps-3.2.7/ps/output.c.p12 procps-3.2.7/ps/output.c
--- procps-3.2.7/ps/output.c.p12 2006-06-19 01:27:02.000000000 +0200
+++ procps-3.2.7/ps/output.c 2008-09-01 11:35:06.000000000 +0200
@@ -1090,7 +1090,7 @@ static int pr_sgi_p(char *restrict const
return snprintf(outbuf, COLWID, "*");
}
-
+#ifdef STATICLIB
/****************** FLASK & seLinux security stuff **********************/
// move the bulk of this to libproc sometime
@@ -1122,7 +1122,7 @@ fail:
return 1;
}
-#if 0
+#else
// This needs more study, considering:
// 1. the static linking option (maybe disable this in that case)
// 2. the -z and -Z option issue
@@ -1134,7 +1134,7 @@ static int pr_context(char *restrict con
char *context;
if(!ps_getpidcon && !tried_load){
- void *handle = dlopen("libselinux.so.1", RTLD_NOW);
+ void *handle = dlopen("libselinux.so", RTLD_NOW);
if(handle){
dlerror();
ps_getpidcon = dlsym(handle, "getpidcon");
diff -up procps-3.2.7/Makefile.p12 procps-3.2.7/Makefile
--- procps-3.2.7/Makefile.p12 2006-06-24 11:02:25.000000000 +0200
+++ procps-3.2.7/Makefile 2008-09-01 11:35:06.000000000 +0200
@@ -73,12 +73,12 @@ CURSES := -lncurses
# Something like this is probably needed to make the SE Linux
# library loading not conflict with embedded systems stuff.
#
-#ifeq ($(SHARED),1)
-#ldl := -ldl
-#LIBTYPE := -DSHAREDLIB
-#else
-#LIBTYPE := -DSTATICLIB
-#endif
+ifeq ($(SHARED),1)
+ldl := -ldl
+LIBTYPE := -DSHAREDLIB
+else
+LIBTYPE := -DSTATICLIB
+endif
# Preprocessor flags.
PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
@@ -103,7 +103,7 @@ PKG_CFLAGS := -fno-common -ffast-math
# Note that some stuff below is conditional on CFLAGS containing
# an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.)
CFLAGS := -O2 -s
-ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS)
+ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS) $(LIBTYPE)
PKG_LDFLAGS := -Wl,-warn-common
LDFLAGS :=