Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-28 Thread Junio C Hamano
Junio C Hamano writes: > Subject: [PATCH] apply: refuse touching a file beyond symlink > > Because Git tracks symbolic links as symbolic links, a path that has > a symbolic link in its leading part (e.g. path/to/dir being a > symbolic link to somewhere else, be it inside or outside the working >

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-28 Thread Junio C Hamano
Junio C Hamano writes: > Junio C Hamano writes: > >> If the user wants to apply a patch that touches ../etc/shadow, is >> the tool in the place to complain?" > > Let me take this part back. > > I think "git apply" should behave closely to "git apply --index" > (which is used by "git am" unless t

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-27 Thread Junio C Hamano
Junio C Hamano writes: > Linus Torvalds writes: > >> Ugh. I don't see anything we can do about this on the git side, and I >> do kind of understand why 'patch' would be worried about '..' files. >> In a perfect world, patch would parse the filename and see that it >> stays within the directory s

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-27 Thread Andreas Gruenbacher
On Mon, 26 Jan 2015 12:44:33 -0800, Linus Torvalds wrote: > I've considered that for a while already, because "patch" _does_ kind of > understand them these days, although I think it gets the cross-rename > case wrong because it fundamentally works on a file-by-file basis. Patch handles cross-rena

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Junio C Hamano
Linus Torvalds writes: > Ugh. I don't see anything we can do about this on the git side, and I > do kind of understand why 'patch' would be worried about '..' files. > In a perfect world, patch would parse the filename and see that it > stays within the directory structure of the project, but tha

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Josh Boyer
On Mon, Jan 26, 2015 at 4:30 PM, Linus Torvalds wrote: > On Mon, Jan 26, 2015 at 1:07 PM, Josh Boyer wrote: >> >> Or did I miss a way that git-apply can take a git patch and apply it >> to a tree that isn't a git repo? > > Exactly. "git apply" works as a straight "patch" replacement outside > of

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Linus Torvalds
On Mon, Jan 26, 2015 at 1:35 PM, Junio C Hamano wrote: > > What is your take on CVE-2015-1196, which brought this /regression/ to > GNU patch? > If "git apply" get /fixed/ for that same CVE, would that /break/ your fix? I _think_ we allow arbitrary symlinks to be created, but then we should be ca

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Junio C Hamano
On Mon, Jan 26, 2015 at 1:30 PM, Linus Torvalds wrote: > On Mon, Jan 26, 2015 at 1:07 PM, Josh Boyer wrote: >> >> Or did I miss a way that git-apply can take a git patch and apply it >> to a tree that isn't a git repo? > > Exactly. "git apply" works as a straight "patch" replacement outside > of

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Linus Torvalds
On Mon, Jan 26, 2015 at 1:07 PM, Josh Boyer wrote: > > Or did I miss a way that git-apply can take a git patch and apply it > to a tree that isn't a git repo? Exactly. "git apply" works as a straight "patch" replacement outside of a git repository. It doesn't actually need a git tree to work. (O

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Josh Boyer
On Mon, Jan 26, 2015 at 3:44 PM, Linus Torvalds wrote: > On Mon, Jan 26, 2015 at 8:32 AM, Josh Boyer wrote: >> >> I went to do the Fedora 3.19-rc6 build this morning and it failed in >> our buildsystem with: >> >> + '[' '!' -f /builddir/build/SOURCES/patch-3.19-rc6.xz ']' >> + case "$patch" in >>

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread David Kastrup
Linus Torvalds writes: > On Mon, Jan 26, 2015 at 8:32 AM, Josh Boyer wrote: >> >> I went to do the Fedora 3.19-rc6 build this morning and it failed in >> our buildsystem with: >> >> + '[' '!' -f /builddir/build/SOURCES/patch-3.19-rc6.xz ']' >> + case "$patch" in >> + unxz >> + patch -p1 -F1 -s >

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Linus Torvalds
On Mon, Jan 26, 2015 at 8:32 AM, Josh Boyer wrote: > > I went to do the Fedora 3.19-rc6 build this morning and it failed in > our buildsystem with: > > + '[' '!' -f /builddir/build/SOURCES/patch-3.19-rc6.xz ']' > + case "$patch" in > + unxz > + patch -p1 -F1 -s > symbolic link target '../../../../

Re: patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Josh Boyer
[Adding Junio's correct email address. Sigh.] On Mon, Jan 26, 2015 at 11:29 AM, Josh Boyer wrote: > Hi, > > I went to do the Fedora 3.19-rc6 build this morning and it failed in > our buildsystem with: > > + '[' '!' -f /builddir/build/SOURCES/patch-3.19-rc6.xz ']' > + case "$patch" in > + unxz >

patch-2.7.3 no longer applies relative symbolic link patches

2015-01-26 Thread Josh Boyer
Hi, I went to do the Fedora 3.19-rc6 build this morning and it failed in our buildsystem with: + '[' '!' -f /builddir/build/SOURCES/patch-3.19-rc6.xz ']' + case "$patch" in + unxz + patch -p1 -F1 -s symbolic link target '../../../../../include/dt-bindings' is invalid error: Bad exit status from /