Date: Thu, 1 Apr 1999 18:00:51 +0100 From: Ben Smithurst <ben@scientia.demon.co.uk> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10905: sa(8) is hard coded for 8 character user names Message-ID: <E10Skpn-000Mvm-00@scientia.demon.co.uk>
index | next in thread | raw e-mail
>Number: 10905
>Category: bin
>Synopsis: sa(8) is hard coded for 8 character user names
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 1 09:10:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Ben Smithurst
>Release: FreeBSD 3.1-STABLE i386
>Organization:
>Environment:
Any system without 8 character user names, such as -current, -stable,
3.*-release
>Description:
When doing `sa -m', the width of the first column is hard coded for 8
character user names. Not really very serious, I suppose, but probably
a bug all the same. Or possibly there is a reason for this, but I don't
see a valid reason.
>How-To-Repeat:
>Fix:
--- usrdb.c.orig Thu Apr 1 17:54:27 1999
+++ usrdb.c Thu Apr 1 17:56:11 1999
@@ -33,6 +33,7 @@
"$Id: usrdb.c,v 1.6 1997/10/15 06:41:19 charnier Exp $";
#endif /* not lint */
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/acct.h>
#include <err.h>
@@ -236,7 +237,7 @@
while (rv == 0) {
ui = (struct userinfo *) data.data;
- printf("%-8s %9qu ",
+ printf("%-*s %9qu ", MAXLOGNAME - 1,
user_from_uid(ui->ui_uid, 0), ui->ui_calls);
t = (double) (ui->ui_utime + ui->ui_stime) /
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E10Skpn-000Mvm-00>
