On Mar 18 2013, Felix wrote:
From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Mon, 18 Mar 2013 21:22:12 +0100
On Mon, Mar 18, 2013 at 02:03:41PM -0400, Mario Domenech Goulart wrote:
Maybe I'm too paranoid? Or missing something?
No, y
The following eggs in SVN use ##sys#expand-home-path, since this functionality
is useful but was never exported as an official API:
openssl
osxattr
posix-extras
sql-de-lite
sqlite3
vfs
To be fair, three of those are mine.
Jim
On Mar 19, 2013, at 8:48 PM, Mario Domenech Goulart wrote:
> Hi John
Mario Domenech Goulart scripsit:
> IMO, in this case we should just remove ##sys#expand-home-path, since it
> is an internal procedure. Users should not rely on stability of the
> internal API. By keeping ##sys#expand-home-path as an identity
> procedure, we'd be just polluting the core and addi
Hi John,
On Tue, 19 Mar 2013 22:01:45 -0400 John Cowan wrote:
> Mario Domenech Goulart scripsit:
>
>> b. Drop ##sys#expand-home-path. Do not implicitly expand ~ and
>>environment variables in pathnames. Provide a procedure to expand ~
>>in pathnames. That's what this patch implements.
Mario Domenech Goulart scripsit:
> b. Drop ##sys#expand-home-path. Do not implicitly expand ~ and
>environment variables in pathnames. Provide a procedure to expand ~
>in pathnames. That's what this patch implements.
I suggest:
b2. Keep ##sys#expand-home-path, but make it the identi
Hi,
On Tue, 19 Mar 2013 16:44:24 +0100 Peter Bex wrote:
> On Fri, Mar 15, 2013 at 07:58:02AM +0100, Florian Zumbiehl wrote:
>> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
>> API.
>
> I've moved the ~ behaviour to a new procedure in "utils" called "ep" and
> upda
Peter Bex scripsit:
> BTW: This behaviour isn't really compatible with the shell's, since it
> disallows strings formatted like ~username from being expanded to that
> user's homedir.
I don't think that behavior is worth emulating. For one thing, machines
are far less likely to be multi-user now
On Fri, Mar 15, 2013 at 07:58:02AM +0100, Florian Zumbiehl wrote:
> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
> API.
I've moved the ~ behaviour to a new procedure in "utils" called "ep" and
updated the NEWS file and docs.
The signed off patch is attached.
I'm
On Mon, Mar 18, 2013 at 10:05:46PM +0100, Felix wrote:
> I disagree. We can still try to make the core system practical,
> instead of a mindless API server for low-level facilities wrapped in
> s-expression syntax.
Nobody's arguing for that. Abstraction (the right kind!) is what makes
Scheme so p
From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Mon, 18 Mar 2013 13:02:01 -0400
> Hi Matt,
>
> On Mon, 18 Mar 2013 08:45:17 -0700 Matt Welland wrote:
>
>> Please please keep the expansion of ~.
>> Pragmatic
>
> Note that you need to know that `absolute-pathname?' does not expand ~.
No, it doesn't because it is not a file-system operation. It is a string
operation.
cheers,
felix
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.
From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Mon, 18 Mar 2013 21:22:12 +0100
> On Mon, Mar 18, 2013 at 02:03:41PM -0400, Mario Domenech Goulart wrote:
>> Maybe I'm too paranoid? Or missing something?
>
> No, you're
On Mon, Mar 18, 2013 at 02:03:41PM -0400, Mario Domenech Goulart wrote:
> Maybe I'm too paranoid? Or missing something?
No, you're spot on. I think given a choice, we should always err on
the side of security and adhere to the Principle Of Least Astonishment.
For convenient scripting, a "dwim"
Hi John,
On Mon, 18 Mar 2013 16:01:24 -0400 John Cowan wrote:
> Mario Domenech Goulart scripsit:
>
>> $ mkdir '~'
>
> While this is certainly Posix-legal, my opinion is that anyone who does
> it deserves to lose.
Indeed, but the actual point is that a malicious user can create such a
director
Mario Domenech Goulart scripsit:
> $ mkdir '~'
While this is certainly Posix-legal, my opinion is that anyone who does
it deserves to lose. In the Real World, Posix systems often have portions
of the filesystem that are not fully Posix-compliant.
--
In politics, obedience and support Jo
Hi,
> If we keep the ~-expansion, any safe code that use the filesystem API
> will have to resort to tricks like
>
> (operation (if (absolute-pathname? the-path)
> the-path
> (make-pathname (current-directory) the-path)))
>
> to guard against input that would
Hi Felix,
On Mon, 18 Mar 2013 11:25:02 -0400 (EDT) Felix
wrote:
> From: Mario Domenech Goulart
> Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
> Date: Mon, 18 Mar 2013 10:33:49 -0400
>
>>
>> Making robust software in shell scripting langu
Hi Matt,
On Mon, 18 Mar 2013 08:45:17 -0700 Matt Welland wrote:
> Please please keep the expansion of ~.
> Pragmatically speaking what is at risk?
Here's a simple example:
$ mkdir some-dir
$ cd some-dir/
$ mkdir '~'
$ echo data > '~/some-file'
$ echo 'very important data' > ~/some-
From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Mon, 18 Mar 2013 10:33:49 -0400
>
> Making robust software in shell scripting languages is hard, and one of
> the reasons it is hard is that shells perform a lot of &q
-home-path.
From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Mon, 18 Mar 2013 10:33:49 -0400
>
> Making robust software in shell scripting languages is hard, and one of
> the reasons it is hard is that shells perform
Hi,
On Mon, 18 Mar 2013 14:30:13 + Alaric Snell-Pym
wrote:
> On 03/16/2013 05:18 PM, Florian Zumbiehl wrote:
>>
>>> having a "clean file-system API", whatever that means.
>>
>> I think primarily that you can read a directory and use the filenames you
>> get back for opening the files in tha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 03/16/2013 05:18 PM, Florian Zumbiehl wrote:
> Hi,
>
>> having a "clean file-system API", whatever that means.
>
> I think primarily that you can read a directory and use the filenames you
> get back for opening the files in that directory rather th
Hi,
> having a "clean file-system API", whatever that means.
I think primarily that you can read a directory and use the filenames you
get back for opening the files in that directory rather than being
surprised with some other file or an exception? Or not re-expanding command
line arguments tha
> One option may be to create an egg that modifies and exports all the
> affected code. For example:
>
> (define (with-input-from-file str thunk . mode)
> (apply core:with-input-from-file (expand-path str) thunk mode))
>
> And then you can import the module with or without a prefix if you
> wan
>>
>> But let's not forget convenience...
>
> I don't think (with-input-from-file (expand-path "~/foo") read) is less
> convenient than (with-input-from-file "~/foo" read expand-path: #t)
You misunderstood - I'm not proposing adding flags. The variable-name
expansion ("$...") is admittedly ugly
On Mar 15, 2013, at 3:35 PM, Peter Bex wrote:
>
> Finally, a flag would also need to go everywhere a path is accessed
> (including file-open, directory, directory?, call-with-input-file, etc...)
> unless you make it a parameter (which would be slower, if I'm not
> mistaken).
Oops, I see you alrea
On Mar 15, 2013, at 3:35 PM, Peter Bex wrote:
> On Fri, Mar 15, 2013 at 09:30:43PM +0100, Felix wrote:
>> From: Peter Bex
>>> I agree we can't immediately do it, but we should strive towards a clean,
>>> safe API in the long run. Just keeping it around is not an option either.
>>> Adding more pa
On Fri, Mar 15, 2013 at 09:30:43PM +0100, Felix wrote:
> From: Peter Bex
> > I agree we can't immediately do it, but we should strive towards a clean,
> > safe API in the long run. Just keeping it around is not an option either.
> > Adding more parameters or options is ugly, IMHO.
>
> But let's
From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Fri, 15 Mar 2013 10:01:42 +0100
> On Fri, Mar 15, 2013 at 09:36:01AM +0100, Christian Kellermann wrote:
>> * Florian Zumbiehl [130315 07:58]:
>> > Remove ##sys#expand-home-path as s
From: Jim Ursetto
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Fri, 15 Mar 2013 03:03:31 -0500
> On Mar 15, 2013, at 2:21 AM, Felix wrote:
>
>> From: Florian Zumbiehl
>> Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 03/15/2013 09:01 AM, Peter Bex wrote:
> On Fri, Mar 15, 2013 at 09:36:01AM +0100, Christian Kellermann wrote:
>> * Florian Zumbiehl [130315 07:58]:
>>> Remove ##sys#expand-home-path as shell expansion has no place in a
>>> filesystem
>>> API.
>>
>
On Fri, Mar 15, 2013 at 09:36:01AM +0100, Christian Kellermann wrote:
> * Florian Zumbiehl [130315 07:58]:
> > Remove ##sys#expand-home-path as shell expansion has no place in a
> > filesystem
> > API.
>
> I'd rather prefer a "no-shell-expansion" feature than breaking the
> current behaviour. Th
* Florian Zumbiehl [130315 07:58]:
> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
> API.
I'd rather prefer a "no-shell-expansion" feature than breaking the
current behaviour. This way programmers can choose when they need
a "dumb" implementation (because the name
On Fri, Mar 15, 2013 at 02:55:10AM -0500, Jim Ursetto wrote:
> Although this is more secure in the weird case that you
> have filenames starting with ~ or containing $, I think it would
> potentially break existing code, especially scripts
> (I have used the ~/ shortcut myself in scripts when openi
On Mar 15, 2013, at 2:21 AM, Felix wrote:
> From: Florian Zumbiehl
> Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
> Date: Fri, 15 Mar 2013 07:58:02 +0100
>
>> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
>>
On Mar 15, 2013, at 2:21 AM, Felix wrote:
> From: Florian Zumbiehl
> Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
> Date: Fri, 15 Mar 2013 07:58:02 +0100
>
>> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
>>
From: Florian Zumbiehl
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Fri, 15 Mar 2013 07:58:02 +0100
> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
> API.
Can't we just leave it in there? At least for "load
On Mar 15, 2013, at 1:04 AM, Florian Zumbiehl wrote:
> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
> API.
Definitely not happening. ;)
Jim
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.non
Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
API.
---
New version of the patch, the previous version was broken.
eval.scm |2 -
files.scm| 14 +++
library.scm | 123 +-
posix-comm
Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
API.
---
Feel free to disagree--I thought it's better to start with an actual patch
than with with a purely theoretical discussion of the issue.
eval.scm |2 -
files.scm|3 +-
library.scm |
40 matches
Mail list logo