time: Also check for EPERM while trying to clock_settime
commite3622a8f391deea3b75a577dce70d023dfa3f1c7
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 2 Jun 2023 17:02:09 +0000 (2 14:02 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 5 Jun 2023 15:51:48 +0000 (5 12:51 -0300)
tree963801e07deda604b41d93204837a04b722b5f93
parentd4963a844dc72c4ac14da3395cf511f3d191d689
time: Also check for EPERM while trying to clock_settime

Container management default seccomp filter [1] only accepts
clock_settime if process has also CAP_SYS_TIME.  So also handle
EPERM as well.

Also adapt the test to libsupport and add a proper Copyright header.

Checked on aarch64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
time/tst-clock2.c