Blame SOURCES/psmisc-22.20-fix-selinux-in-pstree.patch

6691f2
--- psmisc-22.20/src/pstree.c	2012-09-19 14:05:43.000000000 +0100
6691f2
+++ psmisc-22.20-selinux/src/pstree.c	2012-10-08 19:18:13.992951873 +0100
6691f2
@@ -140,7 +140,12 @@
6691f2
 static int dumped = 0;                /* used by dump_by_user */
6691f2
 static int charlen = 0;                /* length of character */
6691f2
 
6691f2
+#ifdef WITH_SELINUX
6691f2
+static void fix_orphans(security_context_t scontext);
6691f2
+#else
6691f2
 static void fix_orphans(void);
6691f2
+#endif
6691f2
+
6691f2
 /*
6691f2
  * Allocates additional buffer space for width and more as needed.
6691f2
  * The first call will allocate the first buffer.
6691f2
@@ -787,7 +792,11 @@
6691f2
     }
6691f2
   }
6691f2
   (void) closedir(dir);
6691f2
+#ifdef WITH_SELINUX
6691f2
+  fix_orphans(scontext);
6691f2
+#else
6691f2
   fix_orphans();
6691f2
+#endif
6691f2
   if (print_args)
6691f2
     free(buffer);
6691f2
   if (empty) {
6691f2
@@ -796,7 +805,11 @@
6691f2
   }
6691f2
 }
6691f2
 
6691f2
+#ifdef WITH_SELINUX
6691f2
+static void fix_orphans(security_context_t scontext)
6691f2
+#else
6691f2
 static void fix_orphans(void)
6691f2
+#endif
6691f2
 {
6691f2
   /* When using kernel 3.3 with hidepid feature enabled on /proc
6691f2
    * then we need fake root pid and gather all the orphan processes