diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-14 01:11:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:08 -0500 |
commit | f29b9278bb782b48c4f31dd7d42dc530ce598969 (patch) | |
tree | fc91772105e8b6e093556daee9d48ce0d42f668d /source4/ntvfs/posix | |
parent | 4a139f81719a0105c93258b985de31a71a4766dc (diff) | |
download | samba-f29b9278bb782b48c4f31dd7d42dc530ce598969.tar.gz samba-f29b9278bb782b48c4f31dd7d42dc530ce598969.tar.bz2 samba-f29b9278bb782b48c4f31dd7d42dc530ce598969.zip |
r7557: trigger a probe at tconx time to see if xattrs are really supported by
the filesystem
(This used to be commit 71e281ae2fe2ce169aeb09f72376a60d28845808)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_xattr.c | 14 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 5 |
2 files changed, 19 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index 7c4fa317d6..e67253e657 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -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); +} diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 1d3979aabf..846ba61a86 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -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); + } } |