diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-10-05 13:51:19 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-10-05 13:51:19 +0000 |
commit | 4bacf32755f8012110797f7aae2b3e1e0e2f537b (patch) | |
tree | 08c25472165edbbaf062ec00969603ba8b5eda98 /source/smbwrapper | |
parent | aa38a03961442e70e453f65c60f717765b4bea6f (diff) | |
download | samba-4bacf32755f8012110797f7aae2b3e1e0e2f537b.tar.gz samba-4bacf32755f8012110797f7aae2b3e1e0e2f537b.tar.xz samba-4bacf32755f8012110797f7aae2b3e1e0e2f537b.zip |
- fixed errno return in smbw_open()
- updated README a bit
- fixed Linux compilation of utime()
Diffstat (limited to 'source/smbwrapper')
-rw-r--r-- | source/smbwrapper/README | 14 | ||||
-rw-r--r-- | source/smbwrapper/smbw.c | 5 | ||||
-rw-r--r-- | source/smbwrapper/wrapped.c | 5 |
3 files changed, 17 insertions, 7 deletions
diff --git a/source/smbwrapper/README b/source/smbwrapper/README index 19371269e7e..7f699dc8be5 100644 --- a/source/smbwrapper/README +++ b/source/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/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c index 97beca9b197..33cadc48d93 100644 --- a/source/smbwrapper/smbw.c +++ b/source/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/source/smbwrapper/wrapped.c b/source/smbwrapper/wrapped.c index e87bd5f1f20..a6a73346936 100644 --- a/source/smbwrapper/wrapped.c +++ b/source/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); |