replace/setxattr: correctly use our flags on Darwin
authorBjörn Jacke <bj@sernet.de>
Sat, 2 Mar 2019 04:47:20 +0000 (05:47 +0100)
committerBjoern Jacke <bjacke@samba.org>
Thu, 29 Aug 2019 17:10:32 +0000 (17:10 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Thu Aug 29 17:10:32 UTC 2019 on sn-devel-184

lib/replace/xattr.c

index b7fbde2a2cabc311632450eb64d4eb4624e8c517..d07dd2cc1e352111a3e1c1273dacb5cf8ca814c6 100644 (file)
@@ -528,8 +528,7 @@ int rep_setxattr (const char *path, const char *name, const void *value, size_t
 #else
 /* So that we do not recursivly call this function */
 #undef setxattr
-       int options = 0;
-       retval = setxattr(path, name, value, size, 0, options);
+       retval = setxattr(path, name, value, size, 0, flags);
        if (retval < 0) {
                if (errno == E2BIG) {
                        errno = ENAMETOOLONG;
@@ -636,8 +635,7 @@ int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size
 #else
 /* So that we do not recursivly call this function */
 #undef fsetxattr
-       int options = 0;
-       retval = fsetxattr(filedes, name, value, size, 0, options);
+       retval = fsetxattr(filedes, name, value, size, 0, flags);
        if (retval < 0) {
                if (errno == E2BIG) {
                        errno = ENAMETOOLONG;