r7557: trigger a probe at tconx time to see if xattrs are really supported by
authorAndrew Tridgell <tridge@samba.org>
Tue, 14 Jun 2005 01:11:24 +0000 (01:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:08 +0000 (13:18 -0500)
the filesystem
(This used to be commit 71e281ae2fe2ce169aeb09f72376a60d28845808)

source4/ntvfs/posix/pvfs_xattr.c
source4/ntvfs/posix/vfs_posix.c

index 7c4fa317d67ed31d20e7cbc198da06048bc78ac5..e67253e657a2468a220653cbe314d49e617d5ec9 100644 (file)
@@ -458,3 +458,17 @@ NTSTATUS pvfs_xattr_save(struct pvfs_state *pvfs,
        return status;
 }
 
+
+/*
+  probe for system support for xattrs
+*/
+void pvfs_xattr_probe(struct pvfs_state *pvfs)
+{
+       TALLOC_CTX *tmp_ctx = talloc_new(pvfs);
+       DATA_BLOB blob;
+       pull_xattr_blob(pvfs, tmp_ctx, "user.XattrProbe", pvfs->base_directory, 
+                       -1, 1, &blob);
+       pull_xattr_blob(pvfs, tmp_ctx, "security.XattrProbe", pvfs->base_directory, 
+                       -1, 1, &blob);
+       talloc_free(tmp_ctx);
+}
index 1d3979aabf8c48acb9cbcbe2027c94254dfb7055..846ba61a861a2b4802fc8617233655c1bd05acf5 100644 (file)
@@ -91,6 +91,11 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
 #ifdef HAVE_BLKID
        pvfs->blkid_cache = NULL;
 #endif
+
+       /* check if the system really supports xattrs */
+       if (pvfs->flags & PVFS_FLAG_XATTR_ENABLE) {
+               pvfs_xattr_probe(pvfs);
+       }
 }