GNU bug report logs - #32111
[PATCH] daemon: Allow store names to start with a dot.

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Tue, 10 Jul 2018 12:45:01 UTC

Severity: normal

Tags: patch

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32111 in the body.
You can then email your comments to 32111 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Tue, 10 Jul 2018 12:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Lassieur <clement <at> lassieur.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 10 Jul 2018 12:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] daemon: Allow store names to start with a dot.
Date: Tue, 10 Jul 2018 14:43:55 +0200
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Tue, 10 Jul 2018 19:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 32111 <at> debbugs.gnu.org (full text, mbox):

From: Nils Gillmann <ng0 <at> n0.is>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 32111 <at> debbugs.gnu.org
Subject: Re: [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
Date: Tue, 10 Jul 2018 19:18:39 +0000
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
> 
> 
> 
> 




Information forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Tue, 10 Jul 2018 19:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 32111 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Nils Gillmann <ng0 <at> n0.is>
Cc: 32111 <at> debbugs.gnu.org
Subject: Re: [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
Date: Tue, 10 Jul 2018 21:23:39 +0200
Nils Gillmann <ng0 <at> n0.is> 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ément




Information forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Thu, 12 Jul 2018 08:42:01 GMT) Full text and rfc822 format available.

Message #14 received at 32111 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 32111 <at> debbugs.gnu.org, Nils Gillmann <ng0 <at> n0.is>
Subject: Re: [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
Date: Thu, 12 Jul 2018 10:41:00 +0200
Hello Clément,

Clément Lassieur <clement <at> lassieur.org> skribis:

> Nils Gillmann <ng0 <at> n0.is> 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’d 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’s the common denominator of all the versions of Guix.

If we change something like it, then we’ll get subtle breakage depending
on the version of the daemon in use.

WDYT?

Ludo’.




Reply sent to Clément Lassieur <clement <at> lassieur.org>:
You have taken responsibility. (Thu, 12 Jul 2018 13:21:02 GMT) Full text and rfc822 format available.

Notification sent to Clément Lassieur <clement <at> lassieur.org>:
bug acknowledged by developer. (Thu, 12 Jul 2018 13:21:02 GMT) Full text and rfc822 format available.

Message #19 received at 32111-done <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>, bug-guix <at> gnu.org
Cc: Nils Gillmann <ng0 <at> n0.is>, 32111-done <at> debbugs.gnu.org
Subject: daemon store names can't start with a dot
Date: Thu, 12 Jul 2018 15:20:23 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello Clément,
>
> Clément Lassieur <clement <at> lassieur.org> skribis:
>
>> Nils Gillmann <ng0 <at> n0.is> 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’d 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’s the common denominator of all the versions of Guix.
>
> If we change something like it, then we’ll get subtle breakage depending
> 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ément




Information forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Thu, 12 Jul 2018 16:19:01 GMT) Full text and rfc822 format available.

Message #22 received at 32111-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: Nils Gillmann <ng0 <at> n0.is>, 32111-done <at> debbugs.gnu.org
Subject: Re: daemon store names can't start with a dot
Date: Thu, 12 Jul 2018 18:17:49 +0200
Clément Lassieur <clement <at> lassieur.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hello Clément,
>>
>> Clément Lassieur <clement <at> lassieur.org> skribis:
>>
>>> Nils Gillmann <ng0 <at> n0.is> 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’d 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’s the common denominator of all the versions of Guix.
>>
>> If we change something like it, then we’ll get subtle breakage depending
>> 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’s certainly a limitation, but given that it’s an annoyance
more than a showstopper (in my view at least), I’m in favor keeping
things this way for the sake of compatibility.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#32111; Package guix-patches. (Thu, 12 Jul 2018 16:36:04 GMT) Full text and rfc822 format available.

Message #25 received at 32111-done <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 32132 <at> debbugs.gnu.org, Nils Gillmann <ng0 <at> n0.is>,
 32111-done <at> debbugs.gnu.org
Subject: Re: daemon store names can't start with a dot
Date: Thu, 12 Jul 2018 18:35:06 +0200
Ludovic Courtès <ludo <at> gnu.org> 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’s certainly a limitation, but given that it’s an annoyance
> more than a showstopper (in my view at least), I’m in favor keeping
> things this way for the sake of compatibility.

Agreed :-)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Aug 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.