Displaying 20 results from an estimated 1000 matches similar to: "[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code."
2020 Sep 23
6
[common PATCH 0/3] SELinux_relabel: relabel only if enforcing (RHBZ#1828952)
Continuation/rework of:
https://www.redhat.com/archives/libguestfs/2020-May/msg00020.html
This is my approach, as I explained here:
https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c4
https://www.redhat.com/archives/libguestfs/2020-May/msg00035.html
IOW: do not attempt to relabel if the guest is not enforcing, as it is
either useless or may fail; few words more are in the comments of patch
#3.
2020 May 05
0
[PATCH libguestfs-common 2/2] mlcustomize: Fall back to autorelabel if specfile does not exist (RHBZ#1828952).
https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c2
If SELINUXTYPE is set to some value other than targeted then we look
for a directory /etc/selinux/<SELINUXTYPE> which does not exist.
However this should not cause a fatal error. Using setfiles to do the
relabelling immediately is a nice-to-have, but we can fallback to
using autorelabel if we're unable to achieve it.
---
2018 Feb 07
1
[PATCH] customize: avoid Array.mem for now
Since it is available only in OCaml >= 4.03, which is higher than our
requirement, add a simple reimplementation of it.
Fixes commit 719d68fa247cc3885ecf7ec1c010faf83267d786.
---
customize/SELinux_relabel.ml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/customize/SELinux_relabel.ml b/customize/SELinux_relabel.ml
index e7d440c29..7cc166edb 100644
---
2017 Mar 06
0
[PATCH v2] v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
Instead of just documenting this bug, fix it in the file_contexts
file.
Replaces commit ad3c8fe7f49c4991e1aa536856a1a408f55d5409.
---
customize/SELinux_relabel.ml | 20 ++++++++++++++++++++
v2v/virt-v2v.pod | 11 -----------
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/customize/SELinux_relabel.ml b/customize/SELinux_relabel.ml
index fa9603c..d3b9325 100644
---
2017 Mar 06
2
[PATCH] v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
Instead of just documenting this bug, fix it in the file_contexts
file.
Replaces commit ad3c8fe7f49c4991e1aa536856a1a408f55d5409.
---
customize/SELinux_relabel.ml | 19 +++++++++++++++++++
v2v/virt-v2v.pod | 11 -----------
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/customize/SELinux_relabel.ml b/customize/SELinux_relabel.ml
index fa9603c..69a4779 100644
---
2020 Sep 24
3
Re: [common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
On Wed, Sep 23, 2020 at 05:57:50PM +0200, Pino Toscano wrote:
> Do not attempt to relabel a guest in case its SELinux enforcing mode is
> not "enforcing", as it is either pointless, or it may fail because of an
> invalid policy configured.
> ---
> mlcustomize/SELinux_relabel.ml | 26 +++++++++++++++++++++++++-
> 1 file changed, 25 insertions(+), 1 deletion(-)
>
2020 Sep 23
0
[common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
Do not attempt to relabel a guest in case its SELinux enforcing mode is
not "enforcing", as it is either pointless, or it may fail because of an
invalid policy configured.
---
mlcustomize/SELinux_relabel.ml | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/mlcustomize/SELinux_relabel.ml b/mlcustomize/SELinux_relabel.ml
index 647aeda..db00e59
2018 Jan 31
1
[PATCH] customize: allow missing SELINUXTYPE in SELinux config
libselinux defaults to "targeted" when no SELINUXTYPE is specified in
/etc/config/selinux. Hence do the same here, instead of failing because
of the missing key.
Add a slow test for checking SELinux relabeling on a Fedora 27 guest,
both with no changes, and with a modified configuration.
---
customize/Makefile.am | 2 ++
customize/SELinux_relabel.ml | 14 ++++++++++--
2020 Sep 24
0
Re: [common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
On Thursday, 24 September 2020 12:15:29 CEST Richard W.M. Jones wrote:
> On Wed, Sep 23, 2020 at 05:57:50PM +0200, Pino Toscano wrote:
> > Do not attempt to relabel a guest in case its SELinux enforcing mode is
> > not "enforcing", as it is either pointless, or it may fail because of an
> > invalid policy configured.
> > ---
> >
2017 Mar 06
0
Re: [PATCH] v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
On Monday, 6 March 2017 11:43:14 CET Richard W.M. Jones wrote:
> Instead of just documenting this bug, fix it in the file_contexts
> file.
>
> Replaces commit ad3c8fe7f49c4991e1aa536856a1a408f55d5409.
> ---
> customize/SELinux_relabel.ml | 19 +++++++++++++++++++
> v2v/virt-v2v.pod | 11 -----------
> 2 files changed, 19 insertions(+), 11 deletions(-)
>
2020 May 18
2
Re: [PATCH libguestfs-common 2/2] mlcustomize: Fall back to autorelabel if specfile does not exist (RHBZ#1828952).
On Tuesday, 5 May 2020 17:44:15 CEST Richard W.M. Jones wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c2
I think we need to do a different approach than this patch.
The biggest thing is that currently we check only SELINUXTYPE for the
actual policy, however we do not check SELINUX in case SELinux is in
enforcing mode at all.
IMHO we rather need to read
2017 Mar 06
2
[PATCH v2] v2v: Fix invalid regexp in file_contexts file
v1 -> v2:
Match more specifically.
Rich.
2016 Jul 14
0
[PATCH v2 4/7] customize: Add module for doing SELinux relabel of filesystem.
This implements the --selinux-relabel option for virt-customize,
virt-builder and virt-sysprep. There is no need to autorelabel
functionality now.
Thanks: Stephen Smalley
---
builder/Makefile.am | 1 +
builder/virt-builder.pod | 20 +++++++++----------
customize/Makefile.am | 2 ++
customize/SELinux_relabel.ml | 46 +++++++++++++++++++++++++++++++++++++++++++
2020 Jun 24
0
Re: [PATCH libguestfs-common 2/2] mlcustomize: Fall back to autorelabel if specfile does not exist (RHBZ#1828952).
On Mon, May 18, 2020 at 11:12:29AM +0200, Pino Toscano wrote:
> On Tuesday, 5 May 2020 17:44:15 CEST Richard W.M. Jones wrote:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c2
>
> I think we need to do a different approach than this patch.
>
> The biggest thing is that currently we check only SELINUXTYPE for the
> actual policy, however we do not check SELINUX
2018 Mar 06
3
Re: virt-v2v 1.38 fails to convert .vmx VM: setfiles ... Multiple same specifications for /.*.
Hello, Richard.
> -----Original Message-----
> From: Richard W.M. Jones [mailto:rjones@redhat.com]
> Sent: Monday, March 5, 2018 8:42 PM
> To: Зиновик Игорь Анатольевич <ZinovikIA@nspk.ru>
> Cc: libguestfs@redhat.com
> Subject: Re: [Libguestfs] virt-v2v 1.38 fails to convert .vmx VM: setfiles ...
> Multiple same specifications for /.*.
>
> On Mon, Mar 05, 2018 at
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
Rewrite the relabel API to read the policy configured in the guest,
invoking setfiles (added as part of the appliance, as part of
policycoreutils) to relabel the specified root. In case of failure at
any point of the process, a touch of .autorelabel in the root is tried
as last-attempt measure to do the relabel.
Considering that running SELinux tools in the appliance might be
affected by the
2014 May 24
9
SELinux relabel API
[
I realized that we were discussing adding this feature, in various
private email, IRC, and this long bugzilla thread:
https://bugzilla.redhat.com/show_bug.cgi?id=1060423
That's not how we should do things. Let's discuss it on the
mailing list.
]
One thing that virt-customize/virt-sysprep/virt-builder have to do is
relabel SELinux guests.
What we do at the moment
2016 Jul 14
10
[PATCH v2 0/7] Fix SELinux
v1 -> v2:
- Add simple test of the setfiles API.
- Use SELinux_relabel module in virt-v2v (instead of touch /.autorelabel).
- Small fixes.
Rich.
2016 Jul 14
0
[PATCH v2 2/7] New API: setfiles - SELinux relabel parts of the filesystem.
---
appliance/packagelist.in | 1 +
daemon/Makefile.am | 1 +
daemon/setfiles.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 22 ++++++++++++
gobject/Makefile.inc | 2 ++
src/MAX_PROC_NR | 2 +-
6 files changed, 120 insertions(+), 1 deletion(-)
create mode 100644 daemon/setfiles.c
diff --git a/appliance/packagelist.in
2016 Jul 13
6
[PATCH 0/5] Fix SELinux
We can use the setfiles(8) command to relabel the guest filesystem,
even though we don't have a policy loaded nor SELinux enabled in the
appliance kernel.
This also deprecates or removes the old and broken SELinux support.
This patch isn't quite complete - I would like to add some tests to
the new API. I'm posting here to garner early feedback.
Rich.