sysvipc: Return EINVAL for invalid shmctl commands
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 29 Sep 2020 17:55:02 +0000 (14:55 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 14 Oct 2020 14:49:55 +0000 (11:49 -0300)
commit9ebaabeaac1a96b0d91f52902ce1dbf4f5a562dd
treed529303fc362a1fab5dc01dc06ff43975f14b4e5
parenta49d7fd4f764e97ccaf922e433046590ae52fce9
sysvipc: Return EINVAL for invalid shmctl 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/shmctl.c
sysvipc/test-sysvipc.h
sysvipc/test-sysvshm.c