Would this adjustment be appropriate?
No point in calling get_cached_username twice?
Index: procps/ps.c
===================================================================
--- procps/ps.c (revision 20936)
+++ procps/ps.c (working copy)
@@ -4,7 +4,7 @@
*
* Copyright (C) 1999-2004 by Erik Andersen <[EMAIL PROTECTED]>
* Fix for SELinux Support:(c)2007 Hiroshi Shinji <[EMAIL PROTECTED]>
- (c)2007 Yuichi Nakamura <[EMAIL PROTECTED]>
+ * (c)2007 Yuichi Nakamura <[EMAIL PROTECTED]>
*
* Licensed under the GPL version 2, see the file LICENSE in this tarball.
*/
@@ -168,7 +168,7 @@
* as _right-justified_ IDs. Is it worth fixing? */
const char *user = get_cached_username(ps->uid);
if (strlen(user) <= size)
- safe_strncpy(buf, get_cached_username(ps->uid), size+1);
+ safe_strncpy(buf, user, size+1);
else
sprintf(buf, "%*u", size, (unsigned)ps->uid);
#endif
I do understand this is work in progress, but currently, even if this new
code in function func_user were enabled, it doesn't look like it would
produce the aimed results, as the ps-lines are still produced somewhere
around line 555.
Cheers,
--
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox