Rebase against 00e55c8fc0c08e14c39880e62526f8503468b641

This commit is contained in:
Alistair Leslie-Hughes 2020-03-24 08:55:13 +11:00
parent 7c7868f4bb
commit 75c7644c3d
10 changed files with 85 additions and 159 deletions

View File

@ -1,4 +1,4 @@
From c07a490a6950f4efe563e38ca78b1aa459dfad86 Mon Sep 17 00:00:00 2001
From df12fdb8d4cdf11d9f72a068923a5b0097e36bdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 28 May 2014 19:50:51 +0200
Subject: [PATCH] loader: Add commandline option --check-libs.
@ -12,7 +12,7 @@ Subject: [PATCH] loader: Add commandline option --check-libs.
5 files changed, 213 insertions(+), 1 deletion(-)
diff --git a/include/wine/library.h b/include/wine/library.h
index 511bf4722..557cec20c 100644
index 511bf4722a0..557cec20cf8 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -44,6 +44,7 @@ extern "C" {
@ -32,7 +32,7 @@ index 511bf4722..557cec20c 100644
extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize );
extern int wine_dlclose( void *handle, char *error, size_t errorsize );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 5b66c063d..e0988513e 100644
index 5b66c063db6..e0988513e14 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -470,6 +470,130 @@ const char *wine_get_build_dir(void)
@ -167,7 +167,7 @@ index 5b66c063d..e0988513e 100644
const char *wine_get_server_dir(void)
{
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index 2a569f5b7..5f10c3f9d 100644
index 2a569f5b739..5f10c3f9d3e 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -1072,6 +1072,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
@ -214,7 +214,7 @@ index 2a569f5b7..5f10c3f9d 100644
* wine_dlsym
*/
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index ca46979f5..22a4e73b0 100644
index ca46979f5b9..22a4e73b05b 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -9,6 +9,7 @@ WINE_1.0
@ -234,7 +234,7 @@ index ca46979f5..22a4e73b0 100644
wine_get_ss;
wine_get_user_name;
diff --git a/loader/main.c b/loader/main.c
index f6629128d..a2dc40c51 100644
index d97d6b28bf8..49dc996e354 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -36,6 +36,12 @@
@ -247,10 +247,10 @@ index f6629128d..a2dc40c51 100644
+#ifdef HAVE_LINK_H
+# include <link.h>
+#endif
#include <pthread.h>
#include "wine/library.h"
@@ -55,7 +61,8 @@ static void check_command_line( int argc, char *argv[] )
#include "main.h"
@@ -54,7 +60,8 @@ static void check_command_line( int argc, char *argv[] )
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
" wine --help Display this help and exit\n"
" wine --version Output version information and exit\n"
@ -260,7 +260,7 @@ index f6629128d..a2dc40c51 100644
if (argc <= 1)
{
@@ -111,6 +118,47 @@ static void check_command_line( int argc, char *argv[] )
@@ -110,6 +117,47 @@ static void check_command_line( int argc, char *argv[] )
exit(0);
}
@ -309,5 +309,5 @@ index f6629128d..a2dc40c51 100644
--
2.25.0
2.25.1

View File

@ -1,15 +1,15 @@
From e920f461eaf4c5d19c0cfc8e9c9a40671269dd93 Mon Sep 17 00:00:00 2001
From 1c52fd394b75313b41023d53c011ab861dc79b66 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
---
dlls/dbghelp/Makefile.in | 2 +-
dlls/dbghelp/elf_module.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
dlls/dbghelp/elf_module.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index f08464cd422..aa7a767110b 100644
index 39d3bfc8641..ab66ff5b6c5 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -1,6 +1,6 @@
@ -21,24 +21,17 @@ index f08464cd422..aa7a767110b 100644
EXTRAINCL = $(Z_CFLAGS)
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 96b16fd5c0c..611533ee098 100644
index 0b60524fc44..f2d6e84e3ea 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1644,9 +1644,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
if (!ret && !strchrW(filename, '/'))
{
ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
- getenv("PATH"), elf_info) ||
- elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
- getenv("LD_LIBRARY_PATH"), elf_info);
+ getenv("PATH"), elf_info);
+ if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
+ getenv("LD_LIBRARY_PATH"), elf_info);
+ if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr,
+ BINDIR, elf_info);
if (!ret) ret = elf_load_file_from_dll_path(pcs, filename,
load_offset, dyn_addr, elf_info);
@@ -1379,6 +1379,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
ret = search_unix_path(filename, getenv("PATH"), elf_load_file_cb, &load_elf)
|| search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
+ || search_unix_path(filename, BINDIR, elf_load_file_cb, &load_elf)
|| search_dll_path(filename, elf_load_file_cb, &load_elf);
}
--
2.20.1
2.25.1

