public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Pavel Begunkov <[email protected]>
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: Re: [PATCH liburing] tests; skip non-root sendmsg_fs_cve
Date: Sun, 22 Aug 2021 19:43:20 +0700	[thread overview]
Message-ID: <CAFBCWQKZv=mNPYqx4FQDgNjjH=efaXO+gQ-=U_=rbJCbFJh6Dw@mail.gmail.com> (raw)
In-Reply-To: <d2fee3ad7d2516d2a154ff380b067ae58a694e61.1629633956.git.asml.silence@gmail.com>

On Sun, Aug 22, 2021 at 7:08 PM Pavel Begunkov <[email protected]> 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

  reply	other threads:[~2021-08-22 12:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 12:07 [PATCH liburing] tests; skip non-root sendmsg_fs_cve Pavel Begunkov
2021-08-22 12:43 ` Ammar Faizi [this message]
2021-08-22 12:46   ` Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFBCWQKZv=mNPYqx4FQDgNjjH=efaXO+gQ-=U_=rbJCbFJh6Dw@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox