Lines 140-146
static char last_char = 0;
Link Here
|
140 |
static int dumped = 0; /* used by dump_by_user */ |
140 |
static int dumped = 0; /* used by dump_by_user */ |
141 |
static int charlen = 0; /* length of character */ |
141 |
static int charlen = 0; /* length of character */ |
142 |
|
142 |
|
|
|
143 |
#ifdef WITH_SELINUX |
144 |
static void fix_orphans(security_context_t scontext); |
145 |
#else |
143 |
static void fix_orphans(void); |
146 |
static void fix_orphans(void); |
|
|
147 |
#endif |
144 |
/* |
148 |
/* |
145 |
* Allocates additional buffer space for width and more as needed. |
149 |
* Allocates additional buffer space for width and more as needed. |
146 |
* The first call will allocate the first buffer. |
150 |
* The first call will allocate the first buffer. |
Lines 787-793
static void read_proc(void)
Link Here
|
787 |
} |
791 |
} |
788 |
} |
792 |
} |
789 |
(void) closedir(dir); |
793 |
(void) closedir(dir); |
|
|
794 |
#ifdef WITH_SELINUX |
795 |
fix_orphans(scontext); |
796 |
#else |
790 |
fix_orphans(); |
797 |
fix_orphans(); |
|
|
798 |
#endif |
791 |
if (print_args) |
799 |
if (print_args) |
792 |
free(buffer); |
800 |
free(buffer); |
793 |
if (empty) { |
801 |
if (empty) { |
Lines 796-802
static void read_proc(void)
Link Here
|
796 |
} |
804 |
} |
797 |
} |
805 |
} |
798 |
|
806 |
|
|
|
807 |
#ifdef WITH_SELINUX |
808 |
static void fix_orphans(security_context_t scontext) |
809 |
#else |
799 |
static void fix_orphans(void) |
810 |
static void fix_orphans(void) |
|
|
811 |
#endif |
800 |
{ |
812 |
{ |
801 |
/* When using kernel 3.3 with hidepid feature enabled on /proc |
813 |
/* When using kernel 3.3 with hidepid feature enabled on /proc |
802 |
* then we need fake root pid and gather all the orphan processes |
814 |
* then we need fake root pid and gather all the orphan processes |