<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/contrib, branch 2023_03_09.7c7625d</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>contrib: Drop libvirt out-of-tree patch, integration mostly works in 9.1.0</title>
<updated>2023-03-09T02:44:21+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-08T22:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=294d6dc4c69d6ac8c51480e967d06da1f395d814'/>
<id>294d6dc4c69d6ac8c51480e967d06da1f395d814</id>
<content type='text'>
...and in any case, this patch doesn't offer any advantage over the
current upstream integration.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...and in any case, this patch doesn't offer any advantage over the
current upstream integration.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib: Drop QEMU out-of-tree patches</title>
<updated>2023-03-09T02:44:21+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-08T22:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=42fb62516d4e37ac456533d9d9b5c3a942b48631'/>
<id>42fb62516d4e37ac456533d9d9b5c3a942b48631</id>
<content type='text'>
Native support was introduced with commit 13c6be96618c, QEMU 7.2.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Native support was introduced with commit 13c6be96618c, QEMU 7.2.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib: Drop Podman out-of-tree patch, integration is upstream now</title>
<updated>2023-03-09T02:44:21+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-08T22:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=f3cd0f9e454f73e3ff218a986205eb7dbb3d350d'/>
<id>f3cd0f9e454f73e3ff218a986205eb7dbb3d350d</id>
<content type='text'>
See https://github.com/containers/podman/pull/16141, shipped in
Podman 4.4.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/containers/podman/pull/16141, shipped in
Podman 4.4.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/selinux: Let interface users set paths for log, PID, socket files</title>
<updated>2023-03-08T23:36:08+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-06T23:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=d361fe6e809bdf3539d764cfa5058f46ce51bcbf'/>
<id>d361fe6e809bdf3539d764cfa5058f46ce51bcbf</id>
<content type='text'>
Even libvirt itself will configure passt to write log, PID and socket
files to different locations depending on whether the domain is
started as root (/var/log/libvirt/...) or as a regular user
(/var/log/&lt;PID&gt;/libvirt/...), and user_tmp_t would only cover the
latter.

Create interfaces for log and PID files, so that callers can specify
different file contexts for those, and modify the interface for the
UNIX socket file to allow different paths as well.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even libvirt itself will configure passt to write log, PID and socket
files to different locations depending on whether the domain is
started as root (/var/log/libvirt/...) or as a regular user
(/var/log/&lt;PID&gt;/libvirt/...), and user_tmp_t would only cover the
latter.

Create interfaces for log and PID files, so that callers can specify
different file contexts for those, and modify the interface for the
UNIX socket file to allow different paths as well.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/selinux: Allow binding and connecting to all UDP and TCP ports</title>
<updated>2023-03-08T23:36:08+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-06T23:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=de9b0cb5fee2ea00ed7e7877ef9be8c446bca134'/>
<id>de9b0cb5fee2ea00ed7e7877ef9be8c446bca134</id>
<content type='text'>
Laine reports that with a simple:

      &lt;portForward proto='tcp'&gt;
        &lt;range start='2022' to='22'/&gt;
      &lt;/portForward&gt;

in libvirt's domain XML, passt won't start as it fails to bind
arbitrary ports. That was actually the intention behind passt_port_t:
the user or system administrator should have explicitly configured
allowed ports on a given machine. But it's probably not realistic, so
just allow any port to be bound and forwarded.

Also fix up some missing operations on sockets.

Reported-by: Laine Stump &lt;laine@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Laine reports that with a simple:

      &lt;portForward proto='tcp'&gt;
        &lt;range start='2022' to='22'/&gt;
      &lt;/portForward&gt;

in libvirt's domain XML, passt won't start as it fails to bind
arbitrary ports. That was actually the intention behind passt_port_t:
the user or system administrator should have explicitly configured
allowed ports on a given machine. But it's probably not realistic, so
just allow any port to be bound and forwarded.

Also fix up some missing operations on sockets.

Reported-by: Laine Stump &lt;laine@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/selinux: Let passt write to stdout and stderr when it starts</title>
<updated>2023-03-08T23:36:08+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-06T22:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=41bc669866b9e408d8d4966ee06e01784949b98d'/>
<id>41bc669866b9e408d8d4966ee06e01784949b98d</id>
<content type='text'>
Otherwise, it's unusable as stand-alone tool, or in foreground mode,
and it's also impossible to get output from --help or --version,
because for SELinux it's just a daemon.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise, it's unusable as stand-alone tool, or in foreground mode,
and it's also impossible to get output from --help or --version,
because for SELinux it's just a daemon.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/selinux: Drop duplicate init_daemon_domain() rule</title>
<updated>2023-03-08T23:36:08+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-03-06T22:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=009af75e450aae1d4e9e031a9e42a0e74ce1adf7'/>
<id>009af75e450aae1d4e9e031a9e42a0e74ce1adf7</id>
<content type='text'>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Tested-by: Laine Stump &lt;laine@redhat.com&gt;
Reviewed-by: Laine Stump &lt;laine@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/apparmor: Split profile into abstractions, use them</title>
<updated>2023-02-27T17:56:32+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-27T16:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=b1b75bd73a274128fced668002d0af7ece1a0790'/>
<id>b1b75bd73a274128fced668002d0af7ece1a0790</id>
<content type='text'>
One day, libvirt might actually support running passt to provide
guest connectivity. Should libvirtd (or virtqemud) start passt, it
will need to access socket and PID files in specific locations, and
passt needs to accept SIGTERM in case QEMU fails to start after passt
is already started.

