aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2008-03-20 19:08:16 +0000
committerNed Ludd <solar@gentoo.org>2008-03-20 19:08:16 +0000
commitb41e021c47a0be6d8a8a0a0a705756872e224c55 (patch)
treeeb41c7bc85dc321bddc5d534121ff17ad22ac149
parent- Make sure lddtree.sh get added in the intall phase (diff)
downloadpax-utils-b41e021c47a0be6d8a8a0a0a705756872e224c55.tar.gz
pax-utils-b41e021c47a0be6d8a8a0a0a705756872e224c55.tar.bz2
pax-utils-b41e021c47a0be6d8a8a0a0a705756872e224c55.zip
- keep username alingment when username exceeds 8 standard chars
-rw-r--r--pspax.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pspax.c b/pspax.c
index 302b5ed..2a38ba2 100644
--- a/pspax.c
+++ b/pspax.c
@@ -12,7 +12,7 @@
* cc -o pspax pspax.c -DWANT_SYSCAP -lcap
*/
-static const char *rcsid = "$Id: pspax.c,v 1.40 2008/01/17 04:37:19 solar Exp $";
+static const char *rcsid = "$Id: pspax.c,v 1.41 2008/03/20 19:08:16 solar Exp $";
const char * const argv0 = "pspax";
#include "paxinc.h"
@@ -364,6 +364,9 @@ static void pspax(const char *find_name)
WRAP_SYSCAP(capgetp(pid, cap_d));
WRAP_SYSCAP(caps = cap_to_text(cap_d, &length));
+ if (pwd && strlen(pwd->pw_name) >= 8)
+ pwd->pw_name[8] = 0;
+
if (show_all || type) {
printf("%-8s %-6d %-6s %-4s %-10s %-16s %-4s %s %s %s\n",
pwd ? pwd->pw_name : "--------",