all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 72920@debbugs.gnu.org
Subject: [bug#72920] [PATCH 2/3] services: cleanup: Create directories with the right mode upfront.
Date: Sat, 21 Sep 2024 09:11:32 +0800	[thread overview]
Message-ID: <87jzf595ff.wl-hako@ultrarare.space> (raw)
In-Reply-To: <ddcf65c4d60e37f9427f18b56ea7e740e13bb1a9.1725133215.git.ludo@gnu.org>

Hi Ludo,

On Sun, 01 Sep 2024 03:47:23 +0800,
Ludovic Courtès wrote:
>
> * gnu/services.scm (cleanup-gexp): Pass mode as second argument to
> ‘mkdir’; remove ‘chmod’ calls.
>
> Change-Id: I8ac2dde0ca5d9bd6b2ef104d77141d8463d8b3fa
> ---
>  gnu/services.scm | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index ce13c087ce..4a8e2b3b15 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -660,10 +660,8 @@ (define (cleanup-gexp _)
>             (delete-file-recursively "/tmp")
>             (delete-file-recursively "/var/run")
>
> -           (mkdir "/tmp")
> -           (chmod "/tmp" #o1777)
> -           (mkdir "/var/run")
> -           (chmod "/var/run" #o755)
> +           (mkdir "/tmp" #o1777)
> +           (mkdir "/var/run" #o755)
>             (delete-file-recursively "/run/udev/watch.old"))))))
>
>  (define cleanup-service-type

It seems that the mode is not applied correctly:

--8<---------------cut here---------------start------------->8---
$ guile -c '(mkdir "/tmp/test" #o1777)' && stat /tmp/test
[...]
Access: (1755/drwxr-xr-t)  Uid: ( 1000/    hako)   Gid: (  998/   users)
[...]
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ guile -c '(and (mkdir "/tmp/test2") (chmod "/tmp/test2" #o1777))' && stat /tmp/test2
[...]
Access: (1777/drwxrwxrwt)  Uid: ( 1000/    hako)   Gid: (  998/   users)
[...]
--8<---------------cut here---------------end--------------->8---

Thanks

  reply	other threads:[~2024-09-21  1:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-31 19:42 [bug#72920] [PATCH 0/3] Clean out /run upon boot Ludovic Courtès
2024-08-31 19:47 ` [bug#72920] [PATCH 1/3] services: cleanup: Run under C.UTF-8 locale Ludovic Courtès
2024-08-31 19:47 ` [bug#72920] [PATCH 2/3] services: cleanup: Create directories with the right mode upfront Ludovic Courtès
2024-09-21  1:11   ` Hilton Chain via Guix-patches via [this message]
2024-09-25 16:14     ` Ludovic Courtès
2024-08-31 19:47 ` [bug#72920] [PATCH 3/3] services: cleanup: Delete /run upon boot Ludovic Courtès
2024-09-20 21:26 ` [bug#72920] [PATCH 0/3] Clean out " Vagrant Cascadian
2024-09-25 14:26   ` bug#72920: " Ludovic Courtès

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=87jzf595ff.wl-hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=72920@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    --cc=ludo@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.