The branch, master has been updated
       via  4328f3c smbwrapper: Remove smbwrapper
       via  b93326b s3-build: remove EXEEXT from Makefiles
       via  fa1c713 s4:join python code - perform a fallback password set 
operation over libnet
       via  36e5526 s4:join python code - write the SAM account name correctly
      from  4cf9923 Fix shadow variable name warning.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4328f3ccf37d9a1baadbc55f658902e3b16ff125
Author: Andrew Bartlett <abart...@samba.org>
Date:   Fri Feb 3 15:06:48 2012 +1100

    smbwrapper: Remove smbwrapper
    
    There are now many better ways to access a remote SMB filesystem,
    which do not rely on LD_PRELOAD and the associated dangers.  FUSE,
    gvfs and the CIFS VFS are all much better options which do not require
    knowing every possible libc entry point that can deal with a file
    descriptor.
    
    As an example of the maintainence that would be required to keep this
    going, recent changes to deal with thread races and close-on-exec have
    resulted in dup3(), but this isn't currently mapped.  While this would
    not be hard to add, it illistrates why it is better to move to an
    interface designed for this task.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abart...@samba.org>
    Autobuild-Date: Thu Feb  9 01:58:24 CET 2012 on sn-devel-104

commit b93326b9689d0ad935eed35f7cf5201ad04ac1ff
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Jan 26 09:23:23 2012 +1100

    s3-build: remove EXEEXT from Makefiles
    
    As far as I am aware, we do not actually build on any platforms that
    require this.  The last Stratos VOS release on
    ftp://ftp.stratus.com/vos/samba/samba.html was 3.0.5
    
    Andrew Bartlett

commit fa1c71382d4f89d9f6c45287a20b1817e08d098d
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Mon Nov 14 17:53:39 2011 +0100

    s4:join python code - perform a fallback password set operation over libnet
    
    Windows 2000 DCs allow LDAP password set operations only with the help of 
SSL.
    Given the fact that this technique is hard to setup it is easier to use SAMR
    over "libnet".
    
    Reviewed-By: Andrew Bartlett <abart...@samba.org>

commit 36e5526685b92cea6e5a1b389737574213cd98ab
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Sun Jan 8 16:41:54 2012 +0100

    s4:join python code - write the SAM account name correctly
    
    It is easier for the comprehension
    
    Reviewed-By: Andrew Bartlett <abart...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/scripts/find_missing_manpages.pl        |    1 -
 docs-xml/using_samba/appd.xml                    |    8 -
 docs-xml/using_samba/ch01.xml                    |   11 -
 docs-xml/using_samba/ch02.xml                    |    8 -
 examples/VFS/configure.in                        |    3 -
 examples/libsmbclient/smbwrapper/Makefile        |   39 -
 examples/libsmbclient/smbwrapper/README          |   40 -
 examples/libsmbclient/smbwrapper/bsd-strlcat.c   |   71 -
 examples/libsmbclient/smbwrapper/bsd-strlcpy.c   |   67 -
 examples/libsmbclient/smbwrapper/bsd-strlfunc.h  |    7 -
 examples/libsmbclient/smbwrapper/opendir_smbsh.c |   47 -
 examples/libsmbclient/smbwrapper/select.c        |  122 --
 examples/libsmbclient/smbwrapper/smbsh.1         |  203 ---
 examples/libsmbclient/smbwrapper/smbsh.1.html    |  108 --
 examples/libsmbclient/smbwrapper/smbsh.1.xml     |  164 --
 examples/libsmbclient/smbwrapper/smbsh.c         |  162 --
 examples/libsmbclient/smbwrapper/smbw.c          |  932 ------------
 examples/libsmbclient/smbwrapper/smbw.h          |  166 ---
 examples/libsmbclient/smbwrapper/smbw_dir.c      |  355 -----
 examples/libsmbclient/smbwrapper/smbw_stat.c     |  100 --
 examples/libsmbclient/smbwrapper/wrapper.c       | 1727 ----------------------
 examples/libsmbclient/smbwrapper/wrapper.h       |  212 ---
 packaging/SGI/idb.pl                             |    5 -
 source3/Makefile.in                              |  187 ++--
 source3/configure.in                             |   25 +-
 source3/lib/netapi/examples/Makefile.in          |  208 ++--
 source3/lib/netapi/tests/Makefile.in             |    4 +-
 source3/m4/swat.m4                               |    2 +-
 source4/scripting/python/samba/join.py           |   26 +-
 29 files changed, 231 insertions(+), 4779 deletions(-)
 delete mode 100644 examples/libsmbclient/smbwrapper/Makefile
 delete mode 100644 examples/libsmbclient/smbwrapper/README
 delete mode 100644 examples/libsmbclient/smbwrapper/bsd-strlcat.c
 delete mode 100644 examples/libsmbclient/smbwrapper/bsd-strlcpy.c
 delete mode 100644 examples/libsmbclient/smbwrapper/bsd-strlfunc.h
 delete mode 100644 examples/libsmbclient/smbwrapper/opendir_smbsh.c
 delete mode 100644 examples/libsmbclient/smbwrapper/select.c
 delete mode 100644 examples/libsmbclient/smbwrapper/smbsh.1
 delete mode 100644 examples/libsmbclient/smbwrapper/smbsh.1.html
 delete mode 100644 examples/libsmbclient/smbwrapper/smbsh.1.xml
 delete mode 100644 examples/libsmbclient/smbwrapper/smbsh.c
 delete mode 100644 examples/libsmbclient/smbwrapper/smbw.c
 delete mode 100644 examples/libsmbclient/smbwrapper/smbw.h
 delete mode 100644 examples/libsmbclient/smbwrapper/smbw_dir.c
 delete mode 100644 examples/libsmbclient/smbwrapper/smbw_stat.c
 delete mode 100644 examples/libsmbclient/smbwrapper/wrapper.c
 delete mode 100644 examples/libsmbclient/smbwrapper/wrapper.h


