sysvipc: Return EINVAL for invalid semctl commands
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 29 Sep 2020 17:29:48 +0000 (14:29 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 2 Oct 2020 19:11:55 +0000 (16:11 -0300)
commita16d2abd496bd974a88207d5599265aae5ae4880
treea14903b78d6a30e04825173ce4157f2263e88ec1
parent574500a108be1d2a6a0dc97a075c9e0a98371aba
sysvipc: Return EINVAL for invalid semctl commands

It avoids regressions on possible future commands that might require
additional libc support.  The downside is new commands added by newer
kernels will need further glibc support.

Checked on x86_64-linux-gnu and i686-linux-gnu (Linux v4.15 and v5.4).
sysdeps/unix/sysv/linux/semctl.c
sysvipc/test-sysvipc.h [new file with mode: 0644]
sysvipc/test-sysvsem.c