View File

@ -1,4 +1,4 @@
From 938f92470a25e590523f78912301177580c61955 Mon Sep 17 00:00:00 2001
From 4f3272686f4ae084510f96baa5ad52bbf74d3d8d Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 16:04:34 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@ -11,21 +11,21 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 1ffa675..78ab0ec 100644
index 43a13cd8fdf..74b346b51e8 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -176,7 +176,8 @@ int fd_get_file_info( int fd, struct stat *st, ULONG *attr )
/* get the stat info and file attributes for a file (by name) */
@@ -183,7 +183,8 @@ int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULONG *attr
int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
char *parent_path;
- int ret;
+ char hexattr[11];
+ int len, ret;
*attr = 0;
ret = lstat( path, st );
@@ -193,6 +194,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
@@ -216,6 +217,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
@ -35,10 +35,10 @@ index 1ffa675..78ab0ec 100644
}
diff --git a/include/wine/port.h b/include/wine/port.h
index eaa23bc..de6b995 100644
index 8fec3a34591..570988a9422 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -351,6 +351,7 @@ extern int mkstemps(char *template, int suffix_len);
@@ -363,6 +363,7 @@ extern int mkstemps(char *template, int suffix_len);
#endif
extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
@ -47,7 +47,7 @@ index eaa23bc..de6b995 100644
/* Interlocked functions */
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
index 94b7713..88e900d 100644
index 94b77132bbf..88e900dac6d 100644
--- a/libs/port/xattr.c
+++ b/libs/port/xattr.c
@@ -37,3 +37,13 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size )
@ -65,5 +65,5 @@ index 94b7713..88e900d 100644
+#endif
+}
--
1.9.1
2.25.1

View File

@ -1,4 +1,4 @@
From a0b58c6366226c2079da60a4b5d757da4bd728b6 Mon Sep 17 00:00:00 2001
From e1e41f084c6cdeba3cb44aaa6753b13bc1411df8 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 11:26:48 -0600
Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
3 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index c853470..56737b8 100644
index ba50aa1b807..d6bf1354a5b 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1267,17 +1267,17 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex
@@ -1274,17 +1274,17 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex
*
* Check if the specified file should be hidden based on its name and the show dot files option.
*/
@ -37,7 +37,7 @@ index c853470..56737b8 100644
if (p == end || *p != '.') return FALSE;
/* make sure it isn't '.' or '..' */
if (p + 1 == end) return FALSE;
@@ -1526,11 +1526,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
@@ -1532,11 +1532,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
if (class != FileNamesInformation)
{
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
@ -50,11 +50,11 @@ index c853470..56737b8 100644
}
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 0dbf612..5926c99 100644
index 6a935044f46..a0e54c27198 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -227,6 +227,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
@@ -250,6 +250,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
+ /* convert Unix-style hidden files to a DOS hidden file attribute */
@ -64,7 +64,7 @@ index 0dbf612..5926c99 100644
len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
if (len == -1) return ret;
*attr |= get_file_xattr( hexattr, len );
@@ -3447,8 +3451,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
@@ -3489,8 +3493,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
info->AllocationSize = std.AllocationSize;
info->EndOfFile = std.EndOfFile;
info->FileAttributes = basic.FileAttributes;
@ -73,7 +73,7 @@ index 0dbf612..5926c99 100644
}
RtlFreeAnsiString( &unix_name );
}
@@ -3476,11 +3478,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
@@ -3518,11 +3520,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
status = STATUS_INVALID_INFO_CLASS;
else
@ -86,10 +86,10 @@ index 0dbf612..5926c99 100644
}
else WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index b762ceb..32db62e 100644
index aeed9b857c2..b1cb9aa6843 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -164,7 +164,7 @@ extern NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
@@ -168,7 +168,7 @@ extern NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
FILE_INFORMATION_CLASS class ) DECLSPEC_HIDDEN;
extern NTSTATUS server_get_unix_name( HANDLE handle, ANSI_STRING *unix_name ) DECLSPEC_HIDDEN;
extern void init_directories(void) DECLSPEC_HIDDEN;
@ -99,5 +99,5 @@ index b762ceb..32db62e 100644
extern NTSTATUS DIR_get_unix_cwd( char **cwd ) DECLSPEC_HIDDEN;
extern unsigned int DIR_get_drives_info( struct drive_info info[MAX_DOS_DRIVES] ) DECLSPEC_HIDDEN;
--
1.9.1
2.25.1

