Re: [committed] libstdc++: Avoid symlink race in filesystem::remove_all [PR104161]

2022-01-27 Thread Jonathan Wakely via Gcc-patches
On Wed, 26 Jan 2022, 22:12 Jonathan Wakely via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Wed, 26 Jan 2022 at 22:08, Dimitar Dimitrov wrote: > > > > On Tue, Jan 25, 2022 at 09:09:51PM +, Jonathan Wakely via > Gcc-patches wrote: > > > Tested x86_64-linux, pushed to trunk. Backports to fol

Re: [committed] libstdc++: Avoid symlink race in filesystem::remove_all [PR104161]

2022-01-26 Thread Jonathan Wakely via Gcc-patches
On Wed, 26 Jan 2022 at 22:08, Dimitar Dimitrov wrote: > > On Tue, Jan 25, 2022 at 09:09:51PM +, Jonathan Wakely via Gcc-patches > wrote: > > Tested x86_64-linux, pushed to trunk. Backports to follow. > > > > > > This adds a new internal flag to the filesystem::directory_iterator > > construct

Re: [committed] libstdc++: Avoid symlink race in filesystem::remove_all [PR104161]

2022-01-26 Thread Dimitar Dimitrov
On Tue, Jan 25, 2022 at 09:09:51PM +, Jonathan Wakely via Gcc-patches wrote: > Tested x86_64-linux, pushed to trunk. Backports to follow. > > > This adds a new internal flag to the filesystem::directory_iterator > constructor that makes it fail if the path is a symlink that resolves to > a di

[committed] libstdc++: Avoid symlink race in filesystem::remove_all [PR104161]

2022-01-25 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. Backports to follow. This adds a new internal flag to the filesystem::directory_iterator constructor that makes it fail if the path is a symlink that resolves to a directory. This prevents filesystem::remove_all from following a symlink to a directory, rather