From wosch@mail.cs.tu-berlin.de  Sun Aug 13 16:17:44 1995
Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13])
          by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id QAA11441
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Aug 1995 16:17:41 -0700
Received: from localhost.cs.tu-berlin.de ([130.149.1.128]) by mail.cs.tu-berlin.de (8.6.12/8.6.12) with ESMTP id BAA01223 for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Aug 1995 01:10:47 +0200
Received: (from wosch@localhost) by localhost (8.6.9/8.6.9) id SAA16346; Sun, 13 Aug 1995 18:50:15 +0200
Message-Id: <199508131650.SAA16346@localhost>
Date: Sun, 13 Aug 1995 18:50:15 +0200
From: Wolfram Schneider <wosch@cs.tu-berlin.de>
Reply-To: wosch@cs.tu-berlin.de
To: FreeBSD-gnats-submit@freebsd.org, wosch@cs.tu-berlin.de
Subject: to shot command name in <sys/acct.h>
X-Send-Pr-Version: 3.2

>Number:         682
>Category:       kern
>Synopsis:       to shot command name in <sys/acct.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 13 16:20:01 PDT 1995
>Closed-Date:    Wed Aug 16 17:50:11 PDT 1995
>Last-Modified:  Wed Aug 16 17:50:29 PDT 1995
>Originator:     Wolfram Schneider
>Release:        FreeBSD 2.0-ALPHA i386
>Organization:
>Environment:
>Description:

$ more /usr/include/sys/acct.h
struct acct {
        char    ac_comm[10];    /* command name */
                        ^^
This should be 16 and a macro.


>How-To-Repeat:

$ set /bin /sbin /usr/bin /usr/sbin /usr/libexec 
$ ls -R $* | \
  awk '{l = length($0); if (l > 10) { printf("%-16s %d\n", $0, l)}}' | \
  grep -v :

mount_cd9660     12
mount_fdesc      11
mount_kernfs     12
mount_msdos      11
mount_portal     12
mount_procfs     12
mount_union      11
lfs_cleanerd     12
locate.bigram    13
locate.code      11
locate.updatedb  15
rpc.rusersd      11
named.reload     12
named.restart    13


>Fix:

/usr/include/sys/acct.h:

#define AC_COMM_LEN 16
struct acct {
        char    ac_comm[AC_COMM_LEN];    /* command name */
	
>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: wosch@cs.tu-berlin.de
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/682: to shot command name in <sys/acct.h>
Date: Mon, 14 Aug 1995 08:18:54 +0200 (MET DST)

 As Wolfram Schneider wrote:
 > 
 > /usr/include/sys/acct.h:
 > 
 > #define AC_COMM_LEN 16
 > struct acct {
 >         char    ac_comm[AC_COMM_LEN];    /* command name */
 
 What incompatibilites will this produce?  Is it just lastcomm(1)
 that has to be recompiled?
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
 Never trust an operating system you don't have sources for. ;-)

From: Wolfram Schneider <wosch@cs.tu-berlin.de>
To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/682: to shot command name in <sys/acct.h>
Date: Mon, 14 Aug 1995 12:20:01 +0200

 J. Wunsch writes:
 >As Wolfram Schneider wrote:
 >> 
 >> /usr/include/sys/acct.h:
 >> 
 >> #define AC_COMM_LEN 16
 >> struct acct {
 >>         char    ac_comm[AC_COMM_LEN];    /* command name */
 >
 >What incompatibilites will this produce?  Is it just lastcomm(1)
 >that has to be recompiled?
 
 $gfind . -name '*.[ch]' | xargs egrep -l '<sys/acct.h>' > a
 $cat a
 ./usr.sbin/sa/usrdb.c
 ./usr.sbin/sa/main.c
 ./usr.sbin/sa/pdb.c
 ./usr.bin/lastcomm/lastcomm.c
 ./sys/kern/kern_exec.c
 ./sys/kern/kern_fork.c
 ./sys/kern/kern_proc.c
 ./sys/kern/kern_sig.c
 ./sys/kern/kern_prot.c
 ./sys/kern/kern_acct.c
 ./sys/i386/i386/trap.c
 ./sys/i386/i386/math_emulate.c
 
 $xargs egrep -l ac_comm < a
 ./usr.sbin/sa/main.c
 ./usr.bin/lastcomm/lastcomm.c
 ./sys/kern/kern_acct.c
 
 
 --
 Wolfram Schneider <wosch@cs.tu-berlin.de>
 <a href="http://hyperg.cs.tu-berlin.de/C~wosch">me</a>
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Wed Aug 16 17:50:11 PDT 1995 
State-Changed-Why:  
Supplied fix adopted. 
>Unformatted:
