s3-selftest: make sure provisioned s3 looks the same in make selftest as in make...
authorGünther Deschner <gd@samba.org>
Fri, 28 May 2010 22:09:14 +0000 (00:09 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 28 May 2010 22:12:15 +0000 (00:12 +0200)
This fixes some tests that were previously failing.

Guenther

selftest/target/Samba3.pm

index e82ac7e94a48994dc320bb2197cc51d7bffb4ebc..57ec1d83680e5e023e5dda63606e22c202e8f0e6 100644 (file)
@@ -424,6 +424,15 @@ sub provision($$$$$$)
        my $driver64dir="$shrdir/x64";
        push(@dirs,$driver64dir);
 
+       my $ro_shrdir="$shrdir/root-tmp";
+       push(@dirs,$ro_shrdir);
+
+       my $msdfs_shrdir="$shrdir/msdfsshare";
+       push(@dirs,$msdfs_shrdir);
+
+       my $msdfs_deeppath="$msdfs_shrdir/deeppath";
+       push(@dirs,$msdfs_deeppath);
+
        # this gets autocreated by winbindd
        my $wbsockdir="$prefix_abs/winbindd";
        my $wbsockprivdir="$lockdir/winbindd_privileged";
@@ -439,6 +448,23 @@ sub provision($$$$$$)
        system("rm -rf $prefix_abs/*");
        mkdir($_, 0777) foreach(@dirs);
 
+       ##
+       ## create ro and msdfs share layout
+       ##
+
+       chmod 755, $ro_shrdir;
+       my $unreadable_file = "$ro_shrdir/unreadable_file";
+       open(UNREADABLE_FILE, ">$unreadable_file") or die("Unable to open $unreadable_file");
+       close(UNREADABLE_FILE);
+       chmod 600, $unreadable_file;
+
+       my $msdfs_target = "$ro_shrdir/msdfs-target";
+       open(MSDFS_TARGET, ">$msdfs_target") or die("Unable to open $msdfs_target");
+       close(MSDFS_TARGET);
+       chmod 666, $msdfs_target;
+       symlink "msdfs:$server_ip\\ro-tmp", "$msdfs_shrdir/msdfs-src1";
+       symlink "msdfs:$server_ip\\ro-tmp", "$msdfs_shrdir/deeppath/msdfs-src2";
+
        my $conffile="$libdir/server.conf";
 
        my $nss_wrapper_pl = "$ENV{PERL} $RealBin/../lib/nss_wrapper/nss_wrapper.pl";
@@ -535,9 +561,11 @@ sub provision($$$$$$)
 
        read only = no
        smbd:sharedelay = 100000
-       smbd:writetimeupdatedelay = 500000
-       map hidden = yes
-       map system = yes
+#      smbd:writetimeupdatedelay = 500000
+       map hidden = no
+       map system = no
+       map readonly = no
+       store dos attributes = yes
        create mask = 755
        vfs objects = $bindir_abs/xattr_tdb.so $bindir_abs/streams_depot.so
 
@@ -565,9 +593,19 @@ sub provision($$$$$$)
        print CONF "
 [tmp]
        path = $shrdir
+[ro-tmp]
+       path = $ro_shrdir
+       guest ok = yes
+[msdfs-share]
+       path = $msdfs_shrdir
+       msdfs root = yes
+       guest ok = yes
 [hideunread]
        copy = tmp
        hide unreadable = yes
+[tmpcase]
+       copy = tmp
+       case sensitive = yes
 [hideunwrite]
        copy = tmp
        hide unwriteable files = yes