Updated with Tizen:Base source codes
[external/procps.git] / packaging / procps-3.2.6-libselinux.patch
1 --- procps-3.2.6/ps/output.c~   2005-10-29 23:18:19.000000000 -0400
2 +++ procps-3.2.6/ps/output.c    2005-12-13 16:27:15.000000000 -0500
3 @@ -1090,7 +1090,7 @@
4    return snprintf(outbuf, COLWID, "*");
5  }
6  
7 -
8 +#ifdef STATICLIB
9  /****************** FLASK & seLinux security stuff **********************/
10  // move the bulk of this to libproc sometime
11  
12 @@ -1122,7 +1122,7 @@
13    return 1;
14  }
15  
16 -#if 0
17 +#else
18  // This needs more study, considering:
19  // 1. the static linking option (maybe disable this in that case)
20  // 2. the -z and -Z option issue
21 @@ -1134,7 +1134,7 @@
22    char *context;
23  
24    if(!ps_getpidcon && !tried_load){
25 -    void *handle = dlopen("libselinux.so.1", RTLD_NOW);
26 +    void *handle = dlopen("libselinux.so", RTLD_NOW);
27      if(handle){
28        dlerror();
29        ps_getpidcon = dlsym(handle, "getpidcon");
30 --- procps-3.2.6/Makefile~      2005-10-30 01:27:04.000000000 -0500
31 +++ procps-3.2.6/Makefile       2005-12-13 16:32:09.000000000 -0500
32 @@ -73,12 +73,12 @@
33  # Something like this is probably needed to make the SE Linux
34  # library loading not conflict with embedded systems stuff.
35  #
36 -#ifeq ($(SHARED),1)
37 -#ldl := -ldl
38 -#LIBTYPE := -DSHAREDLIB
39 -#else
40 -#LIBTYPE := -DSTATICLIB
41 -#endif
42 +ifeq ($(SHARED),1)
43 +ldl := -ldl
44 +LIBTYPE := -DSHAREDLIB
45 +else
46 +LIBTYPE := -DSTATICLIB
47 +endif
48  
49  # Preprocessor flags.
50  PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
51 @@ -103,7 +103,7 @@
52  # Note that some stuff below is conditional on CFLAGS containing
53  # an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.)
54  CFLAGS       := -O2 -s
55 -ALL_CFLAGS   := $(PKG_CFLAGS) $(CFLAGS)
56 +ALL_CFLAGS   := $(PKG_CFLAGS) $(CFLAGS) $(LIBTYPE)
57  
58  PKG_LDFLAGS  := -Wl,-warn-common
59  LDFLAGS      :=