1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/examples/libsmbclient/smbwrapper
Andrew Kroeger 71515ba190 s4: Call va_end() after all va_start()/va_copy() calls.
This corrects the issues reaised in bug #6129, and some others that were not
originally identified.  It also accounts for some code that was in the original
bug report but appears to have since been made common between S3 and S4.

Thanks to Erik Hovland <erik@hovland.org> for the original bug report.
2009-06-18 13:49:25 +10:00
..
bsd-strlcat.c r12759: r12128@cabra: derrell | 2006-01-07 15:34:01 -0500 2007-10-10 11:06:03 -05:00
bsd-strlcpy.c r12759: r12128@cabra: derrell | 2006-01-07 15:34:01 -0500 2007-10-10 11:06:03 -05:00
bsd-strlfunc.h r12759: r12128@cabra: derrell | 2006-01-07 15:34:01 -0500 2007-10-10 11:06:03 -05:00
Makefile examples/libsmbclient: adapt to new samba3 source dir "source3/ 2008-09-17 17:50:18 +02:00
opendir_smbsh.c r6108: Added smbsh/smbwrapper for Linux to example/libsmbclient tree; provided more complete libsmbclient testbrowse utility 2007-10-10 10:56:22 -05:00
README r6108: Added smbsh/smbwrapper for Linux to example/libsmbclient tree; provided more complete libsmbclient testbrowse utility 2007-10-10 10:56:22 -05:00
select.c Replace GetTimeOfDay() with gettimeofday() in example program. 2008-01-16 14:37:40 +00:00
smbsh.1 man pages: Move 'smbsh' man page to the examples directory. 2008-06-17 13:23:09 +02:00
smbsh.1.html man pages: Move 'smbsh' man page to the examples directory. 2008-06-17 13:23:09 +02:00
smbsh.1.xml man pages: Move 'smbsh' man page to the examples directory. 2008-06-17 13:23:09 +02:00
smbsh.c r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:23 -05:00
smbw_dir.c r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:23 -05:00
smbw_stat.c r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:23 -05:00
smbw.c s4: Call va_end() after all va_start()/va_copy() calls. 2009-06-18 13:49:25 +10:00
smbw.h r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:23 -05:00
wrapper.c libsmbclient examples: fix prototype for readlink 2008-08-21 12:16:04 +02:00
wrapper.h r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:23 -05:00

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