View File

@ -1,4 +1,4 @@
From 1fe0fcb904363d5ac59b8d30a918f62f622b78b7 Mon Sep 17 00:00:00 2001
From 08ece1e8da040d80c13348c2ffeb56052779dc53 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 14 Jan 2016 23:09:19 +0100
Subject: [PATCH] ntdll: Always store SAMBA_XATTR_DOS_ATTRIB when path could be
@ -9,11 +9,11 @@ Subject: [PATCH] ntdll: Always store SAMBA_XATTR_DOS_ATTRIB when path could be
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 5926c99..cbd2531 100644
index a0e54c27198..61b417ef678 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -227,12 +227,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
@@ -250,12 +250,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
- /* convert Unix-style hidden files to a DOS hidden file attribute */
@ -32,7 +32,7 @@ index 5926c99..cbd2531 100644
*attr |= get_file_xattr( hexattr, len );
return ret;
}
@@ -245,7 +248,7 @@ NTSTATUS set_file_info( const char *path, ULONG attr )
@@ -268,7 +271,7 @@ NTSTATUS set_file_info( const char *path, ULONG attr )
/* Note: unix mode already set when called this way */
attr &= ~FILE_ATTRIBUTE_NORMAL; /* do not store everything, but keep everything Samba can use */
len = sprintf( hexattr, "0x%x", attr );
@ -42,5 +42,5 @@ index 5926c99..cbd2531 100644
else
xattr_remove( path, SAMBA_XATTR_DOS_ATTRIB );
--
1.9.1
2.25.1

View File

