s4:ntvfs: Use #ifdef instead of #if for config.h definitions
[gd/samba-autobuild/.git] / source4 / ntvfs / posix / vfs_posix.c
index afa3f23b84dd6d5802b9d21e126b2c353059ac3d..df5637486d38acd86bef0681f1c26daac0027890 100644 (file)
@@ -26,7 +26,7 @@
 #include "includes.h"
 #include "vfs_posix.h"
 #include "librpc/gen_ndr/security.h"
-#include "tdb_compat.h"
+#include <tdb.h>
 #include "lib/tdb_wrap/tdb_wrap.h"
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
@@ -92,7 +92,7 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
                                                        PVFS_SEARCH_INACTIVITY,
                                                        PVFS_SEARCH_INACTIVITY_DEFAULT);
 
-#if HAVE_XATTR_SUPPORT
+#ifdef HAVE_XATTR_SUPPORT
        if (share_bool_option(scfg, PVFS_XATTR, PVFS_XATTR_DEFAULT))
                pvfs->flags |= PVFS_FLAG_XATTR_ENABLE;
 #endif
@@ -114,15 +114,15 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
        pvfs->fs_attribs = 
                FS_ATTR_CASE_SENSITIVE_SEARCH | 
                FS_ATTR_CASE_PRESERVED_NAMES |
-               FS_ATTR_UNICODE_ON_DISK |
-               FS_ATTR_SPARSE_FILES;
+               FS_ATTR_UNICODE_ON_DISK;
 
        /* allow xattrs to be stored in a external tdb */
        eadb = share_string_option(pvfs, scfg, PVFS_EADB, NULL);
        if (eadb != NULL) {
-               pvfs->ea_db = tdb_wrap_open(pvfs, eadb, 50000,  
-                                           TDB_DEFAULT, O_RDWR|O_CREAT, 0600, 
-                                           pvfs->ntvfs->ctx->lp_ctx);
+               pvfs->ea_db = tdb_wrap_open(
+                       pvfs, eadb, 50000,
+                       lpcfg_tdb_flags(pvfs->ntvfs->ctx->lp_ctx, TDB_DEFAULT),
+                       O_RDWR|O_CREAT, 0600);
                TALLOC_FREE(eadb);
                if (pvfs->ea_db != NULL) {
                        pvfs->flags |= PVFS_FLAG_XATTR_ENABLE;
@@ -359,7 +359,7 @@ static NTSTATUS pvfs_trans(struct ntvfs_module_context *ntvfs,
 /*
   initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
  */
-NTSTATUS ntvfs_posix_init(void)
+NTSTATUS ntvfs_posix_init(TALLOC_CTX *ctx)
 {
        NTSTATUS ret;
        struct ntvfs_ops ops;