To make this more convenient, split the current profile into two
abstractions, for passt and for pasta, so that external programmes
can include the bits they need (and especially not include the pasta
abstraction if they only need to start passt), plus whatever specific
adaptation is needed.

For stand-alone usage of passt and pasta, the 'passt' profile simply
includes both abstractions, plus rules to create and access PID and
capture files in default or reasonable ($HOME) locations.

Tested on Debian with libvirt 9.0.0 together with a local fix to start
passt as intended, namely libvirt commit c0efdbdb9f66 ("qemu_passt:
Avoid double daemonizing passt"). This is an example of how the
libvirtd profile (or virtqemud abstraction, or virtqemud profile) can
use this:

  # support for passt network back-end
  /usr/bin/passt Cx -&gt; passt,
  profile passt {
    /usr/bin/passt r,

    owner @{run}/user/[0-9]*/libvirt/qemu/run/passt/* rw,
    signal (receive) set=("term") peer=/usr/sbin/libvirtd,
    signal (receive) set=("term") peer=libvirtd,

    include if exists &lt;abstractions/passt&gt;
  }

translated:

- when executing /usr/bin/passt, switch to the subprofile "passt"
  (not the "discrete", i.e. stand-alone profile), described below.
  Scrub the environment (e.g. LD_PRELOAD is dropped)

- in the "passt" subprofile:

  - allow reading the binary

  - allow read and write access to PID and socket files

  - make passt accept SIGTERM from /usr/sbin/libvirtd, and
    libvirtd peer names

  - include anything else that's needed by passt itself

Suggested-by: Andrea Bolognani &lt;abologna@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One day, libvirt might actually support running passt to provide
guest connectivity. Should libvirtd (or virtqemud) start passt, it
will need to access socket and PID files in specific locations, and
passt needs to accept SIGTERM in case QEMU fails to start after passt
is already started.

To make this more convenient, split the current profile into two
abstractions, for passt and for pasta, so that external programmes
can include the bits they need (and especially not include the pasta
abstraction if they only need to start passt), plus whatever specific
adaptation is needed.

For stand-alone usage of passt and pasta, the 'passt' profile simply
includes both abstractions, plus rules to create and access PID and
capture files in default or reasonable ($HOME) locations.

Tested on Debian with libvirt 9.0.0 together with a local fix to start
passt as intended, namely libvirt commit c0efdbdb9f66 ("qemu_passt:
Avoid double daemonizing passt"). This is an example of how the
libvirtd profile (or virtqemud abstraction, or virtqemud profile) can
use this:

  # support for passt network back-end
  /usr/bin/passt Cx -&gt; passt,
  profile passt {
    /usr/bin/passt r,

    owner @{run}/user/[0-9]*/libvirt/qemu/run/passt/* rw,
    signal (receive) set=("term") peer=/usr/sbin/libvirtd,
    signal (receive) set=("term") peer=libvirtd,

    include if exists &lt;abstractions/passt&gt;
  }

translated:

- when executing /usr/bin/passt, switch to the subprofile "passt"
  (not the "discrete", i.e. stand-alone profile), described below.
  Scrub the environment (e.g. LD_PRELOAD is dropped)

- in the "passt" subprofile:

  - allow reading the binary

  - allow read and write access to PID and socket files

  - make passt accept SIGTERM from /usr/sbin/libvirtd, and
    libvirtd peer names

  - include anything else that's needed by passt itself

Suggested-by: Andrea Bolognani &lt;abologna@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.te: Allow setting socket option on routing netlink socket</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=933aa1014bb9012fa20974945502c6687beaaebe'/>
<id>933aa1014bb9012fa20974945502c6687beaaebe</id>
<content type='text'>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.te: Allow /etc/resolv.conf symlinks to be followed</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=0c11355e834d542f17073721b6462668680a2c86'/>
<id>0c11355e834d542f17073721b6462668680a2c86</id>
<content type='text'>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
