diff options
author | Andi Kleen <ak@muc.de> | 2003-10-06 01:15:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-06 01:15:36 -0700 |
commit | a001f96a1c93d01e6da68f3de143f01f51b60f87 (patch) | |
tree | c5dc202a1852ff5af8ee7b519b12710e0bdb4334 /ipc | |
parent | d37a8f363dbeb68b6654a9b264c41439ad9e1c40 (diff) | |
download | history-a001f96a1c93d01e6da68f3de143f01f51b60f87.tar.gz |
[PATCH] UID16 fixes
This fixes CONFIG_UID16 problems on x86-64 as discussed earlier.
CONFIG_UID16 now only selects the inclusion of kernel/uid16.c, all
conversions are triggered dynamically based on type sizes. This allows
x86-64 to both include uid16.c for emulation purposes, but not truncate
uids to 16bit in sys_newstat.
- Replace the old macros from linux/highuid.h with new SET_UID/SET_GID
macros that do type checking. Based on Linus' proposal.
- Fix everybody to use them.
- Clean up some cruft in the x86-64 32bit emulation allowed by this
(other 32bit emulations could be cleaned too, but I'm too lazy for
that right now)
- Add one missing EOVERFLOW check in x86-64 32bit sys_newstat while
I was at it.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/util.c b/ipc/util.c index 07bcb8d80a7223..806b2d7084f164 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -421,10 +421,10 @@ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out) void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) { out->key = in->key; - out->uid = NEW_TO_OLD_UID(in->uid); - out->gid = NEW_TO_OLD_GID(in->gid); - out->cuid = NEW_TO_OLD_UID(in->cuid); - out->cgid = NEW_TO_OLD_GID(in->cgid); + SET_UID(out->uid, in->uid); + SET_GID(out->gid, in->gid); + SET_UID(out->cuid, in->cuid); + SET_GID(out->cgid, in->cgid); out->mode = in->mode; out->seq = in->seq; } |