Skip to content

Commit

Permalink
[PATCH] process events connector: uid_t gid_t size issues
Browse files Browse the repository at this point in the history
The uid_t and gid_t fields appear to present a 32/64-bit userspace/kernel
problem for some archs.

This patch addresses the problem by fixing the size to the largest size for
uid_t/gid_t used in the kernel.  This preserves the total size of the event
structure while ensuring that the layouts of the ID change event match in
32 and 64-bit kernels and applications.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Matt Helsley authored and Linus Torvalds committed Nov 30, 2005
1 parent 12074a3 commit df69a60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/linux/cn_proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ struct proc_event {
pid_t process_pid;
pid_t process_tgid;
union {
uid_t ruid; /* current->uid */
gid_t rgid; /* current->gid */
__u32 ruid; /* task uid */
__u32 rgid; /* task gid */
} r;
union {
uid_t euid;
gid_t egid;
__u32 euid;
__u32 egid;
} e;
} id;

Expand Down

0 comments on commit df69a60

Please sign in to comment.