Rebase against e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1.

This commit is contained in:
Alistair Leslie-Hughes 2020-10-15 08:48:35 +11:00
parent 6a87f0a479
commit 6d726da3ba
5 changed files with 45 additions and 50 deletions

View File

@ -1,4 +1,4 @@
From 104e3d8f36af9bc2179f7878b4f99b7417f59376 Mon Sep 17 00:00:00 2001
From 885d9313f5fdd835fb753d2c2b30abfb49f54051 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 11:29:24 -0500
Subject: [PATCH] bcrypt: Allow multiple backends to coexist.
@ -7,10 +7,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/bcrypt/Makefile.in | 3 +-
dlls/bcrypt/bcrypt_internal.h | 3 +
dlls/bcrypt/gnutls.c | 34 +++++--
dlls/bcrypt/macos.c | 20 +++-
dlls/bcrypt/gnutls.c | 32 ++++--
dlls/bcrypt/macos.c | 18 +++-
dlls/bcrypt/unixlib.c | 186 ++++++++++++++++++++++++++++++++++
5 files changed, 229 insertions(+), 17 deletions(-)
5 files changed, 227 insertions(+), 15 deletions(-)
create mode 100644 dlls/bcrypt/unixlib.c
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
@ -27,10 +27,10 @@ index 24803fb2d7c..46a20d473dd 100644
RC_SRCS = version.rc
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index 5edc9e6c9c6..29db7210b59 100644
index 463672db470..90551868cf0 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -210,4 +210,7 @@ struct key_funcs
@@ -215,4 +215,7 @@ struct key_funcs
NTSTATUS (CDECL *key_import_ecc)( struct key *, UCHAR *, ULONG );
};
@ -39,10 +39,10 @@ index 5edc9e6c9c6..29db7210b59 100644
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 21520bb4a84..b761c732acf 100644
index 5ed51e8704c..7a1eada329c 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -332,9 +332,12 @@ fail:
@@ -347,9 +347,12 @@ fail:
static void gnutls_uninitialize(void)
{
@ -58,16 +58,7 @@ index 21520bb4a84..b761c732acf 100644
}
struct buffer
@@ -1568,7 +1571,7 @@ static void CDECL key_asymmetric_destroy( struct key *key )
if (key_data(key)->privkey) pgnutls_privkey_deinit( key_data(key)->privkey );
}
-static const struct key_funcs key_funcs =
+static struct key_funcs key_funcs =
{
key_set_property,
key_symmetric_init,
@@ -1589,19 +1592,28 @@ static const struct key_funcs key_funcs =
@@ -1848,19 +1851,28 @@ static const struct key_funcs key_funcs =
key_import_ecc
};
@ -104,19 +95,10 @@ index 21520bb4a84..b761c732acf 100644
+}
+#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 37615e97689..5868b445625 100644
index d8bba46ad5c..8df5ca8645f 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -259,7 +259,7 @@ static void CDECL key_asymmetric_destroy( struct key *key )
{
}
-static const struct key_funcs key_funcs =
+static struct key_funcs key_funcs =
{
key_set_property,
key_symmetric_init,
@@ -280,11 +280,21 @@ static const struct key_funcs key_funcs =
@@ -287,11 +287,21 @@ static const struct key_funcs key_funcs =
key_import_ecc
};

View File

