From patchwork Fri Dec 1 22:45:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 57189 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DA7A316EA4; Fri, 1 Dec 2023 22:46:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 64A1116CBF for ; Fri, 1 Dec 2023 22:46:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9CGm-0000qk-Nn; Fri, 01 Dec 2023 17:46:00 -0500 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 1r9CGh-0000qL-EV for guix-patches@gnu.org; Fri, 01 Dec 2023 17:45:56 -0500 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 1r9CGe-0004cY-S3 for guix-patches@gnu.org; Fri, 01 Dec 2023 17:45:54 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9CGn-0004XW-Q7 for guix-patches@gnu.org; Fri, 01 Dec 2023 17:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67574] [PATCH] services: Fix oci-container-service-type container user. References: <6f940b49-d465-3b45-7963-59a0885968fb@autistici.org> In-Reply-To: <6f940b49-d465-3b45-7963-59a0885968fb@autistici.org> Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Dec 2023 22:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67574 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 67574@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 67574-submit@debbugs.gnu.org id=B67574.170147073417414 (code B ref 67574); Fri, 01 Dec 2023 22:46:01 +0000 Received: (at 67574) by debbugs.gnu.org; 1 Dec 2023 22:45:34 +0000 Received: from localhost ([127.0.0.1]:56256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9CGL-0004Wo-NV for submit@debbugs.gnu.org; Fri, 01 Dec 2023 17:45:34 -0500 Received: from confino.investici.org ([93.190.126.19]:35143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9CGJ-0004Wf-Pk for 67574@debbugs.gnu.org; Fri, 01 Dec 2023 17:45:32 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Shp6n38qBz1113; Fri, 1 Dec 2023 22:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1701470721; bh=YfpJCavfd/dwotpkHcAVxL6odk3crkFE9hO/XlQIxJc=; h=From:To:Cc:Subject:Date:From; b=RcfVwVxWpx4k5cHAAaYLv1p/J0hXykO1BlCipvhz8BNxDrh/xtlCpJTDSBVAzRfTv rEmREF6YlZ0sMgRPxOwX3BbcdL1SRfECPJpURsGwShcIPMYlT6wr0PiujopdAubIYO 20KhkPByxEl54d1MJRwkjDC/CWwm+5sMHc3oF4y0= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4Shp6n2LTXz110s; Fri, 1 Dec 2023 22:45:21 +0000 (UTC) Date: Fri, 1 Dec 2023 23:45:05 +0100 Message-ID: <20231201224505.586-1-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: Giacomo Leidi Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The oci-container-configuration supports two user fields: one is the user, from the host system, under whose authority the OCI-backed Shepherd service is run; the other is an optional user/UID that can be passed to the docker run invokation to override the user defined in the OCI image. The user from the host system is incorrectly passed to docker run command, this patches reverts the incorrect behavior and passes the correct container-user field value. * gnu/services/docker.scm (oci-container-configuration): Fix the user passed to the docker run invokation. --- gnu/services/docker.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 842a11f1caa1bb929c427722ad9d7b7c1ff65727 diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index ebea0a473a..72ef7d74db 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -374,7 +374,7 @@ (define oci-container-configuration->options (network (oci-container-configuration-network config)) (user - (oci-container-configuration-user config)) + (oci-container-configuration-container-user config)) (workdir (oci-container-configuration-workdir config))) (apply append