1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
samba-mirror/source3/smbwrapper
Derrell Lipman 9c15bd311d r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
(This used to be commit f2a24de769)
2007-10-10 11:06:18 -05:00
..
PORTING added a document on how to port smbwrapper to a new system 1998-10-07 04:24:42 +00:00
README added command line options to smbsh 1998-10-19 02:49:48 +00:00
realcalls.c Removed version number from file header. 2002-01-30 06:08:46 +00:00
realcalls.h r516: On GNU/Linux distributions which allow to use both 2.4 and 2.6 kernels 2007-10-10 10:51:26 -05:00
shared.c Make this safe for -DDEVELOPER checks. 2003-04-23 10:06:00 +00:00
smbsh.c r6412: Add fflush(stdout) after displaying username prompt in smbsh if 2007-10-10 10:56:40 -05:00
smbsh.in some changes for OSF1 support in smbwrapper (just preliminary changes, 1998-10-07 04:44:31 +00:00
smbw_cache.c r4236: More *alloc fixes. 2007-10-10 10:53:39 -05:00
smbw_dir.c r9350: Fix direct malloc calls made by smbwrapper. 2007-10-10 11:00:33 -05:00
smbw_stat.c r5968: derrell's large file fix for libsmbclient (BUG 2505) 2007-10-10 10:56:13 -05:00
smbw.c r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500 2007-10-10 11:06:18 -05:00
smbw.h Removed version number from file header. 2002-01-30 06:08:46 +00:00
wrapped.c Removed version number from file header. 2002-01-30 06:08:46 +00:00

This is a prelodable shared library that provides SMB client services
for existing executables. Using this you can simulate a smb
filesystem.

*** This is code under development. Some things don't work yet ***

Currently this code has been tested on:

- Linux 2.0 with glibc2 (RH5.1)
- Linux 2.1 with glibc2
- Solaris 2.5.1 with gcc
- Solaris 2.6 with gcc
- SunOS 4.1.3 with gcc
- IRIX 6.4 with cc
- OSF1 with gcc


It probably won't run on other systems without some porting. If you
have a different system then see the file PORTING.

To use it you need to do this:

1) build smbwrapper.so using the command "make smbwrapper"
3) run smbsh

You will be asked for a username and password. After that you will be
returned to a shell prompt. It is actually a subshell running with
smbwrapper enabled. 

Now try to access /smb/SERVER for some SMB server name and see what
happens. If you use the -W option to set your workgroup or have
workgroup set in your smb.conf then listing /smb/ should list all SMB
servers in your workgroup.


OPTIONS
-------

-U username
   specify the username and optional password (as user%password)

-d debug level
 This is an integer that controls the internal debug level of smbw. It
 defaults to 0, which means no debug info.

-l logfile
 The place where smbw debug logs are put. If this is not set then
 stderr is used.

-P prefix
 The root of the SMB filesystem. This defaults to /smb/ but you can
 set it to any name you like.

-W workgroup
 This is the workgroup used for browsing (ie. listing machines in the
 /smb/ directory). It defaults to the one set in smb.conf.

-R resolve order
 This allows you to override the setting of the name resolve order
 from smb.conf


ATTRIBUTE MAPPING
-----------------

smbwrapper does an inverse attribute maping to what Samba does. This
means that the archive bit appears as the user execute bit, the system
bit appears as the group execute bit and the hidden bit appears as the
other execute bit. You can control these with chmod. The mapping can
be enabled an disabled using the normal smb.conf controls (ie. "map
archive", "map system" and "map hidden").

Read-only files appear as non-writeable by everyone. Writeable files
appear as writeable by the current user.


WHAT WORKS
----------

Things that I have tried and do seem to work include:

  emacs, tar, ls, cmp, cp, rsync, du, cat, rm, mv, less, more, wc, head,
  tail, bash, tcsh, mkdir, rmdir, vim, xedit, diff

things that I know don't work:
 
 anything executing from the share
 anything that uses mmap
 redirection within shells to smbsh files

If you want to help with the development of this code then join the
samba-technical mailing list.