From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] [PATCH] daemon: Allow store names to start with a dot. Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Jul 2018 12:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 32111@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15312266667690 (code B ref -1); Tue, 10 Jul 2018 12:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jul 2018 12:44:26 +0000 Received: from localhost ([127.0.0.1]:53148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcs0I-0001zx-7j for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcs0H-0001zl-75 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcs0B-0004Me-88 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58267) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcs0B-0004MY-54 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcs0A-0006b3-0s for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcs06-0004LH-P3 for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:18 -0400 Received: from mail.lassieur.org ([83.152.10.219]:34592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcs06-0004Km-Ce for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:14 -0400 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 9fdafe61 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Tue, 10 Jul 2018 12:44:11 +0000 (UTC) From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Date: Tue, 10 Jul 2018 14:43:55 +0200 Message-Id: <20180710124355.12754-1-clement@lassieur.org> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) * nix/libstore/store-api.cc (checkStoreName): Disallow only "." and "..". --- nix/libstore/store-api.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 9e07c67e9..1618f1745 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -58,9 +58,8 @@ string storePathToName(const Path & path) void checkStoreName(const string & name) { string validChars = "+-._?="; - /* Disallow names starting with a dot for possible security - reasons (e.g., "." and ".."). */ - if (string(name, 0, 1) == ".") + /* Disallow "." and ".." for possible security reasons. */ + if ((name == ".") || (name == "..")) throw Error(format("illegal name: `%1%'") % name); foreach (string::const_iterator, i, name) if (!((*i >= 'A' && *i <= 'Z') || -- 2.18.0 From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] [PATCH] daemon: Allow store names to start with a dot. Resent-From: Nils Gillmann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Jul 2018 19:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 32111@debbugs.gnu.org Received: via spool by 32111-submit@debbugs.gnu.org id=B32111.15312502813086 (code B ref 32111); Tue, 10 Jul 2018 19:18:02 +0000 Received: (at 32111) by debbugs.gnu.org; 10 Jul 2018 19:18:01 +0000 Received: from localhost ([127.0.0.1]:54360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcy9B-0000nh-73 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 15:18:01 -0400 Received: from static.195.114.201.195.clients.your-server.de ([195.201.114.195]:58396 helo=conspiracy.of.n0.is) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcy98-0000nW-I5 for 32111@debbugs.gnu.org; Tue, 10 Jul 2018 15:17:59 -0400 Received: by conspiracy.of.n0.is (OpenSMTPD) with ESMTPSA id 048bfed9 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 10 Jul 2018 19:17:56 +0000 (UTC) Date: Tue, 10 Jul 2018 19:18:39 +0000 From: Nils Gillmann Message-ID: <20180710191839.bujbi5ekprczypwv@abyayala> References: <20180710124355.12754-1-clement@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180710124355.12754-1-clement@lassieur.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Can you provide some context why this is necessary, maybe even in the commit message? Clément Lassieur transcribed 883 bytes: > * nix/libstore/store-api.cc (checkStoreName): Disallow only "." and "..". > --- > nix/libstore/store-api.cc | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc > index 9e07c67e9..1618f1745 100644 > --- a/nix/libstore/store-api.cc > +++ b/nix/libstore/store-api.cc > @@ -58,9 +58,8 @@ string storePathToName(const Path & path) > void checkStoreName(const string & name) > { > string validChars = "+-._?="; > - /* Disallow names starting with a dot for possible security > - reasons (e.g., "." and ".."). */ > - if (string(name, 0, 1) == ".") > + /* Disallow "." and ".." for possible security reasons. */ > + if ((name == ".") || (name == "..")) > throw Error(format("illegal name: `%1%'") % name); > foreach (string::const_iterator, i, name) > if (!((*i >= 'A' && *i <= 'Z') || > -- > 2.18.0 > > > > From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] [PATCH] daemon: Allow store names to start with a dot. Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Jul 2018 19:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nils Gillmann Cc: 32111@debbugs.gnu.org Received: via spool by 32111-submit@debbugs.gnu.org id=B32111.15312506233647 (code B ref 32111); Tue, 10 Jul 2018 19:24:02 +0000 Received: (at 32111) by debbugs.gnu.org; 10 Jul 2018 19:23:43 +0000 Received: from localhost ([127.0.0.1]:54368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcyEg-0000wl-S6 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 15:23:43 -0400 Received: from mail.lassieur.org ([83.152.10.219]:40488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcyEf-0000wd-SJ for 32111@debbugs.gnu.org; Tue, 10 Jul 2018 15:23:42 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 8d8224b6 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Tue, 10 Jul 2018 19:23:40 +0000 (UTC) References: <20180710124355.12754-1-clement@lassieur.org> <20180710191839.bujbi5ekprczypwv@abyayala> User-agent: mu4e 1.0; emacs 26.1 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <20180710191839.bujbi5ekprczypwv@abyayala> Date: Tue, 10 Jul 2018 21:23:39 +0200 Message-ID: <87o9fenbd0.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Nils Gillmann writes: > Hi, > > Can you provide some context why this is necessary, maybe even > in the commit message? It's necessary when you want to package a program whose source looks like file:///home/foo/.bar. Sure, I'll update the commit message. Cl=C3=A9ment From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] [PATCH] daemon: Allow store names to start with a dot. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 12 Jul 2018 08:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 32111@debbugs.gnu.org, Nils Gillmann Received: via spool by 32111-submit@debbugs.gnu.org id=B32111.153138487529666 (code B ref 32111); Thu, 12 Jul 2018 08:42:01 +0000 Received: (at 32111) by debbugs.gnu.org; 12 Jul 2018 08:41:15 +0000 Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdXA2-0007iP-Na for submit@debbugs.gnu.org; Thu, 12 Jul 2018 04:41:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdXA1-0007iC-32 for 32111@debbugs.gnu.org; Thu, 12 Jul 2018 04:41:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdX9s-0003PY-Mr for 32111@debbugs.gnu.org; Thu, 12 Jul 2018 04:41:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdX9s-0003PS-Ik; Thu, 12 Jul 2018 04:41:04 -0400 Received: from [193.50.110.117] (port=38536 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fdX9r-0002DF-WB; Thu, 12 Jul 2018 04:41:04 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180710124355.12754-1-clement@lassieur.org> <20180710191839.bujbi5ekprczypwv@abyayala> <87o9fenbd0.fsf@lassieur.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Messidor an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 12 Jul 2018 10:41:00 +0200 In-Reply-To: <87o9fenbd0.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Tue, 10 Jul 2018 21:23:39 +0200") Message-ID: <87va9kx2w3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello Cl=C3=A9ment, Cl=C3=A9ment Lassieur skribis: > Nils Gillmann writes: > >> Hi, >> >> Can you provide some context why this is necessary, maybe even >> in the commit message? > > It's necessary when you want to package a program whose source looks > like file:///home/foo/.bar. I=E2=80=99d rather not make this kind of change. In general, I think we sh= ould be very conservative about changes to the daemon and its protocol, because that=E2=80=99s the common denominator of all the versions of Guix. If we change something like it, then we=E2=80=99ll get subtle breakage depe= nding on the version of the daemon in use. WDYT? Ludo=E2=80=99. From unknown Mon Jun 23 06:02:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Subject: bug#32111: closed (daemon store names can't start with a dot) Message-ID: References: <8736wo3814.fsf@lassieur.org> <20180710124355.12754-1-clement@lassieur.org> X-Gnu-PR-Message: they-closed 32111 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 32111@debbugs.gnu.org Date: Thu, 12 Jul 2018 13:21:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1531401662-5142-1" This is a multi-part message in MIME format... ------------=_1531401662-5142-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32111: [PATCH] daemon: Allow store names to start with a dot. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32111@debbugs.gnu.org. --=20 32111: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32111 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1531401662-5142-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32111-done) by debbugs.gnu.org; 12 Jul 2018 13:20:27 +0000 Received: from localhost ([127.0.0.1]:56479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdbWF-0001JM-BW for submit@debbugs.gnu.org; Thu, 12 Jul 2018 09:20:27 -0400 Received: from mail.lassieur.org ([83.152.10.219]:40610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdbWD-0001JC-Qd for 32111-done@debbugs.gnu.org; Thu, 12 Jul 2018 09:20:26 -0400 Received: from newt (smtp.parrot.biz [62.23.167.188]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 440cf76e (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Thu, 12 Jul 2018 13:20:23 +0000 (UTC) References: <20180710124355.12754-1-clement@lassieur.org> <20180710191839.bujbi5ekprczypwv@abyayala> <87o9fenbd0.fsf@lassieur.org> <87va9kx2w3.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Ludovic =?utf-8?Q?Court=C3=A8s?= , bug-guix@gnu.org Subject: daemon store names can't start with a dot In-reply-to: <87va9kx2w3.fsf@gnu.org> Date: Thu, 12 Jul 2018 15:20:23 +0200 Message-ID: <8736wo3814.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32111-done Cc: Nils Gillmann , 32111-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hello Cl=C3=A9ment, > > Cl=C3=A9ment Lassieur skribis: > >> Nils Gillmann writes: >> >>> Hi, >>> >>> Can you provide some context why this is necessary, maybe even >>> in the commit message? >> >> It's necessary when you want to package a program whose source looks >> like file:///home/foo/.bar. > > I=E2=80=99d rather not make this kind of change. In general, I think we = should > be very conservative about changes to the daemon and its protocol, > because that=E2=80=99s the common denominator of all the versions of Guix. > > If we change something like it, then we=E2=80=99ll get subtle breakage de= pending > on the version of the daemon in use. > > WDYT? Okay, let's abandon this then :-) CCing bug-guix because I still think it's a bug; please close it if you disagree. Cl=C3=A9ment ------------=_1531401662-5142-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Jul 2018 12:44:26 +0000 Received: from localhost ([127.0.0.1]:53148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcs0I-0001zx-7j for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcs0H-0001zl-75 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcs0B-0004Me-88 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58267) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcs0B-0004MY-54 for submit@debbugs.gnu.org; Tue, 10 Jul 2018 08:44:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcs0A-0006b3-0s for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcs06-0004LH-P3 for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:18 -0400 Received: from mail.lassieur.org ([83.152.10.219]:34592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcs06-0004Km-Ce for guix-patches@gnu.org; Tue, 10 Jul 2018 08:44:14 -0400 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 9fdafe61 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Tue, 10 Jul 2018 12:44:11 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: guix-patches@gnu.org Subject: [PATCH] daemon: Allow store names to start with a dot. Date: Tue, 10 Jul 2018 14:43:55 +0200 Message-Id: <20180710124355.12754-1-clement@lassieur.org> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) * nix/libstore/store-api.cc (checkStoreName): Disallow only "." and "..". --- nix/libstore/store-api.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 9e07c67e9..1618f1745 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -58,9 +58,8 @@ string storePathToName(const Path & path) void checkStoreName(const string & name) { string validChars = "+-._?="; - /* Disallow names starting with a dot for possible security - reasons (e.g., "." and ".."). */ - if (string(name, 0, 1) == ".") + /* Disallow "." and ".." for possible security reasons. */ + if ((name == ".") || (name == "..")) throw Error(format("illegal name: `%1%'") % name); foreach (string::const_iterator, i, name) if (!((*i >= 'A' && *i <= 'Z') || -- 2.18.0 ------------=_1531401662-5142-1-- From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] daemon store names can't start with a dot Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 12 Jul 2018 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: Nils Gillmann , 32111-done@debbugs.gnu.org Received: via spool by 32111-done@debbugs.gnu.org id=D32111.153141228322101 (code D ref 32111); Thu, 12 Jul 2018 16:19:01 +0000 Received: (at 32111-done) by debbugs.gnu.org; 12 Jul 2018 16:18:03 +0000 Received: from localhost ([127.0.0.1]:57285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdeI6-0005kP-Vd for submit@debbugs.gnu.org; Thu, 12 Jul 2018 12:18:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdeI4-0005js-SX for 32111-done@debbugs.gnu.org; Thu, 12 Jul 2018 12:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdeHv-0002oQ-Kb for 32111-done@debbugs.gnu.org; Thu, 12 Jul 2018 12:17:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdeHv-0002oJ-GG; Thu, 12 Jul 2018 12:17:51 -0400 Received: from [193.50.110.117] (port=45312 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fdeHv-0005gF-1J; Thu, 12 Jul 2018 12:17:51 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180710124355.12754-1-clement@lassieur.org> <20180710191839.bujbi5ekprczypwv@abyayala> <87o9fenbd0.fsf@lassieur.org> <87va9kx2w3.fsf@gnu.org> <8736wo3814.fsf@lassieur.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Messidor an 226 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 12 Jul 2018 18:17:49 +0200 In-Reply-To: <8736wo3814.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Thu, 12 Jul 2018 15:20:23 +0200") Message-ID: <87va9ksa1e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Cl=C3=A9ment Lassieur skribis: > Ludovic Court=C3=A8s writes: > >> Hello Cl=C3=A9ment, >> >> Cl=C3=A9ment Lassieur skribis: >> >>> Nils Gillmann writes: >>> >>>> Hi, >>>> >>>> Can you provide some context why this is necessary, maybe even >>>> in the commit message? >>> >>> It's necessary when you want to package a program whose source looks >>> like file:///home/foo/.bar. >> >> I=E2=80=99d rather not make this kind of change. In general, I think we= should >> be very conservative about changes to the daemon and its protocol, >> because that=E2=80=99s the common denominator of all the versions of Gui= x. >> >> If we change something like it, then we=E2=80=99ll get subtle breakage d= epending >> on the version of the daemon in use. >> >> WDYT? > > Okay, let's abandon this then :-) > > CCing bug-guix because I still think it's a bug; please close it if you > disagree. Looks like you already closed it (or was it me?). Anyway, it=E2=80=99s certainly a limitation, but given that it=E2=80=99s an= annoyance more than a showstopper (in my view at least), I=E2=80=99m in favor keeping things this way for the sake of compatibility. Ludo=E2=80=99. From unknown Mon Jun 23 06:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#32111] daemon store names can't start with a dot Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 12 Jul 2018 16:36:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 32132@debbugs.gnu.org, Nils Gillmann , 32111-done@debbugs.gnu.org Received: via spool by 32111-done@debbugs.gnu.org id=D32111.153141331023782 (code D ref 32111); Thu, 12 Jul 2018 16:36:04 +0000 Received: (at 32111-done) by debbugs.gnu.org; 12 Jul 2018 16:35:10 +0000 Received: from localhost ([127.0.0.1]:57315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdeYf-0006BV-Jg for submit@debbugs.gnu.org; Thu, 12 Jul 2018 12:35:09 -0400 Received: from mail.lassieur.org ([83.152.10.219]:40644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdeYe-0006BK-0J; Thu, 12 Jul 2018 12:35:08 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 5cbbdd47 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Thu, 12 Jul 2018 16:35:06 +0000 (UTC) References: <20180710124355.12754-1-clement@lassieur.org> <20180710191839.bujbi5ekprczypwv@abyayala> <87o9fenbd0.fsf@lassieur.org> <87va9kx2w3.fsf@gnu.org> <8736wo3814.fsf@lassieur.org> <87va9ksa1e.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <87va9ksa1e.fsf@gnu.org> Date: Thu, 12 Jul 2018 18:35:06 +0200 Message-ID: <87fu0ommyt.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Looks like you already closed it (or was it me?). Well, I closed 32111 (guix-patches) but I opened 32132 (bug-guix) with a wontfix tag, so that people can find it easily if they stumble across the issue. > Anyway, it=E2=80=99s certainly a limitation, but given that it=E2=80=99s = an annoyance > more than a showstopper (in my view at least), I=E2=80=99m in favor keepi= ng > things this way for the sake of compatibility. Agreed :-)