summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/xattr_system.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-02 14:22:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:49 -0500
commit8f553ab4a1e5f2affb614c0824d4d77291343861 (patch)
treeb833a01561c4239817248d091cb092f8a2b3c729 /source4/ntvfs/posix/xattr_system.c
parentf6a3c29ede4482bdad7362bc990fe567c5714163 (diff)
downloadsamba-8f553ab4a1e5f2affb614c0824d4d77291343861.tar.gz
samba-8f553ab4a1e5f2affb614c0824d4d77291343861.tar.bz2
samba-8f553ab4a1e5f2affb614c0824d4d77291343861.zip
r16005: add support for XATTR's on MacOS
Thanks to Bjoern Jacke for his help. metze (This used to be commit 8f8480e453ced38cbf27d0a1a45843c5eb126016)
Diffstat (limited to 'source4/ntvfs/posix/xattr_system.c')
-rw-r--r--source4/ntvfs/posix/xattr_system.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/xattr_system.c b/source4/ntvfs/posix/xattr_system.c
index 757ccefe11..58edf47bfc 100644
--- a/source4/ntvfs/posix/xattr_system.c
+++ b/source4/ntvfs/posix/xattr_system.c
@@ -23,7 +23,38 @@
#include "includes.h"
#include "vfs_posix.h"
-#if !defined(HAVE_XATTR_SUPPORT)
+#if defined(HAVE_XATTR_SUPPORT) && defined(XATTR_ADDITIONAL_OPTIONS)
+static ssize_t _wrap_fgetxattr(int fd, const char *name, void *value, size_t size)
+{
+ return fgetxattr(fd, name, value, size, 0, 0);
+}
+static ssize_t _wrap_getxattr(const char *path, const char *name, void *value, size_t size)
+{
+ return getxattr(path, name, value, size, 0, 0);
+}
+static ssize_t _wrap_fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+{
+ return fsetxattr(fd, name, value, size, 0, flags);
+}
+static ssize_t _wrap_setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+{
+ return setxattr(path, name, value, size, 0, flags);
+}
+static ssize_t _wrap_fremovexattr(int fd, const char *name)
+{
+ return fremovexattr(fd, name, 0);
+}
+static ssize_t _wrap_removexattr(const char *path, const char *name)
+{
+ return removexattr(path, name, 0);
+}
+#define fgetxattr _wrap_fgetxattr
+#define getxattr _wrap_getxattr
+#define fsetxattr _wrap_fsetxattr
+#define setxattr _wrap_setxattr
+#define fremovexattr _wrap_fremovexattr
+#define removexattr _wrap_removexattr
+#elif !defined(HAVE_XATTR_SUPPORT)
static ssize_t _none_fgetxattr(int fd, const char *name, void *value, size_t size)
{
errno = ENOTSUP;