;;; 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) s='left'>AgeCommit message (Expand)Author a href='/guix/log/tests/grafts.scm?id=6e336a8721b113b76d70e033443c69e21cae012a&showmsg=1'>Expand)Author 2022-11-11grafts: Run with a UTF-8 locale....Fixes <https://issues.guix.gnu.org/55968>. Reported by Maxime Devos <maximedevos@telenet.be>. * guix/grafts.scm (%graft-with-utf8-locale?): New parameter. (graft-derivation/shallow)[glibc-locales, set-utf8-locale]: New variables. [build]: Use 'set-utf8-locale'. * tests/gexp.scm, tests/grafts.scm, tests/packages.scm: Set '%graft-with-utf8-locale?' to #f. Ludovic Courtès 2021-04-15grafts: Support rewriting UTF-16 and UTF-32 store references....Partially fixes <https://bugs.gnu.org/33848>. * guix/build/graft.scm (replace-store-references): Add support for finding and rewriting UTF-16 and UTF-32 store references. * tests/grafts.scm: Add tests. Mark H Weaver