Fix the mess with ldb includes.
[metze/samba/wip.git] / source4 / ntvfs / posix / vfs_posix.c
index ca874d1db1f0551a901c5a39cafe00a481f3f5f3..6b0f32e65a84a41ff1a774b7f01ca3cd43c848e0 100644 (file)
@@ -26,9 +26,8 @@
 #include "includes.h"
 #include "vfs_posix.h"
 #include "librpc/gen_ndr/security.h"
-#include "lib/tdb/include/tdb.h"
+#include "../tdb/include/tdb.h"
 #include "tdb_wrap.h"
-#include "util/util_ldb.h"
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
 #include "param/param.h"
@@ -95,6 +94,10 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
                                                      PVFS_OPLOCK_TIMEOUT,
                                                      PVFS_OPLOCK_TIMEOUT_DEFAULT);
 
+       pvfs->writetime_delay = share_int_option(scfg,
+                                                PVFS_WRITETIME_DELAY,
+                                                PVFS_WRITETIME_DELAY_DEFAULT);
+
        pvfs->share_name = talloc_strdup(pvfs, scfg->name);
 
        pvfs->fs_attribs = 
@@ -172,6 +175,13 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
        char *base_directory;
        NTSTATUS status;
 
+       /*
+        * TODO: call this from ntvfs_posix_init()
+        *       but currently we don't have a lp_ctx there
+        */
+       status = pvfs_acl_init(ntvfs->ctx->lp_ctx);
+       NT_STATUS_NOT_OK_RETURN(status);
+
        pvfs = talloc_zero(ntvfs, struct pvfs_state);
        NT_STATUS_HAVE_NO_MEMORY(pvfs);
 
@@ -219,11 +229,13 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
                                           pvfs->ntvfs->ctx->server_id,  
                                           pvfs->ntvfs->ctx->msg_ctx, 
                                           pvfs->ntvfs->ctx->lp_ctx, 
-                                          event_context_find(pvfs),
+                                          pvfs->ntvfs->ctx->event_ctx,
                                           pvfs->ntvfs->ctx->config);
 
-       pvfs->sidmap = sidmap_open(pvfs, pvfs->ntvfs->ctx->lp_ctx);
-       if (pvfs->sidmap == NULL) {
+       pvfs->wbc_ctx = wbc_init(pvfs,
+                                pvfs->ntvfs->ctx->msg_ctx,
+                                pvfs->ntvfs->ctx->event_ctx);
+       if (pvfs->wbc_ctx == NULL) {
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
        }