Patch-ID# 100407-09
Keywords: commands, corrupted, accounting, corrupt, finger, 
Synopsis: SunOS 4.1.1; 4.1.2; 4.1.3: accounting jumbo patch
Date: Jan/14/94
 
SunOS release: 4.1.1, 4.1.2, 4.1.3, 4.1.3C
 
BugId's fixed with this patch: 1042248 1069434 1070431 1047705 1066375 1059412 1033692 1152893

Changes incorporated in this version: 1152893

Architectures for which this patch is available: sun4 (all), sun3 (all)

Patches which may conflict with this patch:

Obsoleted by: SVR4

Problem Description: 

Bugid 1042248
On a prdaily output, there is a strange uid entry of 65534 (nobody)
that sometimes shows up, followed by some repeating of uids.
The format of the data is suppose to be sorted uniquely by uid and login
name.  On rprt files that do not have the 65534 nobody entry, the uids
do not repeat, which is correct. It seems that accounting records are
corrupt when a nobody entry shows up.

Bugid 1069434
The SysV accounting routine can generate negative values from a 
valid pacct file due to values being generated that overflow the 
range of a long variable type. This will only occur if a process is 
using a lot of system resource, i.e. running for a long period of time.

Bugid 1070431
If users are logged in when runacct gets run, then their login entries 
in wtmp are not put back into the newly created wtmp.

Bugid 1047705, 1066375
The accounting scripts which check for the amount of free space
are looking at /usr in spite of the fact that the accounting data
is in /var/adm.  In particular, the ckpacct script will turn
off accounting when the /usr partition gets full even if /var is
empty

Bugid 1059412
On systems with more than 128 tty lines, running connect accounting
produces the message:
   acctcon1: RECOMPILE WITH LARGER A_TSIZE
On systems with more than 1000 login sessions, running accounting
produces the message:
   acctprc1: INCREASE A_SSIZE
On systems with more than 500 logins, running accounting
produces the message:
   acctprc2: INCREASE A_USIZE
The source is not provided, so customers cannot do these things.
This patch increases the tty line limit to 512 and the session
limit to 4000, and the login ID limit to 4000.

Bugid 1033692
acctcom command displays 0.00 for mean core size.

Bugid 1152893
/usr/lib/acct/acctcon1 incorrectly calculates connection times.

INSTALL: 

sun3 versions work on all {sun3,sun3x}/{4.1,4.1.1} platforms
sun4/4.1.1 versions work on all {sun4,sun4c}/{4.1,4.1.1} platforms
sun4/4.1.2 versions work on all {sun4,sun4c,sun4m}/4.1.2 platforms
sun4/4.1.3 versions work on all {sun4,sun4c,sun4m}/{4.1.3,4.1.3C} platforms


As root:
1) save the original files.

	cp /usr/lib/acct/acctcms /usr/lib/acct/acctcms.FCS
	cp /usr/lib/acct/acctprc2 /usr/lib/acct/acctprc2.FCS
	cp /usr/lib/acct/ckpacct /usr/lib/acct/ckpacct.FCS
	cp /usr/lib/acct/runacct /usr/lib/acct/runacct.FCS
	cp /usr/lib/acct/acctcon1 /usr/lib/acct/acctcon1.FCS
	cp /usr/lib/acct/acctprc1 /usr/lib/acct/acctprc1.FCS
	cp /usr/bin/acctcom /usr/bin/acctcom.FCS

2) copy the executables into /usr/lib/acct

	cp `arch`/{4.1.1;4.1.2;4.1.3}/acctcms /usr/lib/acct/acctcms
	cp `arch`/{4.1.1;4.1.2;4.1.3}/acctprc2 /usr/lib/acct/acctprc2
	cp `arch`/{4.1.1;4.1.2;4.1.3}/ckpacct /usr/lib/acct/ckpacct
	cp `arch`/{4.1.1;4.1.2;4.1.3}/runacct /usr/lib/acct/runacct
	cp `arch`/{4.1.1;4.1.2;4.1.3}/acctcon1 /usr/lib/acct/acctcon1
	cp `arch`/{4.1.1;4.1.2;4.1.3}/utmp2wtmp /usr/lib/acct/utmp2wtmp
	cp `arch`/{4.1.1;4.1.2;4.1.3}/acctprc1 /usr/lib/acct/acctprc1
	cp `arch`/{4.1.1;4.1.2;4.1.3}/acctcom /usr/bin/acctcom

3) change the file modes to 755

	chmod 755 /usr/lib/acct/acctcms
	chmod 755 /usr/lib/acct/acctprc2
	chmod 755 /usr/lib/acct/ckpacct
	chmod 755 /usr/lib/acct/runacct
	chmod 755 /usr/lib/acct/acctcon1
	chmod 755 /usr/lib/acct/utmp2wtmp
	chmod 755 /usr/lib/acct/acctprc1
	chmod 755 /usr/bin/acctcom

4) change the file ownership to root.staff

	chown root.staff /usr/lib/acct/acctcms
	chown root.staff /usr/lib/acct/acctprc2
	chown root.staff /usr/lib/acct/ckpacct
	chown root.staff /usr/lib/acct/runacct
	chown root.staff /usr/lib/acct/acctcon1
	chown root.staff /usr/lib/acct/utmp2wtmp
	chown root.staff /usr/lib/acct/acctprc1
	chown root.staff /usr/bin/acctcom


ADDENDUM:
version -04 fixes /usr/lib/acct/ckpacct by replacing several
remaining references to /usr with /var/adm in echo commands and
initializes variable $_adm before referencing it.

version -05 fixes errors in the README file.

version -06 adds a fix for bug 1059412 and support for 4.1.3

version -07 raises the value for A_SSIZE from 1000 to 4000 and
adds the acctprc1 executable.  Also adds acctom to fix bug 1033692.

version -08 adds a fix for 1152893, affecting acctcms acctcon1 acctprc1.
