From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:39275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYcTD-0000bJ-Mv for guix-patches@gnu.org; Wed, 05 Jun 2019 16:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYcTB-00058T-C4 for guix-patches@gnu.org; Wed, 05 Jun 2019 16:25:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYcSz-0004tx-VL for guix-patches@gnu.org; Wed, 05 Jun 2019 16:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hYcSz-0005Ce-P8 for guix-patches@gnu.org; Wed, 05 Jun 2019 16:25:01 -0400 Subject: [bug#36093] [PATCH 1/2] services: Add Singularity. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190604205151.24258-1-ludo@gnu.org> <20190604210115.24477-1-ludo@gnu.org> <20190605170217.4e4c7fed@scratchpost.org> Date: Wed, 05 Jun 2019 22:24:05 +0200 In-Reply-To: <20190605170217.4e4c7fed@scratchpost.org> (Danny Milosavljevic's message of "Wed, 5 Jun 2019 17:02:17 +0200") Message-ID: <87v9xjye56.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 36093@debbugs.gnu.org Hi Danny, Danny Milosavljevic skribis: > On Tue, 4 Jun 2019 23:01:14 +0200 > Ludovic Court=C3=A8s wrote: > >> +@defvr {Scheme Variable} singularity-service-type >> +This is the type of the service that runs >> +@url{https://www.sylabs.io/singularity/, Singularity},=20 > > Does it? > Doesn't it just "allow you to invoke"? Yes, you=E2=80=99re right. I=E2=80=99ll reword as you suggest. >> + (substitute* (find-files "libexec/cli" "\\.exec$") >> + (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]= +)-suid" >> + _ program) >> + (string-append "/run/setuid-programs/singularity-" >> + program "-helper"))) > > Is absolute path OK? There have been some efforts to get guix to relocat= e in > the past. Does this apply here? I think it=E2=80=99s OK: those setuid helpers can only be used on Guix Syst= em, not on a foreign distro, and it goes hand-in-hand with =E2=80=98singularity-service-type=E2=80=99. >> + ;; Create the directories that Singularity 2.6 expects to find. >> + (for-each (lambda (directory) >> + (mkdir-p (string-append "/var/singularity/mnt/" >> + directory))) >> + '("container" "final" "overlay" "session"))))) > > Are permissions OK? They=E2=80=99re good enough for the test, but perhaps it should be #o700. I=E2=80=99ll check if it works like that. There=E2=80=99s been a nice CVE for Singularity 3.x in this area recently: https://nvd.nist.gov/vuln/detail/CVE-2019-11328 It=E2=80=99s not directly applicable here but there could be similar issues. Thanks, Ludo=E2=80=99.