You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 54b2a10659871032720df31ae9ca6cba2ff4acf0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 0bfc43bff3a9b53e65c82d987bb072f0ff0a3a2b Mon Sep 17 00:00:00 2001
|
||||
From f96ab0203c4119942b9d8ccc27207cc73389b375 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Tue, 19 Aug 2014 22:10:49 -0600
|
||||
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
|
||||
@@ -14,7 +14,7 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
|
||||
create mode 100644 libs/port/xattr.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d3bd12a6340..5e775c04449 100644
|
||||
index 4829648c3a5..cff2d4b8288 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -88,6 +88,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
|
||||
@@ -44,10 +44,10 @@ index d3bd12a6340..5e775c04449 100644
|
||||
|
||||
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 66ce2eb5fe4..d2e783f3300 100644
|
||||
index bf435f109f1..6ac9b18da57 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1431,6 +1431,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
|
||||
@@ -1448,6 +1448,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ index 66ce2eb5fe4..d2e783f3300 100644
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -1450,7 +1466,8 @@ static inline ULONG get_file_attributes( const struct stat *st )
|
||||
@@ -1491,7 +1507,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
|
||||
static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
{
|
||||
char *parent_path;
|
||||
@@ -80,8 +80,8 @@ index 66ce2eb5fe4..d2e783f3300 100644
|
||||
|
||||
*attr = 0;
|
||||
ret = lstat( path, st );
|
||||
@@ -1476,6 +1493,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
|
||||
@@ -1517,6 +1534,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
free( parent_path );
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
@@ -91,10 +91,10 @@ index 66ce2eb5fe4..d2e783f3300 100644
|
||||
}
|
||||
|
||||
diff --git a/include/wine/port.h b/include/wine/port.h
|
||||
index e8434c73cca..6e81cb71a76 100644
|
||||
index 928730a41d7..4670891ae77 100644
|
||||
--- a/include/wine/port.h
|
||||
+++ b/include/wine/port.h
|
||||
@@ -361,6 +361,15 @@ int usleep (unsigned int useconds);
|
||||
@@ -352,6 +352,15 @@ int usleep (unsigned int useconds);
|
||||
|
||||
extern int mkstemps(char *template, int suffix_len);
|
||||
|
||||
@@ -111,10 +111,10 @@ index e8434c73cca..6e81cb71a76 100644
|
||||
|
||||
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
|
||||
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
|
||||
index 1963afe2423..4b1ecab7516 100644
|
||||
index 7bc67fa3fee..d1de285d527 100644
|
||||
--- a/libs/port/Makefile.in
|
||||
+++ b/libs/port/Makefile.in
|
||||
@@ -22,4 +22,5 @@ C_SRCS = \
|
||||
@@ -21,4 +21,5 @@ C_SRCS = \
|
||||
strnlen.c \
|
||||
symlink.c \
|
||||
usleep.c \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 5f6d3c447ef1e243de6188d8813261d991c4ffc7 Mon Sep 17 00:00:00 2001
|
||||
From 29333aaab5e4d2b62741a8321382b24f1630eb70 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 15:28:00 -0600
|
||||
Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
|
||||
@@ -60,10 +60,10 @@ index 248ed99ab20..e0f4debc624 100644
|
||||
}
|
||||
testfiles[i].nfound++;
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index f1176717819..5d5e4ba2892 100644
|
||||
index 7ab1c130bf2..7c737edd22c 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3595,6 +3595,20 @@ void CDECL set_show_dot_files( BOOL enable )
|
||||
@@ -3549,6 +3549,20 @@ void CDECL set_show_dot_files( BOOL enable )
|
||||
show_dot_files = enable;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ index f1176717819..5d5e4ba2892 100644
|
||||
|
||||
/******************************************************************************
|
||||
* open_unix_file
|
||||
@@ -3682,13 +3696,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3636,13 +3650,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
io->u.Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ index f1176717819..5d5e4ba2892 100644
|
||||
{
|
||||
- io->u.Status = open_unix_file( handle, unix_name, access, attr, attributes,
|
||||
- sharing, disposition, options, ea_buffer, ea_length );
|
||||
- RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
- free( unix_name );
|
||||
+ WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
|
||||
+ return io->u.Status;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ index f1176717819..5d5e4ba2892 100644
|
||||
|
||||
if (io->u.Status == STATUS_SUCCESS)
|
||||
{
|
||||
@@ -3710,6 +3725,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3664,6 +3679,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
io->Information = FILE_OVERWRITTEN;
|
||||
break;
|
||||
}
|
||||
@@ -116,11 +116,11 @@ index f1176717819..5d5e4ba2892 100644
|
||||
}
|
||||
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
|
||||
{
|
||||
@@ -3717,6 +3737,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
@@ -3671,6 +3691,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
|
||||
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
|
||||
}
|
||||
|
||||
+ RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
+ free( unix_name );
|
||||
return io->u.Status;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 78f53ba7362227cf5d725d6d5b70e06267597b5e Mon Sep 17 00:00:00 2001
|
||||
From 3f308239ced2e9fa2ac0b298eeb1ad5dde330840 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
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
|
||||
1 file changed, 9 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 33fa49d0dea..a88daf1f7f3 100644
|
||||
index 7c737edd22c..c6b4928bd53 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1238,15 +1238,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
|
||||
@@ -1213,15 +1213,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
|
||||
*
|
||||
* Check if the specified file should be hidden based on its name and the show dot files option.
|
||||
*/
|
||||
@@ -33,8 +33,8 @@ index 33fa49d0dea..a88daf1f7f3 100644
|
||||
if (p == end || *p != '.') return FALSE;
|
||||
/* make sure it isn't '.' or '..' */
|
||||
if (p + 1 == end) return FALSE;
|
||||
@@ -1571,6 +1571,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
|
||||
@@ -1567,6 +1567,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
free( parent_path );
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
+ /* convert Unix-style hidden files to a DOS hidden file attribute */
|
||||
@@ -44,7 +44,7 @@ index 33fa49d0dea..a88daf1f7f3 100644
|
||||
len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
if (len == -1) return ret;
|
||||
*attr |= get_file_xattr( hexattr, len );
|
||||
@@ -2081,11 +2085,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
|
||||
@@ -2077,11 +2081,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 */
|
||||
@@ -56,15 +56,15 @@ index 33fa49d0dea..a88daf1f7f3 100644
|
||||
fill_file_info( &st, attributes, info, class );
|
||||
}
|
||||
|
||||
@@ -3857,7 +3856,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
@@ -3838,7 +3837,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
info->AllocationSize = std.AllocationSize;
|
||||
info->EndOfFile = std.EndOfFile;
|
||||
info->FileAttributes = basic.FileAttributes;
|
||||
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||
}
|
||||
RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
free( unix_name );
|
||||
}
|
||||
@@ -3884,10 +3882,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
|
||||
@@ -3865,10 +3863,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
|
||||
@@ -72,7 +72,7 @@ index 33fa49d0dea..a88daf1f7f3 100644
|
||||
status = fill_file_info( &st, attributes, info, FileBasicInformation );
|
||||
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||
- }
|
||||
RtlFreeHeap( GetProcessHeap(), 0, unix_name );
|
||||
free( unix_name );
|
||||
}
|
||||
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
|
||||
--
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 29e0ef12afb2651e61492a8a9f021baca4c66519 Mon Sep 17 00:00:00 2001
|
||||
From dd02380fff84cbef2a6df7b6f82b271e0e9d732f 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/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 9636c0efe3e..444332e7baa 100644
|
||||
index c6b4928bd53..3bf82b1d45d 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -1561,12 +1561,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
|
||||
@@ -1567,12 +1567,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
free( parent_path );
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
- /* convert Unix-style hidden files to a DOS hidden file attribute */
|
||||
@@ -32,7 +32,7 @@ index 9636c0efe3e..444332e7baa 100644
|
||||
*attr |= get_file_xattr( hexattr, len );
|
||||
return ret;
|
||||
}
|
||||
@@ -3440,7 +3443,7 @@ NTSTATUS set_file_info( const char *path, ULONG attr )
|
||||
@@ -3556,7 +3559,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 );
|
||||
|
Reference in New Issue
Block a user