summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbwrapper/README14
-rw-r--r--source3/smbwrapper/smbw.c5
-rw-r--r--source3/smbwrapper/wrapped.c5
3 files changed, 17 insertions, 7 deletions
diff --git a/source3/smbwrapper/README b/source3/smbwrapper/README
index 19371269e7..7f699dc8be 100644
--- a/source3/smbwrapper/README
+++ b/source3/smbwrapper/README
@@ -6,9 +6,10 @@ Currently this code has only been tested on:
- Linux 2.0 with glibc2 (RH5.1)
- Linux 2.1 with glibc2
-- Solaris 2.5 with gcc
- Solaris 2.5.1 with gcc
- Solaris 2.6 with gcc
+- SunOS 4.1.3 with gcc
+- IRIX 6.4 with cc
It probably won't run on other systems without some porting.
@@ -17,8 +18,15 @@ To use it you need to do this:
1) build smbwrapper.so using the command "make smbwrapper"
3) run smbsh
-then try to access /smb/SERVER for some SMB server name and see what
-happens.
+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. You can confirm this by checking if the SMBW_USER
+environment variable is defined.
+
+Now try to access /smb/SERVER for some SMB server name and see what
+happens. If you set SMBW_WORKGROUP to your workgroup or have workgroup
+set in yoru smb.conf then listing /smb/ should list all SMB servers in
+your workgroup.
For debugging you can set SMBW_DEBUG to an integer debug level.
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index 97beca9b19..33cadc48d9 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/smbwrapper/smbw.c
@@ -531,13 +531,10 @@ int smbw_open(const char *fname, int flags, mode_t mode)
/* it might be a directory. Maybe we should use chkpath? */
eno = smbw_error(&srv->cli);
fd = smbw_dir_open(fname);
+ if (fd == -1) errno = eno;
smbw_busy--;
return fd;
}
- if (fd == -1) {
- errno = eno;
- goto failed;
- }
file = (struct smbw_file *)malloc(sizeof(*file));
if (!file) {
diff --git a/source3/smbwrapper/wrapped.c b/source3/smbwrapper/wrapped.c
index e87bd5f1f2..a6a7334693 100644
--- a/source3/smbwrapper/wrapped.c
+++ b/source3/smbwrapper/wrapped.c
@@ -628,7 +628,12 @@
#endif
#ifdef HAVE_UTIMES
+#if LINUX
+ /* glibc2 gets the prototype wrong */
+ int utimes(const char *name,struct timeval tvp[2])
+#else
int utimes(const char *name,const struct timeval tvp[2])
+#endif
{
if (smbw_path(name)) {
return smbw_utimes(name, tvp);