Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
On 2017/5/28 11:50, Samuel Leslie wrote: Oh dear. Take two! *crosses fingers* Thanks for the patch, I pushed it to master. -- Best regards, LH_Mouse -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
Oh dear. Take two! *crosses fingers* -SDL -Original Message- From: David Grayson [mailto:davidegray...@gmail.com] Sent: Sunday, 28 May 2017 1:47 PM To: mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users Oops, there's no attachment. Try sending it with a MIME type of text/plain so SourceForge does not eat it; you might have to add a .txt extension to it to make your mail client do that. --David On Sat, May 27, 2017 at 7:51 PM, Samuel Leslie wrote: > Sounds like I've misinterpreted the correct usage of > VALID_SYMBOLIC_LINK_FLAGS. Apologies! I've attached an amended patch in the > event that's helpful. > > > Kind regards, > Samuel Leslie > > -Original Message- > From: Liu Hao [mailto:lh_mo...@126.com] > Sent: Sunday, 28 May 2017 8:35 AM > To: mingw-w64-public@lists.sourceforge.net; JonY > > Subject: Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation > by unprivileged users > > On 2017/5/27 21:35, JonY wrote: >> On 05/27/2017 11:14 AM, Samuel Leslie wrote: >>> The MSDN documentation doesn't appear to have been updated yet: >>> https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v= >>> v >>> s.85).aspx >>> >>> But you can find the details on the official developer blog: >>> https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-1 >>> 0 >>> / >>> >> >> Patch looks good. > I don't think so... > > ``` > C:\Program Files (x86)\Windows Kits>grep -FnrI > VALID_SYMBOLIC_LINK_FLAGS > 10/Include/10.0.14393.0/um/WinBase.h:8636:#define > VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other > flags we think of! > 8.1/Include/um/WinBase.h:8515:#define VALID_SYMBOLIC_LINK_FLAGS > SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! > ``` > > It is the definition of `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE` > that looks good. The definition of `VALID_SYMBOLIC_LINK_FLAGS` should be left > intact. > > > -- > Best regards, > LH_Mouse > > > -- > Check out the vibrant tech community on one of the world's > most engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- > Check out the vibrant tech community on one of the world's > most engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public From e430cccef2326c9bedb87b7ea66c6e0a1e641ee9 Mon Sep 17 00:00:00 2001 From: "Samuel D. Leslie" Date: Sat, 27 May 2017 21:00:02 +1000 Subject: [PATCH] Add flag for symlink creation by unprivileged users The MSDN documentation doesn't appear to have been updated yet: https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx But you can find the details on the official developer blog: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ Signed-off-by: Samuel D. Leslie --- mingw-w64-headers/include/winbase.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h index 7e12bcbd..74bc512c 100644 --- a/mingw-w64-headers/include/winbase.h +++ b/mingw-w64-headers/include/winbase.h @@ -2872,6 +2872,7 @@ extern "C" { #if _WIN32_WINNT >= 0x0600 #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) +#define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2) #define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY -- 2.13.0.windows.1.14.g1169e00e0a.dirty -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
Oops, there's no attachment. Try sending it with a MIME type of text/plain so SourceForge does not eat it; you might have to add a .txt extension to it to make your mail client do that. --David On Sat, May 27, 2017 at 7:51 PM, Samuel Leslie wrote: > Sounds like I've misinterpreted the correct usage of > VALID_SYMBOLIC_LINK_FLAGS. Apologies! I've attached an amended patch in the > event that's helpful. > > > Kind regards, > Samuel Leslie > > -Original Message- > From: Liu Hao [mailto:lh_mo...@126.com] > Sent: Sunday, 28 May 2017 8:35 AM > To: mingw-w64-public@lists.sourceforge.net; JonY > Subject: Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by > unprivileged users > > On 2017/5/27 21:35, JonY wrote: >> On 05/27/2017 11:14 AM, Samuel Leslie wrote: >>> The MSDN documentation doesn't appear to have been updated yet: >>> https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=v >>> s.85).aspx >>> >>> But you can find the details on the official developer blog: >>> https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10 >>> / >>> >> >> Patch looks good. > I don't think so... > > ``` > C:\Program Files (x86)\Windows Kits>grep -FnrI VALID_SYMBOLIC_LINK_FLAGS > 10/Include/10.0.14393.0/um/WinBase.h:8636:#define > VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other > flags we think of! > 8.1/Include/um/WinBase.h:8515:#define VALID_SYMBOLIC_LINK_FLAGS > SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! > ``` > > It is the definition of `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE` > that looks good. The definition of `VALID_SYMBOLIC_LINK_FLAGS` should be left > intact. > > > -- > Best regards, > LH_Mouse > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
Sounds like I've misinterpreted the correct usage of VALID_SYMBOLIC_LINK_FLAGS. Apologies! I've attached an amended patch in the event that's helpful. Kind regards, Samuel Leslie -Original Message- From: Liu Hao [mailto:lh_mo...@126.com] Sent: Sunday, 28 May 2017 8:35 AM To: mingw-w64-public@lists.sourceforge.net; JonY Subject: Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users On 2017/5/27 21:35, JonY wrote: > On 05/27/2017 11:14 AM, Samuel Leslie wrote: >> The MSDN documentation doesn't appear to have been updated yet: >> https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=v >> s.85).aspx >> >> But you can find the details on the official developer blog: >> https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10 >> / >> > > Patch looks good. I don't think so... ``` C:\Program Files (x86)\Windows Kits>grep -FnrI VALID_SYMBOLIC_LINK_FLAGS 10/Include/10.0.14393.0/um/WinBase.h:8636:#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! 8.1/Include/um/WinBase.h:8515:#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! ``` It is the definition of `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE` that looks good. The definition of `VALID_SYMBOLIC_LINK_FLAGS` should be left intact. -- Best regards, LH_Mouse -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
On 2017/5/27 21:35, JonY wrote: On 05/27/2017 11:14 AM, Samuel Leslie wrote: The MSDN documentation doesn't appear to have been updated yet: https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx But you can find the details on the official developer blog: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ Patch looks good. I don't think so... ``` C:\Program Files (x86)\Windows Kits>grep -FnrI VALID_SYMBOLIC_LINK_FLAGS 10/Include/10.0.14393.0/um/WinBase.h:8636:#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! 8.1/Include/um/WinBase.h:8515:#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY // & whatever other flags we think of! ``` It is the definition of `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE` that looks good. The definition of `VALID_SYMBOLIC_LINK_FLAGS` should be left intact. -- Best regards, LH_Mouse -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc
On 5/27/2017 12:08 PM, niXman wrote: Edward Diener 2017-05-27 18:40: On 5/26/2017 11:03 PM, Vincent Torri wrote: ./configure --host=i686-w64-mingw32 or ./configure --host=i686-w64-mingw32 for respectively 32bits and 64bits support Your configure commands are the same. ./configure --host=i686-w64-mingw32 or ./configure --host=x86_64-w64-mingw32 OK. Do I use msys2 in order to build libbacktrace ? When building do I need to use the version of mingw-64/gcc for which I will be using libbacktrace when I eventually use mingw-64/gcc as my compiler ? If I need to do that do I just add the mingw-64/gcc compiler to the beginning of my msys2 path ? I have used various versions of mingw-64/gcc binaries in order to test Boost libraries but I have never built another library for use by any particular version of mingw-64/gcc, which is why I am asking these questions. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc
On Sat, May 27, 2017 at 6:08 PM, niXman wrote: > Edward Diener 2017-05-27 18:40: > >> On 5/26/2017 11:03 PM, Vincent Torri wrote: >> >>> ./configure --host=i686-w64-mingw32 >>> or >>> ./configure --host=i686-w64-mingw32 >>> >>> for respectively 32bits and 64bits support >>> >> >> Your configure commands are the same. >> > > > > ./configure --host=i686-w64-mingw32 > or > ./configure --host=x86_64-w64-mingw32 > oups, copy paste :) Vincent > > > -- > Regards, niXman > ___ > Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows: > https://sf.net/p/mingw-w64/ > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
Are you sure 0x3 value (0x1 | 0x2) is valid for VALID_SYMBOLIC_LINK_FLAGS on every OS from 7 to 10? Dnia 2017-05-27, sob o godzinie 11:14 +, Samuel Leslie pisze: > The MSDN documentation doesn't appear to have been updated yet: > https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=v > s.85).aspx > > But you can find the details on the official developer blog: > https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10 > / > > Signed-off-by: Samuel D. Leslie > --- > mingw-w64-headers/include/winbase.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64- > headers/include/winbase.h > index 7e12bcbd..dd3a1b46 100644 > --- a/mingw-w64-headers/include/winbase.h > +++ b/mingw-w64-headers/include/winbase.h > @@ -2872,8 +2872,9 @@ extern "C" { > #if _WIN32_WINNT >= 0x0600 > > #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) > +#define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2) > > -#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY > +#define VALID_SYMBOLIC_LINK_FLAGS (SYMBOLIC_LINK_FLAG_DIRECTORY | > SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE) > > WINBASEAPI BOOLEAN APIENTRY CreateSymbolicLinkA (LPCSTR > lpSymlinkFileName, LPCSTR lpTargetFileName, DWORD dwFlags); > WINBASEAPI BOOLEAN APIENTRY CreateSymbolicLinkW (LPCWSTR > lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags); > -- > --- > --- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public signature.asc Description: This is a digitally signed message part -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc
Edward Diener 2017-05-27 18:40: On 5/26/2017 11:03 PM, Vincent Torri wrote: ./configure --host=i686-w64-mingw32 or ./configure --host=i686-w64-mingw32 for respectively 32bits and 64bits support Your configure commands are the same. ./configure --host=i686-w64-mingw32 or ./configure --host=x86_64-w64-mingw32 -- Regards, niXman ___ Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows: https://sf.net/p/mingw-w64/ -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc
On 5/26/2017 11:03 PM, Vincent Torri wrote: On Sat, May 27, 2017 at 12:14 AM, Edward Diener wrote: On 5/26/2017 4:13 PM, Vincent Torri wrote: Hello On Fri, May 26, 2017 at 9:50 PM, Edward Diener wrote: I would like to use a libbacktrace library for mingw-64/gcc. This is used by a new Boost library called stacktrace to provide stack traces anywhere in code in c++ when using GCC/MinGW/Clang on POSIX or Windows. Does such a library exist for mingw-64/gcc on Windows ? If not can such a library be built for a given version of mingw-64/gcc on Windows, presumably in MSYS2 ? I have written a small library and app around memory checking and PE files. It is called examine and can report backtraces (using libbfd for stack trace). It is here : https://vtorri.github.io/examine/ https://github.com/vtorri/examine I use MSYS2 + mingw-w64 for compilation, or Visual Studio. Thank you, but what does this have to do with libbacktrace for mingw-64/gcc ? you wanted a library which provide stack traces. for libbacktrace, I can see in https://github.com/gcc-mirror/gcc/tree/master/libbacktrace so PE/COFF commits and file. So I guess it is possible try autoreconf -vif and ./configure --host=i686-w64-mingw32 or ./configure --host=i686-w64-mingw32 for respectively 32bits and 64bits support Your configure commands are the same. regards Vincent regards Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
On 05/27/2017 11:14 AM, Samuel Leslie wrote: > The MSDN documentation doesn't appear to have been updated yet: > https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx > > But you can find the details on the official developer blog: > https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ > Patch looks good. signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] Add flag for symlink creation by unprivileged users
The MSDN documentation doesn't appear to have been updated yet: https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx But you can find the details on the official developer blog: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ Signed-off-by: Samuel D. Leslie --- mingw-w64-headers/include/winbase.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winbase.h index 7e12bcbd..dd3a1b46 100644 --- a/mingw-w64-headers/include/winbase.h +++ b/mingw-w64-headers/include/winbase.h @@ -2872,8 +2872,9 @@ extern "C" { #if _WIN32_WINNT >= 0x0600 #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1) +#define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2) -#define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY +#define VALID_SYMBOLIC_LINK_FLAGS (SYMBOLIC_LINK_FLAG_DIRECTORY | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE) WINBASEAPI BOOLEAN APIENTRY CreateSymbolicLinkA (LPCSTR lpSymlinkFileName, LPCSTR lpTargetFileName, DWORD dwFlags); WINBASEAPI BOOLEAN APIENTRY CreateSymbolicLinkW (LPCWSTR lpSymlinkFileName, LPCWSTR lpTargetFileName, DWORD dwFlags); -- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public