projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some details on exactly how to comply with the GPL
[oweals/busybox.git]
/
libbb
/
procps.c
diff --git
a/libbb/procps.c
b/libbb/procps.c
index 7df0718692a368b2f2a169e02964dbdafccdc86b..44103fae8992d9b877967e3c577914c2b07d8708 100644
(file)
--- a/
libbb/procps.c
+++ b/
libbb/procps.c
@@
-16,7
+16,11
@@
#include "libbb.h"
#include "libbb.h"
-extern procps_status_t * procps_scan(int save_user_arg0)
+extern procps_status_t * procps_scan(int save_user_arg0
+#ifdef CONFIG_SELINUX
+ , int use_selinux , security_id_t *sid
+#endif
+ )
{
static DIR *dir;
struct dirent *entry;
{
static DIR *dir;
struct dirent *entry;
@@
-53,6
+57,14
@@
extern procps_status_t * procps_scan(int save_user_arg0)
sprintf(status, "/proc/%d/stat", pid);
if((fp = fopen(status, "r")) == NULL)
continue;
sprintf(status, "/proc/%d/stat", pid);
if((fp = fopen(status, "r")) == NULL)
continue;
+#ifdef CONFIG_SELINUX
+ if(use_selinux)
+ {
+ if(fstat_secure(fileno(fp), &sb, sid))
+ continue;
+ }
+ else
+#endif
if(fstat(fileno(fp), &sb))
continue;
my_getpwuid(curstatus.user, sb.st_uid);
if(fstat(fileno(fp), &sb))
continue;
my_getpwuid(curstatus.user, sb.st_uid);