From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AH6XDXacuWTvdwAASxT56A (envelope-from ) for ; Thu, 20 Jul 2023 22:43:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6FGfDXacuWSs2AAAauVa8A (envelope-from ) for ; Thu, 20 Jul 2023 22:43:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DAD033362A for ; Thu, 20 Jul 2023 22:43:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b="cgo/WfwM"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689885814; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ImXSL+e3vmn8tTrpEqYTNjkc+6HsTPFcPM6zjN+eDNo=; b=jGazWQ08ngbnFQL3WwrZl7bujirVINbF6v7LhQETABvfGwvp9JweR3KtXiD2iBGPosHo5T SZcLZNih0ojNPomRqYo4MOkfF7IiSDa1mki3SqNHfVDcjDEemPdeywG5zKd5uc95MLej6j i2MPUqFybUdwo8bq2DpVKaHlaD6GHQGL2lYzmY08+ERzYujLNArR3bA9zznFUiWSkylesE tNUOiUWTsB+lzTXyciz7zQeADNYOHbUwvcoIQploIoW2xXfIeT81bXuvkaUZ91vuVTcCZj p1wumuuK6UAFg8rRxPpj25u4NJx+S8dp6YKBKt4pJdx8GmvJmdUxaTvNrKRH8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689885814; a=rsa-sha256; cv=none; b=B6pnnrfDlRs5y2EyRUF7wxsoyXC7O3HZLPHRlez096oEgJaoa0rENyMBl8UrgdK6AVculM ebrtAXOKrmRLOj3ZSf6VVxCqcmflcQxdOV6kb5vxGFoZHU8vWYPUH9P2htr7U8EX0LH8iT h+4WjSd4sYsiyBCHDs2Ndr9btuWmJgAyzLEm6n0cbuN3mnxSp0BqcTwSJ2/jLdGPebwqbQ aXQaD+4MbTHzxTD1q/LMR6hQPP5+7sRusXQv7sncYs+ipmpcNpckk+dzl/i65+xpE7T75p pB5m0LGh9ZsGnMXXEgk54QxAGySbZb5PnFdvz6u+CVQYory4/4nGSuJ84Z+AoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b="cgo/WfwM"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMaUN-0007Qx-DH; Thu, 20 Jul 2023 16:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMaUM-0007Q6-6j for guix-patches@gnu.org; Thu, 20 Jul 2023 16:43:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMaUK-0007Db-V1 for guix-patches@gnu.org; Thu, 20 Jul 2023 16:43:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMaUK-0000Z9-Qo for guix-patches@gnu.org; Thu, 20 Jul 2023 16:43:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61462] [PATCH v2 07/10] build: Rename activate-setuid-programs. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Jul 2023 20:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61462 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61462@debbugs.gnu.org Received: via spool by 61462-submit@debbugs.gnu.org id=B61462.16898857362040 (code B ref 61462); Thu, 20 Jul 2023 20:43:04 +0000 Received: (at 61462) by debbugs.gnu.org; 20 Jul 2023 20:42:16 +0000 Received: from localhost ([127.0.0.1]:60054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMaTX-0000Wj-W1 for submit@debbugs.gnu.org; Thu, 20 Jul 2023 16:42:16 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:51548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMaTQ-0000V6-Nt for 61462@debbugs.gnu.org; Thu, 20 Jul 2023 16:42:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=ImXSL+e3vmn8t TrpEqYTNjkc+6HsTPFcPM6zjN+eDNo=; h=references:in-reply-to:date: subject:to:from; d=tobias.gr; b=cgo/WfwMpzAyZBUsauuGhdqvueGz5pl+xz8lAT Fg55EcriZPNXq5AZa4Kd/bc+qA8DCsFUwimVxSkEvJJWECpfrmw0Bu6tyWacw6+1jKpc2Q uzpTjKqY6+R7N8pKn7mxyyHE0n20NmUBCHa28HPO5pxv20boZA7xZ5WM1zs6dB0c+uN31v 24TmeMiyfCVMk0c90QrkS9colJvWOXuk+Tjt3Turf51n8zGNGdTp08JVH+tNrSW+XcnbJW 0QPCYQNmUNJfeUYCnWZ1dsvt/jJ8L08G5XqGD+yPG+i87e17ITGfXpLm807gyoARAp4r+F aNw/bIcW3D3pck8NPoyQsSoA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id d133ca6a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <61462@debbugs.gnu.org>; Thu, 20 Jul 2023 20:41:50 +0000 (UTC) Date: Sun, 16 Jul 2023 01:59:57 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <129e8d298556f6a159fcb704ed3df4bf0709ddd3.1689465600.git.me@tobias.gr> References: <129e8d298556f6a159fcb704ed3df4bf0709ddd3.1689465600.git.me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -5.64 X-Spam-Score: -5.64 X-Migadu-Queue-Id: DAD033362A X-TUID: ko/C1zjn80pI * gnu/build/activation.scm (activate-setuid-programs): Rename this… (activate-privileged-programs): …to this. Operate on a list of records. * gnu/services.scm (setuid-program->activation-gexp): Adjust caller. --- gnu/build/activation.scm | 24 ++++++++++++------------ gnu/services.scm | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 7f4800bba1..84fbeda162 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -27,7 +27,7 @@ (define-module (gnu build activation) #:use-module (gnu system accounts) - #:use-module (gnu system setuid) + #:use-module (gnu system privilege) #:use-module (gnu build accounts) #:use-module (gnu build linux-boot) #:use-module (guix build utils) @@ -41,7 +41,7 @@ (define-module (gnu build activation) #:export (activate-users+groups activate-user-home activate-etc - activate-setuid-programs + activate-privileged-programs activate-special-files activate-modprobe activate-firmware @@ -287,8 +287,8 @@ (define %privileged-program-directory ;; Place where privileged copies of programs are stored. "/run/privileged/bin") -(define (activate-setuid-programs programs) - "Turn PROGRAMS, a list of file setuid-programs records, into privileged +(define (activate-privileged-programs programs) + "Turn PROGRAMS, a list of file privileged-programs records, into privileged copies stored under %PRIVILEGED-PROGRAM-DIRECTORY." (define (ensure-empty-directory directory) (if (file-exists? directory) @@ -325,11 +325,11 @@ (define (activate-setuid-programs programs) (for-each (lambda (program) (catch 'system-error (lambda () - (let* ((program-name (setuid-program-program program)) - (setuid? (setuid-program-setuid? program)) - (setgid? (setuid-program-setgid? program)) - (user (setuid-program-user program)) - (group (setuid-program-group program)) + (let* ((program-name (privileged-program-program program)) + (setuid? (privileged-program-setuid? program)) + (setgid? (privileged-program-setgid? program)) + (user (privileged-program-user program)) + (group (privileged-program-group program)) (uid (match user ((? string?) (passwd:uid (getpwnam user))) ((? integer?) user))) @@ -339,13 +339,13 @@ (define (activate-setuid-programs programs) (make-privileged-program program-name setuid? setgid? uid gid) (make-deprecated-wrapper program-name))) (lambda args - ;; If we fail to create a setuid program, better keep going + ;; If we fail to create a privileged program, better keep going ;; so that we don't leave %PRIVILEGED-PROGRAM-DIRECTORY empty ;; or half-populated. This can happen if PROGRAMS contains ;; incorrect file names: . (format (current-error-port) - "warning: failed to make ~s setuid/setgid: ~a~%" - (setuid-program-program program) + "warning: failed to privilege ~s: ~a~%" + (privileged-program-program program) (strerror (system-error-errno args)))))) programs)) diff --git a/gnu/services.scm b/gnu/services.scm index eefe58b336..91584e64ca 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -882,7 +882,7 @@ (define (setuid-program->activation-gexp programs) #~(begin (use-modules (gnu system setuid)) - (activate-setuid-programs (list #$@programs)))))) + (activate-privileged-programs (list #$@programs)))))) (define setuid-program-service-type (service-type (name 'setuid-program) -- 2.41.0