r18564: update for cifs unix/posix extensions stub version to build and beginnings...
authorSteve French <sfrench@samba.org>
Fri, 15 Sep 2006 19:24:38 +0000 (19:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:47 +0000 (14:18 -0500)
(This used to be commit 57f56957176ca04f3abb579b557aade71f8d361d)

source4/ntvfs/cifs_posix_cli/svfs_util.c
source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c [moved from source4/ntvfs/cifs_posix_cli/vfs_simple.c with 98% similarity]
source4/ntvfs/config.mk
source4/script/tests/mktestsetup.sh
source4/script/tests/tests_quick.sh

index b85c43b0718b2d99fee9c2554e54b13207c82291..4321a6eb2975236cd2636f99c0e2cecb3d5f9758 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 #include "cvfs.h"
-#include "system/time.h"
 #include "system/dir.h"
 #include "ntvfs/ntvfs.h"
 
+
 /*
   convert a windows path to a unix path - don't do any manging or case sensitive handling
 */
similarity index 98%
rename from source4/ntvfs/cifs_posix_cli/vfs_simple.c
rename to source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
index 2fd5572c0c4ae6ca7424595770fd5490905bd4d6..bd1195d896c63ff9e977665c1126f53a5a9fa204 100644 (file)
@@ -1,9 +1,11 @@
 /* 
    Unix SMB/CIFS implementation.
 
-   simple NTVFS filesystem backend
+   NTVFS filesystem backend for Linux CIFS client and clients which support
+   CIFS Unix extensions
 
    Copyright (C) Andrew Tridgell 2003
+   Copyright (C) Steve French 2006
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 */
 
 #include "includes.h"
-#include "system/dir.h"
 #include "system/filesys.h"
 #include "cvfs.h"
-#include "system/time.h"
 #include "lib/util/dlinklist.h"
 #include "ntvfs/ntvfs.h"
 #include "ntvfs/cifs_posix_cli/proto.h"
@@ -64,6 +64,7 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs,
        private->open_files = NULL;
        private->search = NULL;
 
+       DEBUG(0,("cifs backend: connect to %s",sharename));
        /* the directory must exist */
        if (stat(private->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {
                DEBUG(0,("'%s' is not a directory, when connecting to [%s]\n", 
@@ -790,7 +791,7 @@ static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs,
        union smb_search_data file;
        uint_t max_count;
 
-       if (io->generic.level != RAW_SEARCH_BOTH_DIRECTORY_INFO) {
+       if (io->generic.level != RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO) {
                return NT_STATUS_NOT_SUPPORTED;
        }
 
@@ -860,7 +861,7 @@ static NTSTATUS svfs_search_next(struct ntvfs_module_context *ntvfs,
        union smb_search_data file;
        uint_t max_count;
 
-       if (io->generic.level != RAW_SEARCH_BOTH_DIRECTORY_INFO) {
+       if (io->generic.level != RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO) {
                return NT_STATUS_NOT_SUPPORTED;
        }
 
@@ -1009,11 +1010,11 @@ NTSTATUS ntvfs_cifs_posix_init(void)
        ops.cancel = svfs_cancel;
 
        /* register ourselves with the NTVFS subsystem. We register
-          under names 'simple'
+          under name 'cifsposix'
        */
 
        ops.type = NTVFS_DISK;
-       ops.name = "cifs-posix-cli";
+       ops.name = "cifsposix";
        ret = ntvfs_register(&ops, &vers);
 
        if (!NT_STATUS_IS_OK(ret)) {
index ce1e37dc54b8de33dcc6260739becf6e3f916707..a985348fdb56c4e0ad706710e7254a42af06c024 100644 (file)
@@ -29,16 +29,16 @@ OBJ_FILES = \
 ################################################
 
 ################################################
-# Start MODULE ntvfs_cifs_posix_cli
-[MODULE::ntvfs_cifs_posix]
-ENABLE = NO
+# Start MODULE ntvfs_cifsposix
+[MODULE::ntvfs_cifsposix]
+#ENABLE = NO
 INIT_FUNCTION = ntvfs_cifs_posix_init
 SUBSYSTEM = ntvfs
 PRIVATE_PROTO_HEADER = cifs_posix_cli/proto.h
 OBJ_FILES = \
-                cifs_posix_cli/vfs_simple.o \
+                cifs_posix_cli/vfs_cifs_posix.o \
                 cifs_posix_cli/svfs_util.o
-# End MODULE ntvfs_cifs_posix_cli
+# End MODULE ntvfs_cifsposix
 ################################################
 
 ################################################
index 9453a2f0cd94bb8d16e73e5f4abf4c0141d022b8..181959aa5b656d7979a2bd0cb710d8967dbd7a5b 100755 (executable)
@@ -118,6 +118,11 @@ system:anonymous = true
        cifs:password = $PASSWORD
        cifs:domain = $DOMAIN
        cifs:share = tmp
+
+[cifsposixtestshare]
+       read only = no
+       ntvfs handler = cifsposix
+       path = $TMPDIR
 EOF
 
 ## Override default srahes_config.ldb file
index 80eeb57f3449200cc4d478e09c8fc66778d8d3cd..7b7d35fccebac7ce32b54754c78bfb4b379a1aed 100755 (executable)
@@ -9,3 +9,5 @@ $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || failed=`expr $f
 $SRCDIR/script/tests/test_nbt.sh $SERVER || failed=`expr $failed + $?`
 $SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
 $SRCDIR/script/tests/test_rpc_quick.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+#$SRCDIR/script/tests/test_cifsposix.sh //$SERVER/cifsposixtestshare $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
+