Changeset truncated at 500 lines:

diff --git a/docs-xml/scripts/find_missing_manpages.pl 
b/docs-xml/scripts/find_missing_manpages.pl
index 612930e..0d66280 100755
--- a/docs-xml/scripts/find_missing_manpages.pl
+++ b/docs-xml/scripts/find_missing_manpages.pl
@@ -23,7 +23,6 @@ $progs =~ s/@([^@]+)@//g;
 
 foreach(split(/bin\//, $progs)) {
        next if($_ eq " ");
-       s/\@EXEEXT\@//g;
        s/ //g;
 
        $f = $_;
diff --git a/docs-xml/using_samba/appd.xml b/docs-xml/using_samba/appd.xml
index 05a7dfa..a3a23f8 100644
--- a/docs-xml/using_samba/appd.xml
+++ b/docs-xml/using_samba/appd.xml
@@ -291,14 +291,6 @@ exit</programlisting>
 
 
 
-<sect2 role="" label="D.1.4" id="appd-SECT-1.4">
-<title>smbsh</title>
-
-
-<para>The <emphasis>smbsh</emphasis>
-<indexterm id="appd-idx-993744-0"><primary>smbsh program</primary></indexterm> 
program lets you use a remote Windows share on your Samba server as if the 
share was a regular Unix directory. When it's run, it provides an extra 
directory tree under <filename>/smb</filename>. Subdirectories of 
<filename>/smb</filename> are servers, and subdirectories of the servers are 
their individual disk and printer shares. Commands run by 
<emphasis>smbsh</emphasis> treat the <filename>/smb</filename> filesystem as if 
it were local to Unix. This means that you don't need 
<emphasis>smbmount</emphasis> in your kernel to mount Windows filesystems the 
way you mount with NFS filesystems. However, you do need to configure Samba 
with the <literal>--with-smbwrappers</literal> option to enable 
<filename>smbsh</filename>.</para>
-
-
 <sect3 role="" label="D.1.4.1" id="appd-SECT-1.4.1">
 <title>Options</title>
 
diff --git a/docs-xml/using_samba/ch01.xml b/docs-xml/using_samba/ch01.xml
index d44e41b..ca8bc13 100644
--- a/docs-xml/using_samba/ch01.xml
+++ b/docs-xml/using_samba/ch01.xml
@@ -1516,17 +1516,6 @@ SIMPLE           &lt;1E&gt;  GROUP       Registered
 
 
 
-<sect2 role="" label="1.7.6" id="ch01-SECT-7.6">
-<title>Smbwrapper</title>
-
-
-<para>Finally, there is an entirely new version of the Unix client called 
<firstterm>smbwrapper</firstterm>
-<indexterm id="ch01-idx-951955-0"><primary>smbwrapper 
client</primary></indexterm>. Instead of a kernel module that allows Linux to 
act as a Samba client, there is now a command-line entry to load the library 
that provides a complete SMB filesystem on some brands of Unix. Once loaded, 
the command <literal>ls</literal> <literal>/smb</literal> will list all the 
machines in your workgroup, and <literal>cd</literal> 
<literal>/smb/</literal><replaceable>server_name</replaceable><literal>/</literal><replaceable>share_name</replaceable>
 will take you to a particular <indexterm 
id="ch01-idx-951956-0"><primary>shares</primary></indexterm>
-<indexterm id="ch01-idx-951956-1"><primary>shared 
directory/resources</primary><see>shares</see></indexterm>share (shared 
directory), similar to the <indexterm id="ch01-idx-951957-0"><primary>Network 
File System (NFS)</primary></indexterm>
-<indexterm id="ch01-idx-951957-1"><primary>NFS (Network File 
System)</primary></indexterm>Network File System (NFS). As of this writing, 
<emphasis>smbwrapper</emphasis> currently runs on Linux, Solaris, SunOS 4, 
IRIX, and OSF/1, and is expected to run on several more operating systems in 
the near future.</para>
-</sect2>
-</sect1>
-
 
 
 
diff --git a/docs-xml/using_samba/ch02.xml b/docs-xml/using_samba/ch02.xml
index ad4b51c..e632a42 100644
--- a/docs-xml/using_samba/ch02.xml
+++ b/docs-xml/using_samba/ch02.xml
@@ -235,14 +235,6 @@ docs/textdocs/UNIX_INSTALL.txt</programlisting>
 <indexterm id="ch02-idx-947349-1"><primary>disabling/enabling 
features</primary></indexterm>Each of these options enable or disable various 
features. You typically enable a feature by specifying the 
<literal>--with-</literal><replaceable>feature</replaceable> option, which will 
cause the feature to be compiled and installed. Likewise, if you specify a 
<literal>--without-</literal><replaceable>feature</replaceable> option, the 
feature will be disabled. As of Samba 2.0.5, each of the following features is 
disabled by default:</para>
 
 
-<variablelist>
-<varlistentry><term><literal>--with-smbwrapper</literal></term>
-<listitem><para>Include SMB <indexterm id="ch02-idx-947350-0"><primary>SMB 
(Server Message Block)</primary><secondary>wrapper 
support</secondary></indexterm>
-<indexterm id="ch02-idx-947350-1"><primary>wrapper support for SMB (Server 
Message Block)</primary></indexterm>wrapper support, which allows executables 
on the Unix side to access <indexterm id="ch02-idx-947351-0"><primary>SMB/CIFS 
protocol</primary><secondary>filesystems</secondary></indexterm>SMB/CIFS 
filesystems as if they were regular Unix filesystems. We recommend using this 
option. However, at this time this book went to press, there were several 
incompatibilities between the <filename>smbwrapper</filename>
-<indexterm id="ch02-idx-947352-0"><primary>smbwrapper 
package</primary></indexterm> package and the GNU <filename>libc</filename> 
version 2.1, and it would not compile on Red Hat 6.0. Look for more information 
on these incompatibilities on the Samba home page.</para></listitem>
-</varlistentry>
-
-
 <varlistentry><term><literal>--with-afs</literal></term>
 <listitem><para>Include support of the <indexterm 
id="ch02-idx-947353-0"><primary>Andrew Filesystem</primary><see>AFS 
files</see></indexterm>Andrew Filesystem from <indexterm 
id="ch02-idx-947354-0"><primary>Carnegie Mellon 
University</primary></indexterm>Carnegie Mellon University. If you're going to 
serve <indexterm id="ch02-idx-947355-0"><primary>AFS files, support 
for</primary></indexterm>AFS files via Samba, we recommend compiling Samba once 
first without enabling this feature to ensure that everything runs smoothly. 
Once that version is working smoothly, recompile Samba with this feature 
enabled and compare any errors you might receive against the previous 
setup.</para></listitem>
 </varlistentry>
diff --git a/examples/VFS/configure.in b/examples/VFS/configure.in
index 9e30197..1c61853 100644
--- a/examples/VFS/configure.in
+++ b/examples/VFS/configure.in
@@ -164,9 +164,6 @@ fi
 #LD=ld
 #AC_PROG_LD_GNU
 
-#dnl look for executable suffix
-#AC_EXEEXT
-
 builddir=`pwd`
 AC_SUBST(builddir)
 
diff --git a/examples/libsmbclient/smbwrapper/Makefile 
b/examples/libsmbclient/smbwrapper/Makefile
deleted file mode 100644
index 952015e..0000000
--- a/examples/libsmbclient/smbwrapper/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-LIBS = -lwbclient -lsmbclient -ltalloc -ltdb -ldl
-DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-
-CFLAGS = -I$(SAMBA_INCL) $(EXTLIB_INCL)
-
-LDFLAGS = -L/usr/local/samba/lib -L../../../source3/bin
-
-SMBINCLUDE = -I../../../source3/include
-CFLAGS= -fpic -g -O0 $(DEFS) $(SMBINCLUDE)
-
-BIN    = .
-
-STRFUNC = bsd-strlcat.o bsd-strlcpy.o
-
-
-SMBWRAPPER_OBJS        = smbw.o smbw_dir.o smbw_stat.o wrapper.o select.o 
$(STRFUNC)
-SMBSH_OBJS     = smbsh.o $(STRFUNC)
-
-all:   $(BIN)/smbwrapper.so $(BIN)/smbsh
-
-$(BIN)/smbwrapper.so:  $(SMBWRAPPER_OBJS)
-       $(CC) -g \
-               -Wl,-init=smbw_initialize \
-               -shared \
-               --export-all-symbols \
-               -o $(BIN)/smbwrapper.so \
-               $(SMBWRAPPER_OBJS) \
-               $(LDFLAGS) \
-               $(LIBS) \
-               -Wl,-soname=`basename $@`
-
-$(BIN)/smbsh: $(SMBSH_OBJS)
-       $(CC) -g -o $(BIN)/smbsh $(SMBSH_OBJS) $(LIBS) $(LDFLAGS)
-
-opendir_smbsh: opendir_smbsh.o
-       $(CC) -g -o opendir_smbsh opendir_smbsh.o $(LIBS) $(DMALLOC)
-
-clean:
-       rm -f *.o *~ opendir_smbsh smbsh smbwrapper.so
diff --git a/examples/libsmbclient/smbwrapper/README 
b/examples/libsmbclient/smbwrapper/README
deleted file mode 100644
index 7b71ec0..0000000
--- a/examples/libsmbclient/smbwrapper/README
+++ /dev/null
@@ -1,40 +0,0 @@
-To create "smbsh" on Linux, just type "make".
-
-If you execute "smbsh" in *this* directory (so that it can find the required
-shared library), you'll find yourself in a new shell.  You can then issue
-commands referencing the "/smb" pseudo-filesystem:
-
-  ls /smb
-  ls /smb/WORKGROUP_OR_DOMAIN
-  ls /smb/SERVER
-  ls /smb/SERVER/SHARE
-  ls /smb/SERVER/SHARE/PATH
-
-Note that WORKGROUP_OR_DOMAIN is *not* used other than at that level.  This is
-consistent with the smb:// URI definition.
-
-Usage:
-  smbsh [-L <path to find smbwrapper.so>]
-        [-p <library to load before smbwrapper.so>]
-        [-a <library to load after smbwrapper.so>]
-        [-d <debug value for libsmbclient>]
-        [-n]                                    (do not ask for 
username/password)
-        [-W <workgroup>]
-        [-U <username%password]
-        [command]
-
-So to list the contents of \\MYDESK\C$ where a username (adventure) and 
password
-(xyzzy) are required, and with smbwrapper.so installed in /usr/share/samba, you
-could try:
-
-  smbsh -L /usr/share/samba -U adventure%xyzzy ls '/smb/MYDESK/C$'
-
-(It's a good idea to get in the habit of surrounding windows paths in single
-quotes, since they often contain spaces and other characters that'll give you
-headaches when not escaped.)
-
-This smbsh seems to work quite well on Linux 2.4 and 2.6.  The biggest problem 
it
-has is in tracking your current working directory.  I haven't had the time to
-track that down and fix it.
-
-Derrell Lipman
diff --git a/examples/libsmbclient/smbwrapper/bsd-strlcat.c 
b/examples/libsmbclient/smbwrapper/bsd-strlcat.c
deleted file mode 100644
index d82ced3..0000000
--- a/examples/libsmbclient/smbwrapper/bsd-strlcat.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*     $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $     */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <todd.mil...@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * This version has been modified for inclusion in Samba.
- * It has been converted to ANSI C from old-style K&R C.
- */
-
-#include <sys/types.h>
-#include <string.h>
-
-/*
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left).  At most siz-1 characters
- * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
- * Returns strlen(src) + MIN(siz, strlen(initial dst)).
- * If retval >= siz, truncation occurred.
- */
-size_t
-smbw_strlcat(char *dst, const char *src, size_t siz)
-{
-       char *d = dst;
-       const char *s = src;
-       size_t n = siz;
-       size_t dlen;
-
-       /* Find the end of dst and adjust bytes left but don't go past end */
-       while (n-- != 0 && *d != '\0')
-               d++;
-       dlen = d - dst;
-       n = siz - dlen;
-
-       if (n == 0)
-               return(dlen + strlen(s));
-       while (*s != '\0') {
-               if (n != 1) {
-                       *d++ = *s;
-                       n--;
-               }
-               s++;
-       }
-       *d = '\0';
-
-       return(dlen + (s - src));       /* count does not include NUL */
-}
diff --git a/examples/libsmbclient/smbwrapper/bsd-strlcpy.c 
b/examples/libsmbclient/smbwrapper/bsd-strlcpy.c
deleted file mode 100644
index 9f7e55d..0000000
--- a/examples/libsmbclient/smbwrapper/bsd-strlcpy.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*     $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $     */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <todd.mil...@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * This version has been modified for inclusion in Samba.
- * It has been converted to ANSI C from old-style K&R C.
- */
-
-#include <sys/types.h>
-#include <string.h>
-
-/*
- * Copy src to string dst of size siz.  At most siz-1 characters
- * will be copied.  Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
- */
-size_t
-smbw_strlcpy(char *dst, const char *src, size_t siz)
-{
-       char *d = dst;
-       const char *s = src;
-       size_t n = siz;
-
-       /* Copy as many bytes as will fit */
-       if (n != 0 && --n != 0) {
-               do {
-                       if ((*d++ = *s++) == 0)
-                               break;
-               } while (--n != 0);
-       }
-
-       /* Not enough room in dst, add NUL and traverse rest of src */
-       if (n == 0) {
-               if (siz != 0)
-                       *d = '\0';              /* NUL-terminate dst */
-               while (*s++)
-                       ;
-       }
-
-       return(s - src - 1);    /* count does not include NUL */
-}
diff --git a/examples/libsmbclient/smbwrapper/bsd-strlfunc.h 
b/examples/libsmbclient/smbwrapper/bsd-strlfunc.h
deleted file mode 100644
index fb3a045..0000000
--- a/examples/libsmbclient/smbwrapper/bsd-strlfunc.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __BSD_STRLFUNC_H__
-
-extern size_t strlcpy(char *dst, const char *src, size_t siz);
-extern size_t strlcat(char *dst, const char *src, size_t siz);
-
-#define __BSD_STRLFUNC_H__
-#endif
diff --git a/examples/libsmbclient/smbwrapper/opendir_smbsh.c 
b/examples/libsmbclient/smbwrapper/opendir_smbsh.c
deleted file mode 100644
index 275b95f..0000000
--- a/examples/libsmbclient/smbwrapper/opendir_smbsh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <libsmbclient.h>
-
-int
-main(int argc, char * argv[])
-{
-    char *          p;
-    char            buf[1024];
-    DIR *           dir;
-    struct dirent * dirent;
-
-    setbuf(stdout, NULL);
-
-    for (fputs("path: ", stdout), p = fgets(buf, sizeof(buf), stdin);
-         p != NULL && *p != '\n' && *p != '\0';
-         fputs("path: ", stdout), p = fgets(buf, sizeof(buf), stdin))
-    {
-        if ((p = strchr(buf, '\n')) != NULL)
-        {
-            *p = '\0';
-        }
-        
-        printf("Opening (%s)...\n", buf);
-        
-        if ((dir = opendir(buf)) == NULL)
-        {
-            printf("Could not open directory [%s]: \n",
-                   buf, strerror(errno));
-            continue;
-        }
-
-        while ((dirent = readdir(dir)) != NULL)
-        {
-            printf("%-30s", dirent->d_name);
-            printf("%-30s", dirent->d_name + strlen(dirent->d_name) + 1);
-            printf("\n");
-        }
-
-        closedir(dir);
-    }
-
-    exit(0);
-}
diff --git a/examples/libsmbclient/smbwrapper/select.c 
b/examples/libsmbclient/smbwrapper/select.c
deleted file mode 100644
index bb7a25f..0000000
--- a/examples/libsmbclient/smbwrapper/select.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* 
-   Unix SMB/Netbios implementation.
-   Version 3.0
-   Samba select/poll implementation
-   Copyright (C) Andrew Tridgell 1992-1998
-   Copyright (C) Derrell Lipman 2003-2005
-   
-   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
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * WHY THIS FILE?
- *
- * This file implements the two functions in the select() family, as required
- * by samba.  The samba native functions, though, implement a pipe to help
- * alleviate a deadlock problem, but which creates problems of its own (the
- * timeout stops working correctly).  Those functions also require that all
- * signal handlers call a function which writes to the pipe -- a task which is
- * difficult to do in the smbwrapper environment.
- */
-
-
-#include <sys/select.h>
-#include <errno.h>
-#include <stdio.h>
-
-int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, 
struct timeval *tval)
-{
-        int ret;
-       fd_set *readfds2, readfds_buf;
-
-       /* If readfds is NULL we need to provide our own set. */
-       if (readfds) {
-               readfds2 = readfds;
-       } else {
-               readfds2 = &readfds_buf;
-               FD_ZERO(readfds2);
-       }
-
-       errno = 0;
-       ret = select(maxfd,readfds2,writefds,errorfds,tval);
-
-       if (ret <= 0) {
-               FD_ZERO(readfds2);
-               if (writefds)
-                       FD_ZERO(writefds);
-               if (errorfds)
-                       FD_ZERO(errorfds);
-       }
-
-       return ret;
-}
-
-/*******************************************************************
- Similar to sys_select() but catch EINTR and continue.
- This is what sys_select() used to do in Samba.
-********************************************************************/
-
-int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set 
*errorfds, struct timeval *tval)
-{
-       int ret;
-       fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, 
errorfds_buf;
-       struct timeval tval2, *ptval, end_time, now_time;
-
-       readfds2 = (readfds ? &readfds_buf : NULL);
-       writefds2 = (writefds ? &writefds_buf : NULL);
-       errorfds2 = (errorfds ? &errorfds_buf : NULL);
-        if (tval) {
-                gettimeofday(&end_time, NULL);
-                end_time.tv_sec += tval->tv_sec;
-                end_time.tv_usec += tval->tv_usec;
-                end_time.tv_sec += end_time.tv_usec / 1000000;
-                end_time.tv_usec %= 1000000;
-                ptval = &tval2;
-        } else {
-                ptval = NULL;
-        }
-
-       do {
-               if (readfds)
-                       readfds_buf = *readfds;
-               if (writefds)
-                       writefds_buf = *writefds;
-               if (errorfds)
-                       errorfds_buf = *errorfds;
-               if (tval) {
-                        gettimeofday(&now_time, NULL);
-                        tval2.tv_sec = end_time.tv_sec - now_time.tv_sec;
-                       tval2.tv_usec = end_time.tv_usec - now_time.tv_usec;
-                        if ((signed long) tval2.tv_usec < 0) {


-- 
Samba Shared Repository

Reply via email to