emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32111: closed ([PATCH] daemon: Allow store names t


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32111: closed ([PATCH] daemon: Allow store names to start with a dot.)
Date: Thu, 12 Jul 2018 13:21:02 +0000

Your message dated Thu, 12 Jul 2018 15:20:23 +0200
with message-id <address@hidden>
and subject line daemon store names can't start with a dot
has caused the debbugs.gnu.org bug report #32111,
regarding [PATCH] daemon: Allow store names to start with a dot.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32111: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32111
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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




--- End Message ---
--- Begin Message --- Subject: daemon store names can't start with a dot Date: Thu, 12 Jul 2018 15:20:23 +0200 User-agent: mu4e 1.0; emacs 26.1
Ludovic Courtès <address@hidden> writes:

> Hello Clément,
>
> Clément Lassieur <address@hidden> skribis:
>
>> Nils Gillmann <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]