aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/setuid.scm
blob: 83111d932c7456c5d1c46263f0594bbf278b146b (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu system setuid)
  #:use-module (guix records)
  #:export (setuid-program
            setuid-program?
            setuid-program-program
            setuid-program-setuid?
            setuid-program-setgid?
            setuid-program-user
            setuid-program-group

            file-like->setuid-program))

;;; Commentary:
;;;
;;; Data structures representing setuid/setgid programs.  This is meant to be
;;; used both on the host side and at run time--e.g., in activation snippets.
;;;
;;; Code:

(define-record-type* <setuid-program>
  setuid-program make-setuid-program
  setuid-program?
  ;; Path to program to link with setuid permissions
  (program       setuid-program-program) ;file-like
  ;; Whether to set user setuid bit
  (setuid?       setuid-program-setuid? ;boolean
                 (default #t))
  ;; Whether to set group setgid bit
  (setgid?       setuid-program-setgid? ;boolean
                 (default #f))
  ;; The user this should be set to (defaults to root)
  (user          setuid-program-user    ;integer or string
                 (default 0))
  ;; Group we want to set this to (defaults to root)
  (group         setuid-program-group   ;integer or string
                 (default 0)))

(define (file-like->setuid-program program)
  (setuid-program (program program)))
oyer 2023-02-02.dir-locals.el: Adjust indentation rule for test-assertm....* .dir-locals.el: Adjust the scheme-indent-function property for test-assertm, so that the two first arguments (the test name and the store variable) are indented as procedure arguments. Maxim Cournoyer 2023-02-02.dir-locals.el: Add indentation rule for computed-file....* .dir-locals.el: Configure scheme-indent-function property for computed-file, so that its first argument (the file name) is indented as a procedure argument. Maxim Cournoyer 2022-09-07.dir-locals.el: Update yas snippets directory....* .dir-locals.el (eval): Update yas snippets directory. Andrew Tropin 2022-09-05.dir-locals.el: Add .go to completion-ignored-extensions....* .dir-locals.el (eval): Add .go to completion-ignored-extensions. Andrew Tropin 2022-09-05.dir-locals.el: Add guix yasnippets....* .dir-locals.el (eval): Add guix yasnippets. Andrew Tropin 2022-07-10monads: Add 'mparameterize'....* etc/system-tests.scm (mparameterize): Move to... * guix/monads.scm (mparameterize): ... here. * tests/monads.scm ("mparameterize"): New test. * .dir-locals.el (c-mode): Add it. Ludovic Courtès 2022-07-10.dir-locals.el: Restore Emacs 27 lisp-fill-paragraph behavior....* .dir-locals.el (scheme-mode): Set fill-paragraph-function to a lisp-fill-paragraph version that matches that of Emacs 27. Maxim Cournoyer 2022-06-28.dir-locals.el: Properly indent 'wrap-script'....* .dir-locals.el (scheme-mode): Indent 'wrap-script' the same way as 'wrap-program'. Maxim Cournoyer 2022-06-07.dir-locals: Adjust to bug-reference-mode in Emacs 28....* .dir-locals.el: Adjust 'bug-reference-bug-regexp' and 'bug-reference-url-format' to Emacs 28. Ludovic Courtès 2022-03-06import: github: Reuse HTTP connection for the /tags URL fallback....* guix/import/github.scm (fetch-releases-or-tags): Call 'open-connection-for-uri' and reuse the same connection for the two 'http-fetch' calls. * .dir-locals.el (scheme-mode): Add 'call-with-port'. Ludovic Courtès 2022-03-06tests: Add (guix http-client) tests....* tests/http-client.scm: New file. * Makefile.am (SCM_TESTS): Add it. * .dir-locals.el (scheme-mode): Add 'with-http-server'. Ludovic Courtès 2022-01-29.dir-locals.el: Don't mess up indentation of prepend and append....The current version appears to assume special values in the first and second package, but it's either all lists (default append) or all package input expressions (inside modify-inputs), which themselves are either packages or lists consisting of a package and a string. * .dir-locals.el: Drop (eval . (put 'prepend 'scheme-indent-function 2)) and (eval . (put 'append 'scheme-indent-function 2)). Liliana Marie Prikler