1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

r7557: trigger a probe at tconx time to see if xattrs are really supported by

the filesystem
(This used to be commit 71e281ae2fe2ce169aeb09f72376a60d28845808)
This commit is contained in:
Andrew Tridgell 2005-06-14 01:11:24 +00:00 committed by Gerald (Jerry) Carter
parent 4a139f8171
commit f29b9278bb
2 changed files with 19 additions and 0 deletions

View 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);
}

View 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);
}
}