* [PATCH v3] secilc/docs: fix use of TMPDIR
@ 2020-05-15 11:41 Topi Miettinen
2020-05-15 13:35 ` Petr Lautrbach
0 siblings, 1 reply; 4+ messages in thread
From: Topi Miettinen @ 2020-05-15 11:41 UTC (permalink / raw)
To: selinux; +Cc: Topi Miettinen, Petr Lautrbach
Environment variable TMPDIR may be already set for the user building
and this could be equal to $XDG_RUNTIME_DIR or /tmp which are existing
directories. Then when running 'make clean', there are unintended side
effects:
rm -rf /run/user/1000
rm: cannot remove '/run/user/1000/dconf/user': Permission denied
rm: cannot remove '/run/user/1000/systemd': Permission denied
rm: cannot remove '/run/user/1000/gnupg': Permission denied
rm: cannot remove '/run/user/1000/dbus-1': Is a directory
rm: cannot remove '/run/user/1000/inaccessible': Permission denied
make[1]: *** [Makefile:68: clean] Error 1
Fix by always setting the variable.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Suggested-by: Petr Lautrbach <plautrba@redhat.com>
---
secilc/docs/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
index 6b07ce7f..197ccef2 100644
--- a/secilc/docs/Makefile
+++ b/secilc/docs/Makefile
@@ -1,8 +1,8 @@
-CWD ?= $(shell pwd)
-HTMLDIR ?= $(CWD)/html
-PDFDIR ?= $(CWD)/pdf
-TMPDIR ?= $(CWD)/tmp
-TESTDIR ?= $(CWD)/../test
+CWD = $(shell pwd)
+HTMLDIR = $(CWD)/html
+PDFDIR = $(CWD)/pdf
+TMPDIR = $(CWD)/tmp
+TESTDIR = $(CWD)/../test
# All the markdown files that make up the guide:
FILE_LIST ?= cil_introduction.md \
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] secilc/docs: fix use of TMPDIR
2020-05-15 11:41 [PATCH v3] secilc/docs: fix use of TMPDIR Topi Miettinen
@ 2020-05-15 13:35 ` Petr Lautrbach
2020-05-29 13:03 ` Stephen Smalley
0 siblings, 1 reply; 4+ messages in thread
From: Petr Lautrbach @ 2020-05-15 13:35 UTC (permalink / raw)
To: selinux; +Cc: Topi Miettinen
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
On Fri, May 15, 2020 at 02:41:11PM +0300, Topi Miettinen wrote:
> Environment variable TMPDIR may be already set for the user building
> and this could be equal to $XDG_RUNTIME_DIR or /tmp which are existing
> directories. Then when running 'make clean', there are unintended side
> effects:
>
> rm -rf /run/user/1000
> rm: cannot remove '/run/user/1000/dconf/user': Permission denied
> rm: cannot remove '/run/user/1000/systemd': Permission denied
> rm: cannot remove '/run/user/1000/gnupg': Permission denied
> rm: cannot remove '/run/user/1000/dbus-1': Is a directory
> rm: cannot remove '/run/user/1000/inaccessible': Permission denied
> make[1]: *** [Makefile:68: clean] Error 1
>
> Fix by always setting the variable.
>
> Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
> Suggested-by: Petr Lautrbach <plautrba@redhat.com>
Acked-by: Petr Lautrbach <plautrba@redhat.com>
Thanks!
> ---
> secilc/docs/Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
> index 6b07ce7f..197ccef2 100644
> --- a/secilc/docs/Makefile
> +++ b/secilc/docs/Makefile
> @@ -1,8 +1,8 @@
> -CWD ?= $(shell pwd)
> -HTMLDIR ?= $(CWD)/html
> -PDFDIR ?= $(CWD)/pdf
> -TMPDIR ?= $(CWD)/tmp
> -TESTDIR ?= $(CWD)/../test
> +CWD = $(shell pwd)
> +HTMLDIR = $(CWD)/html
> +PDFDIR = $(CWD)/pdf
> +TMPDIR = $(CWD)/tmp
> +TESTDIR = $(CWD)/../test
>
> # All the markdown files that make up the guide:
> FILE_LIST ?= cil_introduction.md \
> --
> 2.26.2
>
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] secilc/docs: fix use of TMPDIR
2020-05-15 13:35 ` Petr Lautrbach
@ 2020-05-29 13:03 ` Stephen Smalley
2020-06-01 8:43 ` Petr Lautrbach
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Smalley @ 2020-05-29 13:03 UTC (permalink / raw)
To: Petr Lautrbach; +Cc: SElinux list, Topi Miettinen
On Fri, May 15, 2020 at 9:36 AM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> On Fri, May 15, 2020 at 02:41:11PM +0300, Topi Miettinen wrote:
> > Environment variable TMPDIR may be already set for the user building
> > and this could be equal to $XDG_RUNTIME_DIR or /tmp which are existing
> > directories. Then when running 'make clean', there are unintended side
> > effects:
> >
> > rm -rf /run/user/1000
> > rm: cannot remove '/run/user/1000/dconf/user': Permission denied
> > rm: cannot remove '/run/user/1000/systemd': Permission denied
> > rm: cannot remove '/run/user/1000/gnupg': Permission denied
> > rm: cannot remove '/run/user/1000/dbus-1': Is a directory
> > rm: cannot remove '/run/user/1000/inaccessible': Permission denied
> > make[1]: *** [Makefile:68: clean] Error 1
> >
> > Fix by always setting the variable.
> >
> > Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
> > Suggested-by: Petr Lautrbach <plautrba@redhat.com>
>
> Acked-by: Petr Lautrbach <plautrba@redhat.com>
Should I merge this or do you have it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] secilc/docs: fix use of TMPDIR
2020-05-29 13:03 ` Stephen Smalley
@ 2020-06-01 8:43 ` Petr Lautrbach
0 siblings, 0 replies; 4+ messages in thread
From: Petr Lautrbach @ 2020-06-01 8:43 UTC (permalink / raw)
To: SElinux list; +Cc: Stephen Smalley, Topi Miettinen
[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]
On Fri, May 29, 2020 at 09:03:44AM -0400, Stephen Smalley wrote:
> On Fri, May 15, 2020 at 9:36 AM Petr Lautrbach <plautrba@redhat.com> wrote:
> >
> > On Fri, May 15, 2020 at 02:41:11PM +0300, Topi Miettinen wrote:
> > > Environment variable TMPDIR may be already set for the user building
> > > and this could be equal to $XDG_RUNTIME_DIR or /tmp which are existing
> > > directories. Then when running 'make clean', there are unintended side
> > > effects:
> > >
> > > rm -rf /run/user/1000
> > > rm: cannot remove '/run/user/1000/dconf/user': Permission denied
> > > rm: cannot remove '/run/user/1000/systemd': Permission denied
> > > rm: cannot remove '/run/user/1000/gnupg': Permission denied
> > > rm: cannot remove '/run/user/1000/dbus-1': Is a directory
> > > rm: cannot remove '/run/user/1000/inaccessible': Permission denied
> > > make[1]: *** [Makefile:68: clean] Error 1
> > >
> > > Fix by always setting the variable.
> > >
> > > Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
> > > Suggested-by: Petr Lautrbach <plautrba@redhat.com>
> >
> > Acked-by: Petr Lautrbach <plautrba@redhat.com>
>
> Should I merge this or do you have it?
>
Applied.
Sorry for the delay.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-01 8:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 11:41 [PATCH v3] secilc/docs: fix use of TMPDIR Topi Miettinen
2020-05-15 13:35 ` Petr Lautrbach
2020-05-29 13:03 ` Stephen Smalley
2020-06-01 8:43 ` Petr Lautrbach
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 NNTP newsgroup(s).