diff options
author | Gerald Pfeifer <gerald@FreeBSD.org> | 2020-11-01 14:15:44 +0000 |
---|---|---|
committer | Gerald Pfeifer <gerald@FreeBSD.org> | 2020-11-01 14:15:44 +0000 |
commit | d1488091c73a32b025f582fe72e83be5f983a496 (patch) | |
tree | 02784eee10e5e238f63f17debfd854ffdc7e5b08 /emulators/wine-devel/files/extrapatch-server-file.c | |
parent | Mark BROKEN (diff) |
Unbreak the (non-default) STAGING option. This requires two local patches
on top of the Wine Staging patchset that address upstream regressions.
It also brings a fair number of STAGING-specific additions to the set of
Wine libraries.
Notes
Notes:
svn path=/head/; revision=553837
Diffstat (limited to 'emulators/wine-devel/files/extrapatch-server-file.c')
-rw-r--r-- | emulators/wine-devel/files/extrapatch-server-file.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/emulators/wine-devel/files/extrapatch-server-file.c b/emulators/wine-devel/files/extrapatch-server-file.c new file mode 100644 index 000000000000..5f01e743b108 --- /dev/null +++ b/emulators/wine-devel/files/extrapatch-server-file.c @@ -0,0 +1,30 @@ +--- server/file.c.orig 2020-10-25 09:54:42.043906000 +0000 ++++ server/file.c 2020-10-25 10:46:07.706926000 +0000 +@@ -65,10 +65,27 @@ + #ifndef XATTR_USER_PREFIX + #define XATTR_USER_PREFIX "user." + #endif ++ ++#ifndef XATTR_USER_PREFIX_LEN ++#define XATTR_USER_PREFIX_LEN (sizeof(XATTR_USER_PREFIX) - 1) ++#endif ++ + #ifndef XATTR_SIZE_MAX + #define XATTR_SIZE_MAX 65536 + #endif + ++#ifdef HAVE_SYS_EXTATTR_H ++static inline int xattr_valid_namespace( const char *name ) ++{ ++ if (strncmp( XATTR_USER_PREFIX, name, XATTR_USER_PREFIX_LEN ) != 0) ++ { ++ errno = EPERM; ++ return 0; ++ } ++ return 1; ++} ++#endif ++ + /* We intentionally do not match the Samba 4 extended attribute for NT security descriptors (SDs): + * 1) Samba stores this information using an internal data structure (we use a flat NT SD). + * 2) Samba uses the attribute "security.NTACL". This attribute is within a namespace that only |