;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2022 Tobias Geerinckx-Rice ;;; ;;; 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 . (define-module (gnu system setuid) #:use-module (gnu system privilege) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:re-export (file-like->setuid-program) #:export (setuid-program setuid-program? setuid-program-program setuid-program-setuid? setuid-program-setgid? setuid-program-user setuid-program-group)) ;;; Commentary: ;;; ;;; Do not use this module in new code. It used to define data structures ;;; representing setuid/setgid programs, but is now a mere compatibility shim ;;; wrapping a subset of (gnu system privilege). ;;; ;;; Code: (define-syntax setuid-program (lambda (fields) (syntax-case fields () ((_ (field value) ...) #`(privileged-program (setuid? (match (assoc-ref '((field value) ...) 'setuid?) ((#f) #f) (_ #t))) #,@(remove (match-lambda ((f _) (eq? (syntax->datum f) 'setuid?))) #'((field value) ...))))))) (define setuid-program? privileged-program?) (define setuid-program-program privileged-program-program) (define setuid-program-setuid? privileged-program-setuid?) (define setuid-program-setgid? privileged-program-setgid?) (define setuid-program-user privileged-program-user) (define setuid-program-group privileged-program-group) d5e5b7d7703c6ee9'>gnu/services/telephony.scm
AgeCommit message (Expand)Author
2023-12-22services: jami: Use ‘least-authority-wrapper’....* gnu/services/telephony.scm (jami-configuration->command-line-arguments) [wrapper]: New procedure. Use it. (jami-shepherd-services): In ‘start’ method of ‘jami’ service, use ‘fork+exec-command’ instead of ‘make-forkexec-constructor/container’. Remove use of (gnu build shepherd). Change-Id: Ic71c0c88477d92bf137d9d0a5832bae8721cc210 Ludovic Courtès
2023-12-22services: jami-dbus-session: Use ‘least-authority-wrapper’....* gnu/services/telephony.scm (jami-shepherd-services): Use ‘least-authority-wrapper’ for ‘dbus-daemon’. Use ‘fork+exec-command’ instead of ‘make-forkexec-constructor/container’ in the ‘start’ method’. Remove reference to (gnu build shepherd). Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I9d9f8de6ecea77950000ff64aa8c8d097dc028a0 Ludovic Courtès
2023-10-07services: configuration: Add some commonly used predicates....* gnu/services/configuration.scm (list-of-packages?, list-of-symbols?): New predicate. * gnu/services/audio.scm (list-of-symbol?): Remove. * gnu/services/telephony.scm (string-list?): Remove. (serialize-string-list): Rename to … (serialize-list-of-strings): … this. (account-fingerprint-list?, jami-account-list?): Use list-of. * doc/guix.texi: Update it. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal
2023-10-07services: configuration: Use transducers within serialize-configuration....Introduces 'base-transducer', a SRFI-171 based transducer that can be used as a starting point for writing custom configuration record serializing procedures. This also fixes the symbol maybe-value serialization test case. * gnu/services/configuration.scm (empty-serializer?): New predicate. (base-transducer, tfilter-maybe-value): New procedure. (serialize-configuration): Adapt to use base-transducer. * gnu/services/telephony.scm (jami-account->alist): Use transducers to skip fields that are unserializable or whose field maybe-value is unset. * tests/services/configuration.scm: Remove test-expect-fail. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Bruno Victal