Fix include paths to new location of libutil.
[bbaumbach/samba-autobuild/.git] / source4 / ntvfs / posix / vfs_posix.c
index 07948a64e223bb83914ac687728eef13edac47b4..601c876cfb9aa2bc28bfa1ec611ccc72ef1d0d9c 100644 (file)
@@ -26,9 +26,9 @@
 #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 "../lib/util/util_ldb.h"
 #include "libcli/security/security.h"
 #include "lib/events/events.h"
 #include "param/param.h"
@@ -91,6 +91,14 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
                                                        PVFS_SHARE_DELAY,
                                                        PVFS_SHARE_DELAY_DEFAULT);
 
+       pvfs->oplock_break_timeout = share_int_option(scfg,
+                                                     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 = 
@@ -168,6 +176,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);
 
@@ -199,6 +214,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
 
        pvfs->brl_context = brl_init(pvfs, 
                                     pvfs->ntvfs->ctx->server_id,
+                                    pvfs->ntvfs->ctx->lp_ctx,
                                     pvfs->ntvfs->ctx->msg_ctx);
        if (pvfs->brl_context == NULL) {
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
@@ -213,11 +229,14 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
        pvfs->notify_context = notify_init(pvfs, 
                                           pvfs->ntvfs->ctx->server_id,  
                                           pvfs->ntvfs->ctx->msg_ctx, 
-                                          event_context_find(pvfs),
+                                          pvfs->ntvfs->ctx->lp_ctx, 
+                                          pvfs->ntvfs->ctx->event_ctx,
                                           pvfs->ntvfs->ctx->config);
 
-       pvfs->sidmap = sidmap_open(pvfs, global_loadparm);
-       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;
        }