diff options
| author | Chris Lemmer-Webber <cwebber@dustycloud.org> | 2021-07-06 22:03:19 +0200 |
|---|---|---|
| committer | Christopher Lemmer Webber <cwebber@dustycloud.org> | 2021-07-29 11:32:08 -0400 |
| commit | a7ac19851baab3fbcc40c4b2cf5b00a6ac9cd2f3 (patch) | |
| tree | 3731cb92eecc360ecc886b6cffb1153b4c5ab9a6 /doc | |
| parent | 5a1ce6cf70fcd386e56a325efafd7d73ea6cdfcf (diff) | |
services: setuid: More configurable setuid support.
New record <setuid-program> with fields for setting the specific user
and group, as well as specifically selecting the setuid and setgid bits,
for a program within the setuid-program-service.
* gnu/services.scm (setuid-program-file-like-deprecated): New function.
(setuid-program-service-type): Make use of
setuid-program->activation-gexp. Adjust the extend property to handle
<setuid-program>.
* gnu/build/activation.scm (activate-setuid-programs): Update to expect a
<setuid-record> list for each program entry.
* gnu/system.scm: (operating-system-setuid-programs): Renamed to
%operating-system-setuid-programs and replace it with new procedure.
(operating-system-default-essential-services,
hurd-default-essential-services): Replace
operating-system-setuid-programs with
%operating-system-setuid-programs.
* gnu/system/setuid.scm: New file.
* doc/guix.texi (Setuid Programs): Document <setuid-program>.
Co-authored-by: Brice Waegeneire <brice@waegenei.re>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index b3c16e6507b..3c23ae46c00 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -46,7 +46,7 @@ Copyright @copyright{} 2017 Federico Beffa@* | |||
| 46 | Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* | 46 | Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* |
| 47 | Copyright @copyright{} 2017 Thomas Danckaert@* | 47 | Copyright @copyright{} 2017 Thomas Danckaert@* |
| 48 | Copyright @copyright{} 2017 humanitiesNerd@* | 48 | Copyright @copyright{} 2017 humanitiesNerd@* |
| 49 | Copyright @copyright{} 2017, 2021 Christopher Lemmer Webber@* | 49 | Copyright @copyright{} 2017, 2021 Christine Lemmer-Webber@* |
| 50 | Copyright @copyright{} 2017, 2018, 2019, 2020 Marius Bakke@* | 50 | Copyright @copyright{} 2017, 2018, 2019, 2020 Marius Bakke@* |
| 51 | Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@* | 51 | Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@* |
| 52 | Copyright @copyright{} 2017, 2019, 2020, 2021 Maxim Cournoyer@* | 52 | Copyright @copyright{} 2017, 2019, 2020, 2021 Maxim Cournoyer@* |
| @@ -32398,6 +32398,30 @@ package, can be designated by this G-expression (@pxref{G-Expressions}): | |||
| 32398 | #~(string-append #$shadow "/bin/passwd") | 32398 | #~(string-append #$shadow "/bin/passwd") |
| 32399 | @end example | 32399 | @end example |
| 32400 | 32400 | ||
| 32401 | @deftp {Data Type} setuid-program | ||
| 32402 | This data type represents a program with a setuid or setgid bit set. | ||
| 32403 | |||
| 32404 | @table @asis | ||
| 32405 | @item @code{program} | ||
| 32406 | A file-like object having its setuid and/or setgid bit set. | ||
| 32407 | |||
| 32408 | @item @code{setuid?} (default: @code{#t}) | ||
| 32409 | Whether to set user setuid bit. | ||
| 32410 | |||
| 32411 | @item @code{setgid?} (default: @code{#f}) | ||
| 32412 | Whether to set group setgid bit. | ||
| 32413 | |||
| 32414 | @item @code{user} (default: @code{0}) | ||
| 32415 | UID (integer) or user name (string) for the user owner of the program, | ||
| 32416 | defaults to root. | ||
| 32417 | |||
| 32418 | @item @code{group} (default: @code{0}) | ||
| 32419 | GID (integer) goup name (string) for the group owner of the program, | ||
| 32420 | defaults to root. | ||
| 32421 | |||
| 32422 | @end table | ||
| 32423 | @end deftp | ||
| 32424 | |||
| 32401 | A default set of setuid programs is defined by the | 32425 | A default set of setuid programs is defined by the |
| 32402 | @code{%setuid-programs} variable of the @code{(gnu system)} module. | 32426 | @code{%setuid-programs} variable of the @code{(gnu system)} module. |
| 32403 | 32427 | ||
