BSD Accounting patch

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Mon Apr 19 2004 - 13:45:22 AKDT

Greetings:

For those of you who may be interested, I've also put up a Linux/Glibc patch
to fix BSD process accounting. It fixes the fact that while the Linux kernel
uses 32-bit UID/GIDs internally the accounting struct only allocates 16 bits
for those fields.

Keep in mind that since I brought this up on the Linux kernel mailing list
others have produced alternate patches that preserve (to an extent) binary
compatibility with older accounting files (they don't alter the size of the
struct like I do, but split the high bytes into new fields in the record
padding). For whatever reason, no patches have been accepted into the main
kernel tree, but I suspect because no one really cares. Keep in mind that
this is really only a problem for accurately logging high uids. Low uids work
fine without any patches.

Either way, the fact that accounting is half broken drives me nuts (I actually
do use high uids, which is the only reason I discovered this). So, you can
fix this yourself. Apply the patches or make the changes manually to the
following files:

  {kernel source tree}/include/linux/acct.h
  /usr/include/linux/acct.h
  /usr/include/sys/acct.h

You will need to recompile your kernel for the change to go into effect, as
well as the accounting tools.

  http://www.digitalmages.com/patches/3rd-party/linux-2.4-32bit_guids.patch
  http://www.digitalmages.com/patches/3rd-party/glibc-2.3.2-linux_32bit_acct.patch

This affects the 2.6 kernels as well, and the changes are identical to fix it.
Oh, and be sure to start a new accounting file after making these changes.

        --Arthur Corliss
          Bolverk's Lair -- http://arthur.corlissfamily.org/
          Digital Mages -- http://www.digitalmages.com/
          "Live Free or Die, the Only Way to Live" -- NH State Motto
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Apr 19 13:44:53 2004

This archive was generated by hypermail 2.1.8 : Mon Apr 19 2004 - 13:44:53 AKDT