@ -1,66 +0,0 @@
From d3eff4b920f4bc700046779cc44cea186b4cf28a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 3 Jun 2015 01:37:34 +0200
Subject: server: When combining root and name, make sure there is only one
slash. (v2)
Changes in v2:
* Resolve inter-patch conflict.
---
dlls/ntdll/tests/file.c | 4 ++--
server/fd.c | 16 ++++++++++++----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index a24ce35..8b20966 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -2147,8 +2147,8 @@ static void test_file_rename_information(void)
res = pNtQueryInformationFile( handle, &io, fni, sizeof(FILE_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR), FileNameInformation );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %x\n", res );
fni->FileName[ fni->FileNameLength / sizeof(WCHAR) ] = 0;
- todo_wine ok( !lstrcmpiW(fni->FileName, newpath + 2), "FileName expected %s, got %s\n",
- wine_dbgstr_w(newpath + 2), wine_dbgstr_w(fni->FileName) );
+ ok( !lstrcmpiW(fni->FileName, newpath + 2), "FileName expected %s, got %s\n",
+ wine_dbgstr_w(newpath + 2), wine_dbgstr_w(fni->FileName) );
HeapFree( GetProcessHeap(), 0, fni );
CloseHandle( handle );
diff --git a/server/fd.c b/server/fd.c
index ea328d2..e6bd5e0 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1730,6 +1730,7 @@ void set_fd_user( struct fd *fd, const struct fd_ops *user_ops, struct object *u
char *dup_fd_name( struct fd *root, const char *name )
{
char *ret;
+ int len;
if (!root) return strdup( name );
if (!root->unix_name) return NULL;
@@ -1737,11 +1738,18 @@ char *dup_fd_name( struct fd *root, const char *name )
/* skip . prefix */
if (name[0] == '.' && (!name[1] || name[1] == '/')) name++;
- if ((ret = malloc( strlen(root->unix_name) + strlen(name) + 2 )))
+ len = strlen( root->unix_name );
+ if ((ret = malloc( len + strlen(name) + 2 )))
{
- strcpy( ret, root->unix_name );
- if (name[0] && name[0] != '/') strcat( ret, "/" );
- strcat( ret, name );
+ memcpy( ret, root->unix_name, len );
+ while (len && ret[len - 1] == '/') len--;
+ while (name[0] == '/') name++;
+ if (name[0])
+ {
+ ret[ len ] = '/';
+ strcpy( ret + len + 1, name );
+ }
+ else ret[ len ] = 0;
}
return ret;
}
--
2.9.0

View File

@ -1,7 +1,7 @@
From 916221d26598c06a07e84d980ae4c16e92b38ebd Mon Sep 17 00:00:00 2001
From f1cc7357530e993ca472d496bdcf8f38d931ccb6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sat, 30 Mar 2019 12:00:51 -0600
Subject: ntdll: Correctly report file symbolic links as files.
Subject: [PATCH] ntdll: Correctly report file symbolic links as files.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
@ -10,7 +10,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
2 files changed, 84 insertions(+), 44 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 3e1121e521..be594ea517 100644
index e1f9ef1199c..fd3a48dffec 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -124,6 +124,9 @@ mode_t FILE_umask = 0;
@ -23,7 +23,7 @@ index 3e1121e521..be594ea517 100644
/* fetch the attributes of a file */
static inline ULONG get_file_attributes( const struct stat *st )
{
@@ -160,10 +163,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@@ -171,10 +174,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
if (ret == -1) return ret;
if (S_ISLNK( st->st_mode ))
{
@ -41,9 +41,9 @@ index 3e1121e521..be594ea517 100644
+ if (FILE_DecodeSymlink( path, NULL, NULL, NULL, NULL, &is_dir ) == STATUS_SUCCESS)
+ st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
}
*attr |= get_file_attributes( st );
return ret;
@@ -1817,48 +1825,33 @@ cleanup:
else if (S_ISDIR( st->st_mode ) && (parent_path = RtlAllocateHeap( GetProcessHeap(), 0, strlen(path) + 4 )))
{
@@ -1842,48 +1850,33 @@ cleanup:
}
@ -107,7 +107,7 @@ index 3e1121e521..be594ea517 100644
p++;
}
if (*p++ != '/')
@@ -1866,7 +1859,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
@@ -1891,7 +1884,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
status = STATUS_NOT_IMPLEMENTED;
goto cleanup;
}
@ -116,7 +116,7 @@ index 3e1121e521..be594ea517 100644
for (i = 0; i < sizeof(ULONG)*8; i++)
{
char c = *p++;
@@ -1881,21 +1874,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
@@ -1906,21 +1899,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
status = STATUS_NOT_IMPLEMENTED;
goto cleanup;
}
@ -191,10 +191,10 @@ index 3e1121e521..be594ea517 100644
/* convert the relative path into an absolute path */
if (flags == SYMLINK_FLAG_RELATIVE)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index b904bc1f2d..fbd824fd10 100644
index 1f278f63963..dfc3617ec01 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5065,13 +5065,13 @@ static void test_reparse_points(void)
@@ -5188,13 +5188,13 @@ static void test_reparse_points(void)
/* Check deleting a file symlink as if it were a directory */
bret = RemoveDirectoryW(reparse_path);
@ -210,7 +210,7 @@ index b904bc1f2d..fbd824fd10 100644
ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a symlink! (attributes: 0x%x)\n", dwret);
/* Delete the symlink as a file */
@@ -5080,10 +5080,10 @@ static void test_reparse_points(void)
@@ -5203,10 +5203,10 @@ static void test_reparse_points(void)
/* Create a blank slate for directory symlink tests */
bret = CreateDirectoryW(reparse_path, NULL);
@ -224,5 +224,5 @@ index b904bc1f2d..fbd824fd10 100644
/* Create the directory symlink */
HeapFree(GetProcessHeap(), 0, buffer);
--
2.17.1
2.25.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "3ddf3a720f2a342141550c973f10854b573d80ed"
echo "00e55c8fc0c08e14c39880e62526f8503468b641"
}
# Show version information
@ -4005,11 +4005,9 @@ fi
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
patch_apply ntdll-FileDispositionInformation/0001-ntdll-tests-Added-tests-to-set-disposition-on-file-w.patch
patch_apply ntdll-FileDispositionInformation/0002-server-Do-not-allow-to-set-disposition-on-file-which.patch
patch_apply ntdll-FileDispositionInformation/0003-server-When-combining-root-and-name-make-sure-there-.patch
(
printf '%s\n' '+ { "Qian Hong", "ntdll/tests: Added tests to set disposition on file which is mapped to memory.", 1 },';
printf '%s\n' '+ { "Qian Hong", "server: Do not allow to set disposition on file which has a file mapping.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "server: When combining root and name, make sure there is only one slash.", 2 },';
) >> "$patchlist"
fi
@ -6346,7 +6344,7 @@ fi
# |
# | Modified files:
# | * dlls/gdiplus/image.c, dlls/gdiplus/tests/image.c, dlls/windowscodecs/metadatahandler.c, dlls/windowscodecs/regsvr.c,
# | dlls/windowscodecs/tests/tiffformat.c, dlls/windowscodecs/tiffformat.c, include/wincodec.idl
# | dlls/windowscodecs/tests/tiffformat.c, dlls/windowscodecs/tiffformat.c
# |
if test "$enable_windowscodecs_TIFF_Support" -eq 1; then
patch_apply windowscodecs-TIFF_Support/0006-windowscodecs-Add-support-for-16bppGray-and-32bppGra.patch

