diff options
author | Rob Landley <rob@landley.net> | 2005-05-03 06:25:50 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-05-03 06:25:50 +0000 |
commit | 60158cb93eb0b3207dd1084cdf5bdd9226bd9e89 (patch) | |
tree | fe97ec71775deb1f3078c6db0cb8db554bc6b76f /libbb/procps.c | |
parent | 988a78c61cffe91b005d37f0b7d6e2cb2c5ea713 (diff) | |
download | busybox-w32-60158cb93eb0b3207dd1084cdf5bdd9226bd9e89.tar.gz busybox-w32-60158cb93eb0b3207dd1084cdf5bdd9226bd9e89.tar.bz2 busybox-w32-60158cb93eb0b3207dd1084cdf5bdd9226bd9e89.zip |
A patch from Takeharu KATO to update/fix SE-Linux support.
Diffstat (limited to 'libbb/procps.c')
-rw-r--r-- | libbb/procps.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index e405fb7ef..72f627f15 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -16,11 +16,7 @@ | |||
16 | 16 | ||
17 | #include "libbb.h" | 17 | #include "libbb.h" |
18 | 18 | ||
19 | extern procps_status_t * procps_scan(int save_user_arg0 | 19 | extern procps_status_t * procps_scan(int save_user_arg0) |
20 | #ifdef CONFIG_SELINUX | ||
21 | , int use_selinux , security_id_t *sid | ||
22 | #endif | ||
23 | ) | ||
24 | { | 20 | { |
25 | static DIR *dir; | 21 | static DIR *dir; |
26 | struct dirent *entry; | 22 | struct dirent *entry; |
@@ -60,16 +56,9 @@ extern procps_status_t * procps_scan(int save_user_arg0 | |||
60 | my_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user)); | 56 | my_getpwuid(curstatus.user, sb.st_uid, sizeof(curstatus.user)); |
61 | 57 | ||
62 | sprintf(status, "/proc/%d/stat", pid); | 58 | sprintf(status, "/proc/%d/stat", pid); |
59 | |||
63 | if((fp = fopen(status, "r")) == NULL) | 60 | if((fp = fopen(status, "r")) == NULL) |
64 | continue; | 61 | continue; |
65 | #ifdef CONFIG_SELINUX | ||
66 | if(use_selinux) | ||
67 | { | ||
68 | if(fstat_secure(fileno(fp), &sb, sid)) | ||
69 | continue; | ||
70 | } | ||
71 | else | ||
72 | #endif | ||
73 | name = fgets(buf, sizeof(buf), fp); | 62 | name = fgets(buf, sizeof(buf), fp); |
74 | fclose(fp); | 63 | fclose(fp); |
75 | if(name == NULL) | 64 | if(name == NULL) |