Commit graph

5 commits

Author SHA1 Message Date
Maxim Cournoyer
b444fc05b5
least-authority: Export default preserved environment variables.
* guix/least-authority.scm (%precious-variables): Rename to...
(%default-preserved-environment-variables): ... this, and export it.
(least-authority-wrapper): Adjust accordingly.

Change-Id: Idd259b15463920965f530e1917d76bf97def3b7b
2025-04-19 21:13:21 +09:00
Maxim Cournoyer
bfcfd28f9b
least-authority: Preserve systemd LISTEN_* environment variables.
Otherwise, combining make-systemd-constructor with least-authority-wrapper
would not work correctly out of the box.

* guix/least-authority.scm (%precious-variables): Add "LISTEN_PID"
"LISTEN_FDS" "LISTEN_FDNAMES" environment variables.

Change-Id: Idd259b15463920965f530e1917d76bf97def3b7b
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2025-04-03 20:24:15 +09:00
Ludovic Courtès
7578c25b93
least-authority: Add support for changing UIDs/GIDs before exec.
Fixes <https://issues.guix.gnu.org/67175>.

* guix/least-authority.scm (least-authority-wrapper): Add #:user
and #:group.
[code]: Add calls to ‘setgid’ and ‘setuid’ when appropriate.

Change-Id: I2aad8e5686b42b5c92fc306b114c5c60cb8bc551
2023-12-22 00:31:41 +01:00
Maxim Cournoyer
8994e13b9f
least-authority: Fix typo.
* guix/least-authority.scm (least-authority-wrapper): Fix typo in doc.
2022-06-10 23:52:34 -04:00
Ludovic Courtès
3682bd4003
Add (guix least-authority).
* guix/least-authority.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/build/shepherd.scm (default-mounts): Make public.
2022-05-01 21:30:35 +02:00