From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: Alas for CAP_NET_BIND_SERVICE
Date: Thu, 13 Oct 2022 07:15:52 +0200 [thread overview]
Message-ID: <20221013071552.3b095559@elisabeth> (raw)
In-Reply-To: <20221013065426.618e88b5@elisabeth>
On Thu, 13 Oct 2022 06:54:26 +0200
Stefano Brivio <sbrivio@redhat.com> wrote:
> Anyway, I drafted it... but this happens. I dropped pasta symlinks for
> simplicity:
>
> --
>
> # setcap 'cap_net_bind_service=+ep' /home/sbrivio/passt/pasta.avx2
> # getcap /home/sbrivio/passt/pasta.avx2
> /home/sbrivio/passt/pasta.avx2 cap_net_bind_service=ep
>
> --
>
> $ strace -ebind,capget,capset,readlink -f ./pasta.avx2 -f -t 81 1763943
> readlink("/proc/self/exe", "/home/sbrivio/passt/pasta.avx2", 4095) = 30
> capget({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=0, permitted=0, inheritable=0}) = 0
> capset({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=0, permitted=0, inheritable=0}) = 0
> bind(5, {sa_family=AF_INET, sin_port=htons(81), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied)
> bind(5, {sa_family=AF_INET, sin_port=htons(81), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EACCES (Permission denied)
> bind(5, {sa_family=AF_INET6, sin6_port=htons(81), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_scope_id=0}, 28) = -1 EACCES (Permission denied)
> bind(5, {sa_family=AF_INET6, sin6_port=htons(81), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_scope_id=0}, 28) = -1 EACCES (Permission denied)
>
> --
>
> no fancy filesystem attributes, just a very unassuming ext4. I must be
> missing something very obvious.
...oops, never mind, it's strace, of course -- that's even mentioned in
man 7 capabilities.
--
Stefano
next prev parent reply other threads:[~2022-10-13 5:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 2:55 Alas for CAP_NET_BIND_SERVICE David Gibson
2022-10-12 5:54 ` Stefano Brivio
2022-10-12 9:31 ` David Gibson
2022-10-12 10:47 ` Stefano Brivio
2022-10-13 0:34 ` David Gibson
2022-10-13 4:54 ` Stefano Brivio
2022-10-13 5:15 ` Stefano Brivio [this message]
2022-10-14 2:54 ` David Gibson
2022-10-16 9:46 ` Stefano Brivio
2022-10-17 3:20 ` David Gibson
2022-10-13 10:50 ` Stefano Brivio
2022-10-14 2:56 ` David Gibson
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=20221013071552.3b095559@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).