summaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
authorRob Landley2005-05-03 06:25:50 +0000
committerRob Landley2005-05-03 06:25:50 +0000
commit60158cb93eb0b3207dd1084cdf5bdd9226bd9e89 (patch)
treefe97ec71775deb1f3078c6db0cb8db554bc6b76f /libbb/procps.c
parent988a78c61cffe91b005d37f0b7d6e2cb2c5ea713 (diff)
downloadbusybox-60158cb93eb0b3207dd1084cdf5bdd9226bd9e89.zip
busybox-60158cb93eb0b3207dd1084cdf5bdd9226bd9e89.tar.gz
A patch from Takeharu KATO to update/fix SE-Linux support.
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index e405fb7..72f627f 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -16,11 +16,7 @@
#include "libbb.h"
-extern procps_status_t * procps_scan(int save_user_arg0
-#ifdef CONFIG_SELINUX
- , int use_selinux , security_id_t *sid
-#endif
- )
+extern procps_status_t * procps_scan(int save_user_arg0)
{
static DIR *dir;
struct dirent *entry;
@@ -60,16 +56,9 @@ extern procps_status_t * procps_scan(int save_user_arg0
my_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user));
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
name = fgets(buf, sizeof(buf), fp);
fclose(fp);
if(name == NULL)