View File

@ -1,25 +1,26 @@
From fb234cc16f1101ed2189ceb578b7d5f1f79ebe72 Mon Sep 17 00:00:00 2001
From 6b5ac1e9eaf73aa0d6dddf8e7f53bd9802a25f5b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 16 Oct 2016 03:21:42 +0200
Subject: server: Improve STATUS_CANNOT_DELETE checks for directory case.
Subject: [PATCH] server: Improve STATUS_CANNOT_DELETE checks for directory
case.
---
server/fd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/server/fd.c b/server/fd.c
index 17b1b66..77c7026 100644
index 784a8c08867..d238c43cf1f 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1755,6 +1755,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
struct fd *fd;
@@ -1825,6 +1825,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
int root_fd = -1;
int rw_mode;
char *path;
+ int created = (flags & O_CREAT);
if (((options & FILE_DELETE_ON_CLOSE) && !(access & DELETE)) ||
((options & FILE_DIRECTORY_FILE) && (flags & O_TRUNC)))
@@ -1793,6 +1794,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -1863,6 +1864,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
file_set_error();
goto error;
}
@ -27,7 +28,7 @@ index 17b1b66..77c7026 100644
}
flags &= ~(O_CREAT | O_EXCL | O_TRUNC);
}
@@ -1865,7 +1867,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -1955,7 +1957,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
}
/* can't unlink files if we don't have permission to access */
@ -37,5 +38,5 @@ index 17b1b66..77c7026 100644
{
set_error( STATUS_CANNOT_DELETE );
--
2.9.0
2.25.1

View File

@ -1,4 +1,4 @@
From 848a3f3238116a1cb172cd4ed6d9a54a31f945a7 Mon Sep 17 00:00:00 2001
From 9ecf9653d3f4d564f000d4e0f7f96ae0cd3610b2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 3 Apr 2015 03:58:47 +0200
Subject: [PATCH] server: Allow to open files without any permission bits. (try
@ -13,10 +13,10 @@ Changes in v2:
2 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 0cc7bc9a594..5f152d0f42b 100644
index 1ec2e6bbb48..cc59210e609 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3719,17 +3719,13 @@ static void test_CreateDirectoryA(void)
@@ -3702,17 +3702,13 @@ static void test_CreateDirectoryA(void)
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
@ -40,7 +40,7 @@ index 0cc7bc9a594..5f152d0f42b 100644
CloseHandle(hTemp);
/* Test inheritance of ACLs in NtCreateFile without security descriptor */
@@ -3798,17 +3794,13 @@ static void test_CreateDirectoryA(void)
@@ -3781,17 +3777,13 @@ static void test_CreateDirectoryA(void)
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
@ -65,18 +65,18 @@ index 0cc7bc9a594..5f152d0f42b 100644
done:
diff --git a/server/fd.c b/server/fd.c
index 33720176aa3..9fc8f28ec84 100644
index d238c43cf1f..8292a0b82f2 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1824,6 +1824,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
struct fd *fd;
@@ -1825,6 +1825,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
int root_fd = -1;
int rw_mode;
char *path;
+ int do_chmod = 0;
int created = (flags & O_CREAT);
if (((options & FILE_DELETE_ON_CLOSE) && !(access & DELETE)) ||
@@ -1892,10 +1893,28 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -1891,10 +1892,28 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
fd->unix_fd = open( name, rw_mode | O_SYMLINK | (flags & ~O_TRUNC), *mode );
}
#endif
@ -105,7 +105,7 @@ index 33720176aa3..9fc8f28ec84 100644
goto error;
}
}
@@ -1903,6 +1922,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -1909,6 +1928,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
closed_fd->unix_fd = fd->unix_fd;
closed_fd->unlink = 0;
closed_fd->unix_name = fd->unix_name;
@ -114,5 +114,5 @@ index 33720176aa3..9fc8f28ec84 100644
*mode = st.st_mode;
--
2.17.1
2.25.1