diff options
| author | Eric Andersen <andersen@codepoet.org> | 2002-09-30 20:39:56 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2002-09-30 20:39:56 +0000 |
| commit | 02e6ba91e887bd11146a57185b223582f56f3f09 (patch) | |
| tree | cc1954165fe7e6efed1ba0dfa7d5c3aea97fffa5 /procps/ps.c | |
| parent | a6f6e06107e69b79858acaa511c452a0a73cf207 (diff) | |
| download | busybox-w32-02e6ba91e887bd11146a57185b223582f56f3f09.tar.gz busybox-w32-02e6ba91e887bd11146a57185b223582f56f3f09.tar.bz2 busybox-w32-02e6ba91e887bd11146a57185b223582f56f3f09.zip | |
Vodz' last_patch57:
Hi, Erik.
my_getpw(uid/gid) and applets used it have problem:
if username for uid not found, applets can`t detect it
(but code pessent). Also "%8ld " format is bad:
spaces not required (applets have self format
or spec format (tar applet) and overflow for "id" applet...)
This problem also pressent in stable version.
Patch for unstable in attach.
--w
vodz
Diffstat (limited to 'procps/ps.c')
| -rw-r--r-- | procps/ps.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/procps/ps.c b/procps/ps.c index aa408604a..6036ffc1e 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
| @@ -150,8 +150,6 @@ extern int ps_main(int argc, char **argv) | |||
| 150 | 150 | ||
| 151 | /* Make some adjustments as needed */ | 151 | /* Make some adjustments as needed */ |
| 152 | my_getpwuid(uidName, p.ruid); | 152 | my_getpwuid(uidName, p.ruid); |
| 153 | if (*uidName == '\0') | ||
| 154 | sprintf(uidName, "%d", p.ruid); | ||
| 155 | 153 | ||
| 156 | sprintf(path, "/proc/%s/cmdline", entry->d_name); | 154 | sprintf(path, "/proc/%s/cmdline", entry->d_name); |
| 157 | file = fopen(path, "r"); | 155 | file = fopen(path, "r"); |
| @@ -243,8 +241,6 @@ extern int ps_main(int argc, char **argv) | |||
| 243 | 241 | ||
| 244 | /* Make some adjustments as needed */ | 242 | /* Make some adjustments as needed */ |
| 245 | my_getpwuid(uidName, info.euid); | 243 | my_getpwuid(uidName, info.euid); |
| 246 | if (*uidName == '\0') | ||
| 247 | sprintf(uidName, "%ld", info.euid); | ||
| 248 | 244 | ||
| 249 | if(p.vmsize == 0) | 245 | if(p.vmsize == 0) |
| 250 | len = printf("%5d %-8s %c ", p.pid, uidName, p.state); | 246 | len = printf("%5d %-8s %c ", p.pid, uidName, p.state); |