@ -1,18 +1,18 @@
From f4caa19ffcac13201c0c9bd45d3d93d44cb24980 Mon Sep 17 00:00:00 2001
From 2b9b382e84ae850599bac82910efa0811b085e58 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Mon, 6 Oct 2014 14:26:24 -0600
Subject: [PATCH] libport: Add support for FreeBSD style extended attributes.
---
configure.ac | 2 +-
dlls/ntdll/unix/file.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
dlls/ntdll/unix/file.c | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5e33bfacf91..aef00416461 100644
index e17d0498a58..1411f1b88f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,7 +701,7 @@ AC_CHECK_HEADERS([libprocstat.h],,,
@@ -695,7 +695,7 @@ AC_CHECK_HEADERS([libprocstat.h],,,
if test "x$with_xattr" != "xno"
then
@ -22,10 +22,20 @@ index 5e33bfacf91..aef00416461 100644
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/xattr.h>]], [[getxattr("", "", "", 0, 0, 0);]])],
[AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [Define if xattr functions take additional arguments (Mac OS X)])])])
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 5e0ac914e1c..c4d5f9c9028 100644
index 388ef0671fc..cbd8c7ea3db 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -385,6 +385,9 @@ static int xattr_fremove( int filedes, const char *name )
@@ -111,6 +111,9 @@
#elif defined(HAVE_SYS_XATTR_H)
#include <sys/xattr.h>
#endif
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
#include <time.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -385,6 +388,9 @@ static int xattr_fremove( int filedes, const char *name )
return fremovexattr( filedes, name, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return fremovexattr( filedes, name );
@ -35,7 +45,7 @@ index 5e0ac914e1c..c4d5f9c9028 100644
#else
errno = ENOSYS;
return -1;
@@ -397,6 +400,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
@@ -397,6 +403,10 @@ static int xattr_fset( int filedes, const char *name, void *value, size_t size )
return fsetxattr( filedes, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return fsetxattr( filedes, name, value, size, 0 );
@ -46,7 +56,7 @@ index 5e0ac914e1c..c4d5f9c9028 100644
#else
errno = ENOSYS;
return -1;
@@ -409,6 +416,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
@@ -409,6 +419,10 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
return getxattr( path, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return getxattr( path, name, value, size );
@ -57,7 +67,7 @@ index 5e0ac914e1c..c4d5f9c9028 100644
#else
errno = ENOSYS;
return -1;
@@ -421,6 +432,9 @@ static int xattr_remove( const char *path, const char *name )
@@ -421,6 +435,9 @@ static int xattr_remove( const char *path, const char *name )
return removexattr( path, name, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return removexattr( path, name );
@ -67,7 +77,7 @@ index 5e0ac914e1c..c4d5f9c9028 100644
#else
errno = ENOSYS;
return -1;
@@ -433,6 +447,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si
@@ -433,6 +450,10 @@ static int xattr_set( const char *path, const char *name, void *value, size_t si
return setxattr( path, name, value, size, 0, 0 );
#elif defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_XATTR_H)
return setxattr( path, name, value, size, 0 );

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f4a66ad257df4605e73dfea792eec55a70a04e84"
echo "e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1"
}
# Show version information

View File

@ -1,15 +1,15 @@
From a36fb419f7a4c4023507b985ed54387354596445 Mon Sep 17 00:00:00 2001
From 8f38d8b6dd8bdb5ab7f7ebe9c619566cc0430065 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Mon, 30 Mar 2015 13:04:23 +0200
Subject: [PATCH] server: Store file security attributes with extended file
attributes. (v8)
---
server/file.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
server/file.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/server/file.c b/server/file.c
index f0253115c5d..5df300a9a73 100644
index 74199126f59..ba27eab5957 100644
--- a/server/file.c
+++ b/server/file.c
@@ -32,6 +32,7 @@
@ -20,7 +20,7 @@ index f0253115c5d..5df300a9a73 100644
#include <unistd.h>
#ifdef HAVE_UTIME_H
#include <utime.h>
@@ -39,6 +40,12 @@
@@ -39,6 +40,15 @@
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
@ -29,11 +29,14 @@ index f0253115c5d..5df300a9a73 100644
+#include <attr/xattr.h>
+#elif defined(HAVE_SYS_XATTR_H)
+#include <sys/xattr.h>
+#endif
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -52,6 +59,21 @@
@@ -52,6 +62,21 @@
#include "process.h"
#include "security.h"
@ -55,7 +58,7 @@ index f0253115c5d..5df300a9a73 100644
struct file
{
struct object obj; /* object header */
@@ -203,6 +225,44 @@ int is_file_executable( const char *name )
@@ -204,6 +229,44 @@ int is_file_executable( const char *name )
return len >= 4 && (!strcasecmp( name + len - 4, ".exe") || !strcasecmp( name + len - 4, ".com" ));
}
@ -100,7 +103,7 @@ index f0253115c5d..5df300a9a73 100644
static struct object *create_file( struct fd *root, const char *nameptr, data_size_t len,
unsigned int access, unsigned int sharing, int create,
unsigned int options, unsigned int attrs,
@@ -622,6 +682,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
@@ -623,6 +686,9 @@ int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid,
*mode = (*mode & S_IFMT) | new_mode;
}

View File

@ -1 +1 @@
f4a66ad257df4605e73dfea792eec55a70a04e84
e909986e6ea5ecd49b2b847f321ad89b2ae4f6f1