mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Partially removed patches for ntdll DOS attributes (accepted upstream).
This commit is contained in:
parent
90261acce1
commit
7dac73a69b
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -10,6 +10,7 @@ wine-staging (1.7.34) UNRELEASED; urgency=low
|
||||
* Removed patch to implement shlwapi.StrCatChainW (accepted upstream).
|
||||
* Removed patch to implement semi-stub for psapi/kernel32 K32EnumProcessModulesEx (accepted upstream).
|
||||
* Removed patch to return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK (accepted upstream).
|
||||
* Partially removed patches for ntdll DOS attributes (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 15 Dec 2014 22:42:09 +0100
|
||||
|
||||
wine-compholio (1.7.33) unstable; urgency=low
|
||||
|
@ -840,16 +840,14 @@ msvcrt-atof_strtod.ok:
|
||||
# |
|
||||
.INTERMEDIATE: ntdll-DOS_Attributes.ok
|
||||
ntdll-DOS_Attributes.ok:
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0001-ntdll-Unify-retrieving-the-attributes-of-a-file.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0001-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0002-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0003-ntdll-Implement-retrieving-DOS-attributes-in-NtQuery.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0005-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0006-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0007-libport-Add-support-for-FreeBSD-style-extended-attri.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0008-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0003-ntdll-Implement-storing-DOS-attributes-in-NtSetInfor.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0005-libport-Add-support-for-Mac-OS-X-style-extended-attr.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0006-libport-Add-support-for-FreeBSD-style-extended-attri.patch)
|
||||
$(call APPLY_FILE,ntdll-DOS_Attributes/0007-ntdll-Perform-the-Unix-style-hidden-file-check-withi.patch)
|
||||
@( \
|
||||
echo '+ { "Erich E. Hoover", "ntdll: Unify retrieving the attributes of a file.", 1 },'; \
|
||||
echo '+ { "Erich E. Hoover", "ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.", 1 },'; \
|
||||
echo '+ { "Erich E. Hoover", "ntdll: Implement retrieving DOS attributes in NtQuery[Full]AttributesFile and NtQueryDirectoryFile.", 1 },'; \
|
||||
echo '+ { "Erich E. Hoover", "ntdll: Implement storing DOS attributes in NtSetInformationFile.", 1 },'; \
|
||||
|
@ -0,0 +1,164 @@
|
||||
From 22ab27f48e94682fcca15fb7a3b79ff6764830d6 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: ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.
|
||||
|
||||
---
|
||||
configure.ac | 12 ++++++++++++
|
||||
dlls/ntdll/file.c | 23 ++++++++++++++++++++++-
|
||||
include/wine/port.h | 8 ++++++++
|
||||
libs/port/Makefile.in | 3 ++-
|
||||
libs/port/xattr.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 83 insertions(+), 2 deletions(-)
|
||||
create mode 100644 libs/port/xattr.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2fa4dcc..3c91af3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -77,2 +77,3 @@ AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
|
||||
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
|
||||
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
|
||||
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
|
||||
@@ -667,6 +668,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
#include <sys/socket.h>
|
||||
#endif])
|
||||
|
||||
+if test "x$with_xattr" != "xno"
|
||||
+then
|
||||
+ AC_CHECK_HEADERS(attr/xattr.h, [HAVE_XATTR=1])
|
||||
+fi
|
||||
+if test "x$with_xattr" = "xyes"
|
||||
+then
|
||||
+ WINE_ERROR_WITH(xattr,[test "x$HAVE_XATTR" = "x"],[xattr ${notice_platform}development files \
|
||||
+not found. Wine will be built without extended attribute support, which probably isn't what you \
|
||||
+want. You will need to install ${notice_platform}development packages of libattr at the very least.])
|
||||
+fi
|
||||
+
|
||||
dnl **** Check for working dll ****
|
||||
|
||||
AC_SUBST(dlldir,"\${libdir}/wine")
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index b856b3d..c775664 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -103,6 +103,22 @@ mode_t FILE_umask = 0;
|
||||
|
||||
static const WCHAR ntfsW[] = {'N','T','F','S'};
|
||||
|
||||
+/* Match the Samba conventions for storing DOS file attributes */
|
||||
+#define SAMBA_XATTR_DOS_ATTRIB XATTR_USER_PREFIX "DOSATTRIB"
|
||||
+/* We are only interested in some attributes, the others have corresponding Unix attributes */
|
||||
+#define XATTR_ATTRIBS_MASK (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)
|
||||
+
|
||||
+/* decode the xattr-stored DOS attributes */
|
||||
+static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
+{
|
||||
+ if (attrlen > 2 && hexattr[0] == '0' && hexattr[1] == 'x')
|
||||
+ {
|
||||
+ hexattr[attrlen] = 0;
|
||||
+ return strtol( hexattr+2, NULL, 16 ) & XATTR_ATTRIBS_MASK;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -120,12 +136,17 @@ static inline ULONG get_file_attributes( const struct stat *st )
|
||||
/* get the stat info and file attributes for a file (by file descriptor) */
|
||||
int fd_get_file_info( int fd, struct stat *st, ULONG *attr )
|
||||
{
|
||||
- int ret;
|
||||
+ char hexattr[10];
|
||||
+ int len, ret;
|
||||
|
||||
*attr = 0;
|
||||
ret = fstat( fd, st );
|
||||
if (ret == -1) return ret;
|
||||
*attr |= get_file_attributes( st );
|
||||
+ /* retrieve any stored DOS attributes */
|
||||
+ len = xattr_fget( fd, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
+ if (len == -1) return ret;
|
||||
+ *attr |= get_file_xattr( hexattr, len );
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/include/wine/port.h b/include/wine/port.h
|
||||
index 3548a44..521246b 100644
|
||||
--- a/include/wine/port.h
|
||||
+++ b/include/wine/port.h
|
||||
@@ -363,6 +363,14 @@ extern int mkstemps(char *template, int suffix_len);
|
||||
extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
#endif
|
||||
|
||||
+/* Extended attribute functions */
|
||||
+
|
||||
+#ifndef XATTR_USER_PREFIX
|
||||
+# define XATTR_USER_PREFIX "user."
|
||||
+#endif
|
||||
+
|
||||
+extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
|
||||
+
|
||||
/* Interlocked functions */
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
|
||||
index 65f1714..67efbc7 100644
|
||||
--- a/libs/port/Makefile.in
|
||||
+++ b/libs/port/Makefile.in
|
||||
@@ -23,4 +23,5 @@ C_SRCS = \
|
||||
strerror.c \
|
||||
strncasecmp.c \
|
||||
symlink.c \
|
||||
- usleep.c
|
||||
+ usleep.c \
|
||||
+ xattr.c
|
||||
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
|
||||
new file mode 100644
|
||||
index 0000000..2d37be9
|
||||
--- /dev/null
|
||||
+++ b/libs/port/xattr.c
|
||||
@@ -0,0 +1,39 @@
|
||||
+/*
|
||||
+ * extended attributes functions
|
||||
+ *
|
||||
+ * Copyright 2014 Erich E. Hoover
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
+
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+# include <attr/xattr.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <ctype.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int xattr_fget( int filedes, const char *name, void *value, size_t size )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return fgetxattr( filedes, name, value, size );
|
||||
+#else
|
||||
+ errno = ENOTSUP;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,313 +0,0 @@
|
||||
From 01aeace03a70da092579a341399296c562f7ae42 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Tue, 19 Aug 2014 20:31:00 -0600
|
||||
Subject: ntdll: Unify retrieving the attributes of a file.
|
||||
|
||||
---
|
||||
dlls/ntdll/directory.c | 12 ++----
|
||||
dlls/ntdll/file.c | 107 ++++++++++++++++++++++++++++++++++-------------
|
||||
dlls/ntdll/ntdll_misc.h | 4 +-
|
||||
3 files changed, 83 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
|
||||
index 9b5852a..9b10385 100644
|
||||
--- a/dlls/ntdll/directory.c
|
||||
+++ b/dlls/ntdll/directory.c
|
||||
@@ -1381,7 +1381,7 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK
|
||||
WCHAR short_nameW[12];
|
||||
WCHAR *filename;
|
||||
UNICODE_STRING str;
|
||||
- ULONG attributes = 0;
|
||||
+ ULONG attributes;
|
||||
|
||||
io->u.Status = STATUS_SUCCESS;
|
||||
long_len = ntdll_umbstowcs( 0, long_name, strlen(long_name), long_nameW, MAX_DIR_ENTRY_LEN );
|
||||
@@ -1418,12 +1418,7 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK
|
||||
if (!match_filename( &str, mask )) return NULL;
|
||||
}
|
||||
|
||||
- if (lstat( long_name, &st ) == -1) return NULL;
|
||||
- if (S_ISLNK( st.st_mode ))
|
||||
- {
|
||||
- if (stat( long_name, &st ) == -1) return NULL;
|
||||
- if (S_ISDIR( st.st_mode )) attributes |= FILE_ATTRIBUTE_REPARSE_POINT;
|
||||
- }
|
||||
+ if (get_file_info( long_name, &st, &attributes ) == -1) return NULL;
|
||||
if (is_ignored_file( &st ))
|
||||
{
|
||||
TRACE( "ignoring file %s\n", long_name );
|
||||
@@ -1441,10 +1436,9 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK
|
||||
info = (union file_directory_info *)((char *)info_ptr + io->Information);
|
||||
if (st.st_dev != curdir.dev) st.st_ino = 0; /* ignore inode if on a different device */
|
||||
/* all the structures start with a FileDirectoryInformation layout */
|
||||
- fill_stat_info( &st, info, class );
|
||||
+ fill_file_info( &st, attributes, info, class );
|
||||
info->dir.NextEntryOffset = total_len;
|
||||
info->dir.FileIndex = 0; /* NTFS always has 0 here, so let's not bother with it */
|
||||
- info->dir.FileAttributes |= attributes;
|
||||
|
||||
switch (class)
|
||||
{
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 92d9829..53cce85 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -103,6 +103,55 @@ mode_t FILE_umask = 0;
|
||||
|
||||
static const WCHAR ntfsW[] = {'N','T','F','S'};
|
||||
|
||||
+/* fetch the attributes of a file */
|
||||
+static inline ULONG get_file_attributes( const struct stat *st )
|
||||
+{
|
||||
+ ULONG attr;
|
||||
+
|
||||
+ if (S_ISDIR(st->st_mode))
|
||||
+ attr = FILE_ATTRIBUTE_DIRECTORY;
|
||||
+ else
|
||||
+ attr = FILE_ATTRIBUTE_ARCHIVE;
|
||||
+ if (!(st->st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
+ attr |= FILE_ATTRIBUTE_READONLY;
|
||||
+ return attr;
|
||||
+}
|
||||
+
|
||||
+/* get the stat info and file attributes for a file (by file descriptor) */
|
||||
+int fd_get_file_info( int fd, struct stat *st, ULONG *attr )
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ *attr = 0;
|
||||
+ ret = fstat( fd, st );
|
||||
+ if (ret == -1) return ret;
|
||||
+ /* convert the Unix stat info into file attributes */
|
||||
+ *attr |= get_file_attributes( st );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* get the stat info and file attributes for a file (by name) */
|
||||
+int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ *attr = 0;
|
||||
+ /* stat the file and don't follow symbol links */
|
||||
+ ret = lstat( path, st );
|
||||
+ if (ret == -1) return ret;
|
||||
+ if (S_ISLNK( st->st_mode ))
|
||||
+ {
|
||||
+ /* stat the file but follow symbol links */
|
||||
+ ret = stat( path, st );
|
||||
+ if (ret == -1) return ret;
|
||||
+ /* is a symbolic link and a directory, consider these "reparse points" */
|
||||
+ if (S_ISDIR( st->st_mode )) *attr |= FILE_ATTRIBUTE_REPARSE_POINT;
|
||||
+ }
|
||||
+ /* convert the Unix stat info into file attributes */
|
||||
+ *attr |= get_file_attributes( st );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/**************************************************************************
|
||||
* FILE_CreateFile (internal)
|
||||
* Open a file.
|
||||
@@ -1774,8 +1823,9 @@ static inline void get_file_times( const struct stat *st, LARGE_INTEGER *mtime,
|
||||
#endif
|
||||
}
|
||||
|
||||
-/* fill in the file information that depends on the stat info */
|
||||
-NTSTATUS fill_stat_info( const struct stat *st, void *ptr, FILE_INFORMATION_CLASS class )
|
||||
+/* fill in the file information that depends on the stat and attribute info */
|
||||
+NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
|
||||
+ FILE_INFORMATION_CLASS class )
|
||||
{
|
||||
switch (class)
|
||||
{
|
||||
@@ -1785,10 +1835,7 @@ NTSTATUS fill_stat_info( const struct stat *st, void *ptr, FILE_INFORMATION_CLAS
|
||||
|
||||
get_file_times( st, &info->LastWriteTime, &info->ChangeTime,
|
||||
&info->LastAccessTime, &info->CreationTime );
|
||||
- if (S_ISDIR(st->st_mode)) info->FileAttributes = FILE_ATTRIBUTE_DIRECTORY;
|
||||
- else info->FileAttributes = FILE_ATTRIBUTE_ARCHIVE;
|
||||
- if (!(st->st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
- info->FileAttributes |= FILE_ATTRIBUTE_READONLY;
|
||||
+ info->FileAttributes = attr;
|
||||
}
|
||||
break;
|
||||
case FileStandardInformation:
|
||||
@@ -1824,9 +1871,9 @@ NTSTATUS fill_stat_info( const struct stat *st, void *ptr, FILE_INFORMATION_CLAS
|
||||
case FileAllInformation:
|
||||
{
|
||||
FILE_ALL_INFORMATION *info = ptr;
|
||||
- fill_stat_info( st, &info->BasicInformation, FileBasicInformation );
|
||||
- fill_stat_info( st, &info->StandardInformation, FileStandardInformation );
|
||||
- fill_stat_info( st, &info->InternalInformation, FileInternalInformation );
|
||||
+ fill_file_info( st, attr, &info->BasicInformation, FileBasicInformation );
|
||||
+ fill_file_info( st, attr, &info->StandardInformation, FileStandardInformation );
|
||||
+ fill_file_info( st, attr, &info->InternalInformation, FileInternalInformation );
|
||||
}
|
||||
break;
|
||||
/* all directory structures start with the FileDirectoryInformation layout */
|
||||
@@ -1842,30 +1889,27 @@ NTSTATUS fill_stat_info( const struct stat *st, void *ptr, FILE_INFORMATION_CLAS
|
||||
{
|
||||
info->AllocationSize.QuadPart = 0;
|
||||
info->EndOfFile.QuadPart = 0;
|
||||
- info->FileAttributes = FILE_ATTRIBUTE_DIRECTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->AllocationSize.QuadPart = (ULONGLONG)st->st_blocks * 512;
|
||||
info->EndOfFile.QuadPart = st->st_size;
|
||||
- info->FileAttributes = FILE_ATTRIBUTE_ARCHIVE;
|
||||
}
|
||||
- if (!(st->st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
- info->FileAttributes |= FILE_ATTRIBUTE_READONLY;
|
||||
+ info->FileAttributes = attr;
|
||||
}
|
||||
break;
|
||||
case FileIdFullDirectoryInformation:
|
||||
{
|
||||
FILE_ID_FULL_DIRECTORY_INFORMATION *info = ptr;
|
||||
info->FileId.QuadPart = st->st_ino;
|
||||
- fill_stat_info( st, info, FileDirectoryInformation );
|
||||
+ fill_file_info( st, attr, info, FileDirectoryInformation );
|
||||
}
|
||||
break;
|
||||
case FileIdBothDirectoryInformation:
|
||||
{
|
||||
FILE_ID_BOTH_DIRECTORY_INFORMATION *info = ptr;
|
||||
info->FileId.QuadPart = st->st_ino;
|
||||
- fill_stat_info( st, info, FileDirectoryInformation );
|
||||
+ fill_file_info( st, attr, info, FileDirectoryInformation );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2017,6 +2061,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
|
||||
|
||||
struct stat st;
|
||||
int fd, needs_close = FALSE;
|
||||
+ ULONG attr;
|
||||
|
||||
TRACE("(%p,%p,%p,0x%08x,0x%08x)\n", hFile, io, ptr, len, class);
|
||||
|
||||
@@ -2041,21 +2086,21 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
|
||||
switch (class)
|
||||
{
|
||||
case FileBasicInformation:
|
||||
- if (fstat( fd, &st ) == -1)
|
||||
+ if (fd_get_file_info( fd, &st, &attr ) == -1)
|
||||
io->u.Status = FILE_GetNtStatus();
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
io->u.Status = STATUS_INVALID_INFO_CLASS;
|
||||
else
|
||||
- fill_stat_info( &st, ptr, class );
|
||||
+ fill_file_info( &st, attr, ptr, class );
|
||||
break;
|
||||
case FileStandardInformation:
|
||||
{
|
||||
FILE_STANDARD_INFORMATION *info = ptr;
|
||||
|
||||
- if (fstat( fd, &st ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
+ if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
else
|
||||
{
|
||||
- fill_stat_info( &st, info, class );
|
||||
+ fill_file_info( &st, attr, info, class );
|
||||
info->DeletePending = FALSE; /* FIXME */
|
||||
}
|
||||
}
|
||||
@@ -2069,8 +2114,8 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
|
||||
}
|
||||
break;
|
||||
case FileInternalInformation:
|
||||
- if (fstat( fd, &st ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
- else fill_stat_info( &st, ptr, class );
|
||||
+ if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
+ else fill_file_info( &st, attr, ptr, class );
|
||||
break;
|
||||
case FileEaInformation:
|
||||
{
|
||||
@@ -2079,22 +2124,22 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
|
||||
}
|
||||
break;
|
||||
case FileEndOfFileInformation:
|
||||
- if (fstat( fd, &st ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
- else fill_stat_info( &st, ptr, class );
|
||||
+ if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
+ else fill_file_info( &st, attr, ptr, class );
|
||||
break;
|
||||
case FileAllInformation:
|
||||
{
|
||||
FILE_ALL_INFORMATION *info = ptr;
|
||||
ANSI_STRING unix_name;
|
||||
|
||||
- if (fstat( fd, &st ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
+ if (fd_get_file_info( fd, &st, &attr ) == -1) io->u.Status = FILE_GetNtStatus();
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
io->u.Status = STATUS_INVALID_INFO_CLASS;
|
||||
else if (!(io->u.Status = server_get_unix_name( hFile, &unix_name )))
|
||||
{
|
||||
LONG name_len = len - FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName);
|
||||
|
||||
- fill_stat_info( &st, info, FileAllInformation );
|
||||
+ fill_file_info( &st, attr, info, FileAllInformation );
|
||||
info->StandardInformation.DeletePending = FALSE; /* FIXME */
|
||||
info->EaInformation.EaSize = 0;
|
||||
info->AccessInformation.AccessFlags = 0; /* FIXME */
|
||||
@@ -2445,9 +2490,10 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
|
||||
if (!(status = nt_to_unix_file_name_attr( attr, &unix_name, FILE_OPEN )))
|
||||
{
|
||||
+ ULONG attributes;
|
||||
struct stat st;
|
||||
|
||||
- if (stat( unix_name.Buffer, &st ) == -1)
|
||||
+ if (get_file_info( unix_name.Buffer, &st, &attributes ) == -1)
|
||||
status = FILE_GetNtStatus();
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
status = STATUS_INVALID_INFO_CLASS;
|
||||
@@ -2456,8 +2502,8 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
FILE_BASIC_INFORMATION basic;
|
||||
FILE_STANDARD_INFORMATION std;
|
||||
|
||||
- fill_stat_info( &st, &basic, FileBasicInformation );
|
||||
- fill_stat_info( &st, &std, FileStandardInformation );
|
||||
+ fill_file_info( &st, attributes, &basic, FileBasicInformation );
|
||||
+ fill_file_info( &st, attributes, &std, FileStandardInformation );
|
||||
|
||||
info->CreationTime = basic.CreationTime;
|
||||
info->LastAccessTime = basic.LastAccessTime;
|
||||
@@ -2487,15 +2533,16 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
|
||||
|
||||
if (!(status = nt_to_unix_file_name_attr( attr, &unix_name, FILE_OPEN )))
|
||||
{
|
||||
+ ULONG attributes;
|
||||
struct stat st;
|
||||
|
||||
- if (stat( unix_name.Buffer, &st ) == -1)
|
||||
+ if (get_file_info( unix_name.Buffer, &st, &attributes ) == -1)
|
||||
status = FILE_GetNtStatus();
|
||||
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
|
||||
status = STATUS_INVALID_INFO_CLASS;
|
||||
else
|
||||
{
|
||||
- status = fill_stat_info( &st, info, FileBasicInformation );
|
||||
+ status = fill_file_info( &st, attributes, info, FileBasicInformation );
|
||||
if (DIR_is_hidden_file( attr->ObjectName ))
|
||||
info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||
}
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 4370084..e56e78b 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -148,7 +148,9 @@ extern NTSTATUS COMM_FlushBuffersFile( int fd ) DECLSPEC_HIDDEN;
|
||||
/* file I/O */
|
||||
struct stat;
|
||||
extern NTSTATUS FILE_GetNtStatus(void) DECLSPEC_HIDDEN;
|
||||
-extern NTSTATUS fill_stat_info( const struct stat *st, void *ptr, FILE_INFORMATION_CLASS class ) DECLSPEC_HIDDEN;
|
||||
+extern int get_file_info( const char *path, struct stat *st, ULONG *attr ) DECLSPEC_HIDDEN;
|
||||
+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 DIR_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir ) DECLSPEC_HIDDEN;
|
||||
extern BOOL DIR_is_hidden_file( const UNICODE_STRING *name ) DECLSPEC_HIDDEN;
|
||||
--
|
||||
1.7.9.5
|
||||
|
@ -1,160 +1,65 @@
|
||||
From 047f470355885dff798b77061696de522bf03744 Mon Sep 17 00:00:00 2001
|
||||
From e07243c3f38d5a095d92de69dfdbd196a7e9cba4 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: ntdll: Implement retrieving DOS attributes in NtQueryInformationFile.
|
||||
Date: Wed, 20 Aug 2014 16:04:34 -0600
|
||||
Subject: ntdll: Implement retrieving DOS attributes in
|
||||
NtQuery[Full]AttributesFile and NtQueryDirectoryFile.
|
||||
|
||||
---
|
||||
configure.ac | 12 ++++++++++++
|
||||
dlls/ntdll/file.c | 23 ++++++++++++++++++++++-
|
||||
include/wine/port.h | 8 ++++++++
|
||||
libs/port/Makefile.in | 3 ++-
|
||||
libs/port/xattr.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 83 insertions(+), 2 deletions(-)
|
||||
create mode 100644 libs/port/xattr.c
|
||||
dlls/ntdll/file.c | 7 ++++++-
|
||||
include/wine/port.h | 1 +
|
||||
libs/port/xattr.c | 10 ++++++++++
|
||||
3 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index de6d2cc..9de4fa0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -77,2 +77,3 @@ AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
|
||||
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
|
||||
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
|
||||
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
|
||||
@@ -667,6 +668,17 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
#include <sys/socket.h>
|
||||
#endif])
|
||||
|
||||
+if test "x$with_xattr" != "xno"
|
||||
+then
|
||||
+ AC_CHECK_HEADERS(attr/xattr.h, [HAVE_XATTR=1])
|
||||
+fi
|
||||
+if test "x$with_xattr" = "xyes"
|
||||
+then
|
||||
+ WINE_ERROR_WITH(xattr,[test "x$HAVE_XATTR" = "x"],[xattr ${notice_platform}development files \
|
||||
+not found. Wine will be built without extended attribute support, which probably isn't what you \
|
||||
+want. You will need to install ${notice_platform}development packages of libattr at the very least.])
|
||||
+fi
|
||||
+
|
||||
dnl **** Check for working dll ****
|
||||
|
||||
AC_SUBST(dlldir,"\${libdir}/wine")
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 1a69648..b0c3df8 100644
|
||||
index c775664..2331064 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -103,6 +103,22 @@ mode_t FILE_umask = 0;
|
||||
|
||||
static const WCHAR ntfsW[] = {'N','T','F','S'};
|
||||
|
||||
+/* Match the Samba conventions for storing DOS file attributes */
|
||||
+#define SAMBA_XATTR_DOS_ATTRIB XATTR_USER_PREFIX "DOSATTRIB"
|
||||
+/* We are only interested in some attributes, the others have corresponding Unix attributes */
|
||||
+#define XATTR_ATTRIBS_MASK (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)
|
||||
+
|
||||
+/* decode the xattr-stored DOS attributes */
|
||||
+static inline int get_file_xattr( char *hexattr, int attrlen )
|
||||
+{
|
||||
+ if (attrlen > 2 && hexattr[0] == '0' && hexattr[1] == 'x')
|
||||
+ {
|
||||
+ hexattr[attrlen] = 0;
|
||||
+ return strtol( hexattr+2, NULL, 16 ) & XATTR_ATTRIBS_MASK;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -120,13 +136,18 @@ static inline ULONG get_file_attributes( const struct stat *st )
|
||||
/* get the stat info and file attributes for a file (by file descriptor) */
|
||||
int fd_get_file_info( int fd, struct stat *st, ULONG *attr )
|
||||
@@ -153,7 +153,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) */
|
||||
int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
{
|
||||
- int ret;
|
||||
+ char hexattr[10];
|
||||
+ int len, ret;
|
||||
|
||||
*attr = 0;
|
||||
ret = fstat( fd, st );
|
||||
if (ret == -1) return ret;
|
||||
/* convert the Unix stat info into file attributes */
|
||||
ret = lstat( path, st );
|
||||
@@ -166,6 +167,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
if (S_ISDIR( st->st_mode )) *attr |= FILE_ATTRIBUTE_REPARSE_POINT;
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
+ /* retrieve any stored DOS attributes */
|
||||
+ len = xattr_fget( fd, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
+ if (len == -1) return ret;
|
||||
+ *attr |= get_file_xattr( hexattr, len );
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/include/wine/port.h b/include/wine/port.h
|
||||
index 3548a44..521246b 100644
|
||||
index 521246b..7977eb9 100644
|
||||
--- a/include/wine/port.h
|
||||
+++ b/include/wine/port.h
|
||||
@@ -363,6 +363,14 @@ extern int mkstemps(char *template, int suffix_len);
|
||||
extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
@@ -370,6 +370,7 @@ extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
#endif
|
||||
|
||||
+/* Extended attribute functions */
|
||||
+
|
||||
+#ifndef XATTR_USER_PREFIX
|
||||
+# define XATTR_USER_PREFIX "user."
|
||||
+#endif
|
||||
+
|
||||
+extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
|
||||
+
|
||||
extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
|
||||
+extern int xattr_get( const char *path, const char *name, void *value, size_t size );
|
||||
|
||||
/* Interlocked functions */
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
|
||||
index 65f1714..67efbc7 100644
|
||||
--- a/libs/port/Makefile.in
|
||||
+++ b/libs/port/Makefile.in
|
||||
@@ -23,4 +23,5 @@ C_SRCS = \
|
||||
strerror.c \
|
||||
strncasecmp.c \
|
||||
symlink.c \
|
||||
- usleep.c
|
||||
+ usleep.c \
|
||||
+ xattr.c
|
||||
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
|
||||
new file mode 100644
|
||||
index 0000000..2d37be9
|
||||
--- /dev/null
|
||||
index 2d37be9..6ddaa9c 100644
|
||||
--- a/libs/port/xattr.c
|
||||
+++ b/libs/port/xattr.c
|
||||
@@ -0,0 +1,39 @@
|
||||
+/*
|
||||
+ * extended attributes functions
|
||||
+ *
|
||||
+ * Copyright 2014 Erich E. Hoover
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
@@ -37,3 +37,13 @@ int xattr_fget( int filedes, const char *name, void *value, size_t size )
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
+
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+# include <attr/xattr.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <ctype.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int xattr_fget( int filedes, const char *name, void *value, size_t size )
|
||||
+int xattr_get( const char *path, const char *name, void *value, size_t size )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return fgetxattr( filedes, name, value, size );
|
||||
+ return getxattr( path, name, value, size );
|
||||
+#else
|
||||
+ errno = ENOTSUP;
|
||||
+ return -1;
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 687be4357bfb0143f0cade40fa4bb8f483e5c312 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: ntdll: Implement retrieving DOS attributes in
|
||||
NtQuery[Full]AttributesFile and NtQueryDirectoryFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/file.c | 7 ++++++-
|
||||
include/wine/port.h | 1 +
|
||||
libs/port/xattr.c | 10 ++++++++++
|
||||
3 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index e258ca1..fbfe882 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -154,7 +154,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) */
|
||||
int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
{
|
||||
- int ret;
|
||||
+ char hexattr[10];
|
||||
+ int len, ret;
|
||||
|
||||
*attr = 0;
|
||||
/* stat the file and don't follow symbol links */
|
||||
@@ -170,6 +171,10 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
}
|
||||
/* convert the Unix stat info into file attributes */
|
||||
*attr |= get_file_attributes( st );
|
||||
+ /* retrieve any stored DOS attributes */
|
||||
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
+ if (len == -1) return ret;
|
||||
+ *attr |= get_file_xattr( hexattr, len );
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/include/wine/port.h b/include/wine/port.h
|
||||
index 521246b..7977eb9 100644
|
||||
--- a/include/wine/port.h
|
||||
+++ b/include/wine/port.h
|
||||
@@ -370,6 +370,7 @@ extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
#endif
|
||||
|
||||
extern int xattr_fget( int filedes, const char *name, void *value, size_t size );
|
||||
+extern int xattr_get( const char *path, const char *name, void *value, size_t size );
|
||||
|
||||
/* Interlocked functions */
|
||||
|
||||
diff --git a/libs/port/xattr.c b/libs/port/xattr.c
|
||||
index 2d37be9..6ddaa9c 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 )
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+int xattr_get( const char *path, const char *name, void *value, size_t size )
|
||||
+{
|
||||
+#if defined(HAVE_ATTR_XATTR_H)
|
||||
+ return getxattr( path, name, value, size );
|
||||
+#else
|
||||
+ errno = ENOTSUP;
|
||||
+ return -1;
|
||||
+#endif
|
||||
+}
|
||||
--
|
||||
1.7.9.5
|
||||
|
@ -1,13 +1,13 @@
|
||||
From f60e37ead65a6eb67377037aea3dfc991406983e Mon Sep 17 00:00:00 2001
|
||||
From def4cb3c6829c5b097bd24e7bb9eb0bd0a22f151 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: ntdll: Perform the Unix-style hidden file check within the unified
|
||||
file info grabbing routine.
|
||||
|
||||
---
|
||||
dlls/ntdll/directory.c | 13 +++++--------
|
||||
dlls/ntdll/file.c | 9 +++------
|
||||
dlls/ntdll/ntdll_misc.h | 2 +-
|
||||
dlls/ntdll/directory.c | 13 +++++--------
|
||||
dlls/ntdll/file.c | 9 +++------
|
||||
dlls/ntdll/ntdll_misc.h | 2 +-
|
||||
3 files changed, 9 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
|
||||
@ -48,12 +48,12 @@ index 9b10385..a85c5e1 100644
|
||||
if (io->Information + total_len > max_length)
|
||||
{
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 4f4dddb..b694beb 100644
|
||||
index 8d0bd85..a7a7c08 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -203,6 +203,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
@@ -199,6 +199,9 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
if (S_ISDIR( st->st_mode )) *attr |= FILE_ATTRIBUTE_REPARSE_POINT;
|
||||
}
|
||||
/* convert the Unix stat info into file attributes */
|
||||
*attr |= get_file_attributes( st );
|
||||
+ /* convert Unix-style hidden files to a DOS hidden file attribute */
|
||||
+ if (DIR_is_hidden_file( path ))
|
||||
@ -61,7 +61,7 @@ index 4f4dddb..b694beb 100644
|
||||
/* retrieve any stored DOS attributes */
|
||||
len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
|
||||
if (len == -1) return ret;
|
||||
@@ -2572,8 +2575,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
@@ -2568,8 +2571,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
|
||||
info->AllocationSize = std.AllocationSize;
|
||||
info->EndOfFile = std.EndOfFile;
|
||||
info->FileAttributes = basic.FileAttributes;
|
||||
@ -70,7 +70,7 @@ index 4f4dddb..b694beb 100644
|
||||
}
|
||||
RtlFreeAnsiString( &unix_name );
|
||||
}
|
||||
@@ -2601,11 +2602,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
|
||||
@@ -2597,11 +2598,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
|
||||
@ -83,7 +83,7 @@ index 4f4dddb..b694beb 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 e56e78b..f8e508a 100644
|
||||
index b7ea6dc..1ab120c 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -153,7 +153,7 @@ extern NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
|
||||
@ -96,5 +96,5 @@ index e56e78b..f8e508a 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.7.9.5
|
||||
2.1.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user