2002-04-03 22:37:10

by Mike A. Harris

[permalink] [raw]
Subject: [PATCH] Process Accounting 32bit UID/GID support

(Apologies to anyone getting this as a dupe, my first mail
bounced)

After receiving a handful of bug reports about process accounting
not working properly with 32bit UID/GID's, and investigating the
problem, I discovered the reason was that it just was not
implemented yet. After briefly discussing this with Alan and
Arjan, I've created support for this feature, while maintaining
full binary backward compatibility with existing tools.

I've also hacked the userland acct package (psacct in Red Hat
Linux) to support the new feature as well, while also remaining
backward compatible with kernels that do not have the new 32bit
UID/GID patch.

Marcelo, could you add this to the 2.4.x queue?

TIA

--
Mike A. Harris Shipping/mailing address:
OS Systems Engineer 190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer Ontario, Canada, P6C 5B3
Red Hat Inc.
http://www.redhat.com ftp://people.redhat.com/mharris


Attachments:
kernel-2.4.18-acct-32bit-uid-gid.patch (1.92 kB)

2002-04-04 15:17:41

by Christopher Allen Wing

[permalink] [raw]
Subject: Re: [PATCH] Process Accounting 32bit UID/GID support

Mike:

Are you sure you want to do this:

- char ac_pad[10]; /* Accounting Padding Bytes */
+ __u32 ac_uid32; /* Accounting Real 32bit User ID */
+ __u32 ac_gid32; /* Accounting Real 32bit Group ID */
+ char ac_pad[2]; /* Accounting Padding Bytes */



This changes the size of the accounting structure because the new fields
are padded to 4 byte alignment.

Support for process accounting was part of my original patches for 32 bit
UIDs, but it never got picked up. I think that at the time there was an
expectation that accounting was going to be replaced entirely with new
code (SGI accounting stuff?)


Here's an updated version of my patch:

http://www.engin.umich.edu/caen/systems/Linux/code/misc/acct/linux-2.4.17-acct-uid32.patch


Thanks,

Chris Wing
[email protected]