Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-23 Thread Bernhard Voelker
On 11/23/20 3:26 AM, Paul Eggert wrote: > On 11/22/20 10:59 AM, Bernhard Voelker wrote: >> selinux.c:257 has a superfluous semicolon after a jump label, >> and a strange indentation: > > The semicolon is required by the C standard, which does not allow a label > before > a declaration. Emacs ind

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-23 Thread Kamil Dudka
On Monday, November 23, 2020 10:49:57 AM CET Paul Eggert wrote: > Thanks, I think I see the problem. I installed the attached to try to fix it. Yes, this made the test-suite green again. Thanks! Kamil

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-23 Thread Paul Eggert
On 11/23/20 1:15 AM, Kamil Dudka wrote: ...: context lookup failed: Operation not supported Thanks, I think I see the problem. I installed the attached to try to fix it. From e3a96eb14e8834f046d8370db80dfdc561ef5550 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 23 Nov 2020 01:48:1

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-23 Thread Kamil Dudka
On Sunday, November 22, 2020 7:08:44 PM CET Pádraig Brady wrote: > > It seems selabel_lookup requires absolute paths. > > Reinstating that code with the attached, > > gets all tests to pass here on Fedora 32 > > with selinux enabled. > > Non leaky version attached. > > cheers, > Pádraig Thanks f

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-23 Thread Paul Eggert
On 11/22/20 10:08 AM, Pádraig Brady wrote: Non leaky version attached. Thanks, I installed that, along with the attached further coreutils patch to fix some bugs in the nearby errno handling. Most likely there are other issues in the SELinux area but I ran out of time to look into this right

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Paul Eggert
On 11/22/20 10:59 AM, Bernhard Voelker wrote: selinux.c:257 has a superfluous semicolon after a jump label, and a strange indentation: The semicolon is required by the C standard, which does not allow a label before a declaration. Emacs indented it that way.

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Paul Eggert
On 11/22/20 6:27 AM, Bernhard Voelker wrote: This is caught by a syntax-check rule as well. Fixed with the attached patch - as well as 2 other sc failures. Thanks for fixing that. The tabs got introduced because I edited mv.c with an unusual Emacs configuration, which I'll try to remember to n

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Bernhard Voelker
On 11/22/20 7:08 PM, Pádraig Brady wrote: > Non leaky version attached. Thanks. Looks good to me - on system without active SELinux: tested once with and once --without-selinux. Minor nit (from Paul's commit): selinux.c:257 has a superfluous semicolon after a jump label, and a strange indentatio

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Pádraig Brady
On 22/11/2020 17:56, Pádraig Brady wrote: On 22/11/2020 14:27, Bernhard Voelker wrote: On 11/22/20 1:28 PM, Kamil Dudka wrote: The coreutils patch introduced tab-indented lines into src/mv.c, which otherwise does not use tabs for indentation. This is caught by a syntax-check rule as well. Fix

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Pádraig Brady
On 22/11/2020 14:27, Bernhard Voelker wrote: On 11/22/20 1:28 PM, Kamil Dudka wrote: The coreutils patch introduced tab-indented lines into src/mv.c, which otherwise does not use tabs for indentation. This is caught by a syntax-check rule as well. Fixed with the attached patch - as well as 2 o

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Bernhard Voelker
On 11/22/20 1:28 PM, Kamil Dudka wrote: > The coreutils patch introduced tab-indented lines into src/mv.c, which > otherwise does not use tabs for indentation. This is caught by a syntax-check rule as well. Fixed with the attached patch - as well as 2 other sc failures. > I can see 3 tests failin

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Kamil Dudka
On Sunday, November 22, 2020 3:45:22 AM CET Paul Eggert wrote: > Yes, it's looking like great minds think alike. > > The coreutils patch I had prepared is fancier than yours, though, as it > caches the result of selabel_open and this should yield better performance. > > I don't use SELinux either

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-21 Thread Paul Eggert
Yes, it's looking like great minds think alike. The coreutils patch I had prepared is fancier than yours, though, as it caches the result of selabel_open and this should yield better performance. I don't use SELinux either. From the look of the coreutils source it appears that the coreutils S

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-21 Thread Bernhard Voelker
On 11/21/20 9:55 PM, Paul Eggert wrote: > Coreutils with --enable-gcc-warnings does not build on Ubuntu 20.10 > because matchpathcon is deprecated in favor of selabel_open etc., > so this patch adds stubs for these functions. Hi Paul, caution - duplicate work ahead: https://lists.gnu.org/archiv

[PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-21 Thread Paul Eggert
Coreutils with --enable-gcc-warnings does not build on Ubuntu 20.10 because matchpathcon is deprecated in favor of selabel_open etc., so this patch adds stubs for these functions. * lib/se-label.c, lib/se-label.in.h, m4/selinux-label-h.m4: New files. * lib/se-selinux.in.h (struct selinux_opt): Add