Re: [PATCH liburing] tests; skip non-root sendmsg_fs_cve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 22, 2021 at 7:08 PM Pavel Begunkov <asml.silence@xxxxxxxxx> wrote:
> -               if (chroot(tmpdir)) {
> +               r = chroot(tmpdir);
> +               if (r) {
> +                       if (r == -EPERM) {
> +                               fprintf(stderr, "chroot not allowed, skip\n");
> +                               return 0;
> +                       }

Hey, it's the userspace API.

chroot, on success, zero is returned. On error, -1 is returned, and errno is
set appropriately.

Did you mean if (errno == EPERM)?
Should #include <errno.h> as well.
Sorry for the duplicate, forgot to switch to plain text.
---
Ammar Faizi



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux