[MBT] new ticket for pkg kernel "BSD Process accounting on Linux is broken if you have UIDs and/or GIDs over 65536(2^16)"
bugs at pld.org.pl
bugs at pld.org.pl
Wed Apr 30 23:28:48 CEST 2003
Date: 2003-04-30 23:28:45+02 Author: Tomasz K?oczko (kloczek) <kloczek at rudy.mif.pg.gda.pl>
Title: BSD Process accounting on Linux is broken if you have UIDs and/or GIDs over 65536(2^16)
Ticket ID: #652
Ticket URL: http://bugs.pld.org.pl/?bug=652
Package: kernel-2.4.20
Distribution:
Category: improve request
Current state: opened
Text:
From: http://www-rcf.usc.edu/~garrick/32bit-pacct-howto.txt
The 2.4.x series of Linux kernels started using a 32 bit uid and gid which
raised the maximum number of users from 65536(2^16) to 4294967296(2^32).
Unfortunately, the BSD process accounting system in Linux was not likewise
upgraded so that the binary accounting files would remain compatible. This
might be fine for users that don't have more than 65 thousand users, but it
isn't suitable for those of us with a large user base.
Fortunately, this is really easy to fix. The process accounting (pacct)
binary file format includes 10 extra bytes at the end for future reserved
use. Guess what? Now is the future, let's use it. We'll simply put two
32bit values to store the uid and gid in that space; using up 8 of those 10
bytes. We'll maintain binary compatibility with the current userspace tools,
but we'll need to modify our pacct user tools to read those additional values.
For the impatient:
cd /usr/src/linux-<version> (or wherever your kernel source is located)
lynx -source http://www-rcf.usc.edu/~garrick/linux-acct-uid32.patch | patch -p1
cd /usr/include/sys
lynx -source http://www-rcf.usc.edu/~garrick/acct.h-uid32.patch | patch
rpm --rebuild http://www-rcf.usc.edu/~garrick/psacct-6.3.2-9uid32.src.rpm
and build your kernel as usual and install the new psacct rpm.
Those patches add two new members to struct acct: ac_uid32 and ac_gid32. They
will always have the correct uid and gid values. It would be easy enough to
replace all occurances of ac_uid/ac_gid in the psacct utils, but we'll want to
employ a little trickery to maintain backwards compatibility with pacct files
written with pre-patched kernels
More information about the pld-bugs
mailing list