* [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
@ 2018-07-10 12:43 Clément Lassieur
2018-07-10 19:18 ` Nils Gillmann
0 siblings, 1 reply; 6+ messages in thread
From: Clément Lassieur @ 2018-07-10 12:43 UTC (permalink / raw)
To: 32111
* 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
2018-07-10 12:43 [bug#32111] [PATCH] daemon: Allow store names to start with a dot Clément Lassieur
@ 2018-07-10 19:18 ` Nils Gillmann
2018-07-10 19:23 ` Clément Lassieur
0 siblings, 1 reply; 6+ messages in thread
From: Nils Gillmann @ 2018-07-10 19:18 UTC (permalink / raw)
To: Clément Lassieur; +Cc: 32111
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
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
2018-07-10 19:18 ` Nils Gillmann
@ 2018-07-10 19:23 ` Clément Lassieur
2018-07-12 8:41 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Clément Lassieur @ 2018-07-10 19:23 UTC (permalink / raw)
To: Nils Gillmann; +Cc: 32111
Nils Gillmann <ng0@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#32111] [PATCH] daemon: Allow store names to start with a dot.
2018-07-10 19:23 ` Clément Lassieur
@ 2018-07-12 8:41 ` Ludovic Courtès
2018-07-12 13:20 ` bug#32111: daemon store names can't " Clément Lassieur
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-12 8:41 UTC (permalink / raw)
To: Clément Lassieur; +Cc: 32111, Nils Gillmann
Hello Clément,
Clément Lassieur <clement@lassieur.org> skribis:
> Nils Gillmann <ng0@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’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#32111: daemon store names can't start with a dot
2018-07-12 8:41 ` Ludovic Courtès
@ 2018-07-12 13:20 ` Clément Lassieur
2018-07-12 16:17 ` [bug#32111] " Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Clément Lassieur @ 2018-07-12 13:20 UTC (permalink / raw)
To: Ludovic Courtès, bug-guix; +Cc: Nils Gillmann, 32111-done
Ludovic Courtès <ludo@gnu.org> writes:
> Hello Clément,
>
> Clément Lassieur <clement@lassieur.org> skribis:
>
>> Nils Gillmann <ng0@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#32111] daemon store names can't start with a dot
2018-07-12 13:20 ` bug#32111: daemon store names can't " Clément Lassieur
@ 2018-07-12 16:17 ` Ludovic Courtès
0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-12 16:17 UTC (permalink / raw)
To: Clément Lassieur; +Cc: Nils Gillmann, 32111-done
Clément Lassieur <clement@lassieur.org> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello Clément,
>>
>> Clément Lassieur <clement@lassieur.org> skribis:
>>
>>> Nils Gillmann <ng0@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’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-12 16:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 12:43 [bug#32111] [PATCH] daemon: Allow store names to start with a dot Clément Lassieur
2018-07-10 19:18 ` Nils Gillmann
2018-07-10 19:23 ` Clément Lassieur
2018-07-12 8:41 ` Ludovic Courtès
2018-07-12 13:20 ` bug#32111: daemon store names can't " Clément Lassieur
2018-07-12 16:17 ` [bug#32111] " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).