]> git.ipfire.org Git - thirdparty/glibc.git/commit
Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771)
authorFlorian Weimer <fweimer@redhat.com>
Tue, 8 Nov 2022 13:15:02 +0000 (14:15 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 11 Nov 2022 17:20:16 +0000 (18:20 +0100)
commit8263cbfc1155f2ed5ee304bd7ff7fc6ad44c6152
tree58987de11020ed3d907b72b71f60f077b2c7cd92
parentf6d4c1ac648c4ff8baad94500df0bb13108a4f79
Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771)

Old applications pass __IPC_64 as part of the command argument because
old glibc did not check for unknown commands, and passed through the
arguments directly to the kernel, without adding __IPC_64.
Applications need to continue doing that for old glibc compatibility,
so this commit enables this approach in current glibc.

For msgctl and shmctl, if no translation is required, make
direct system calls, as we did before the time64 changes.  If
translation is required, mask __IPC_64 from the command argument.

For semctl, the union-in-vararg argument handling means that
translation is needed on all architectures.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 22a46dee24351fd5f4f188ad80554cad79c82524)
NEWS
sysdeps/unix/sysv/linux/ipc_priv.h
sysdeps/unix/sysv/linux/msgctl.c
sysdeps/unix/sysv/linux/semctl.c
sysdeps/unix/sysv/linux/shmctl.c