Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/smbfs Import the userland part of FreeBSD smbfs (mount_...



details:   https://anonhg.NetBSD.org/src/rev/e348e099fca2
branches:  trunk
changeset: 543069:e348e099fca2
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Feb 16 08:15:07 2003 +0000

description:
Import the userland part of FreeBSD smbfs (mount_smbfs, smutil, libsmb)

diffstat:

 dist/smbfs/COPYRIGHT                      |   29 +
 dist/smbfs/CREDITS                        |   11 +
 dist/smbfs/FREEBSD-upgrade                |    6 +
 dist/smbfs/HISTORY                        |  148 +++++
 dist/smbfs/INSTALL                        |   68 ++
 dist/smbfs/Makefile                       |   87 +++
 dist/smbfs/Makefile.inc                   |   47 +
 dist/smbfs/README                         |   53 ++
 dist/smbfs/config.mk.in                   |   37 +
 dist/smbfs/configure                      |    3 +
 dist/smbfs/examples/dot.nsmbrc            |   58 ++
 dist/smbfs/examples/print/lj6l            |   22 +
 dist/smbfs/examples/print/ljspool         |    4 +
 dist/smbfs/examples/print/printcap.sample |    7 +
 dist/smbfs/examples/print/tolj            |    5 +
 dist/smbfs/examples/smbfs.sh.sample       |   37 +
 dist/smbfs/include/cflib.h                |   86 +++
 dist/smbfs/include/netsmb/nb_lib.h        |  147 +++++
 dist/smbfs/include/netsmb/smb_lib.h       |  258 +++++++++
 dist/smbfs/include/netsmb/smb_rap.h       |   74 ++
 dist/smbfs/lib/Makefile                   |   21 +
 dist/smbfs/lib/Makefile.inc               |   20 +
 dist/smbfs/lib/smb/Makefile               |   50 +
 dist/smbfs/lib/smb/cfopt.c                |  123 ++++
 dist/smbfs/lib/smb/ctx.c                  |  781 ++++++++++++++++++++++++++++++
 dist/smbfs/lib/smb/file.c                 |   80 +++
 dist/smbfs/lib/smb/kiconv.c               |   75 ++
 dist/smbfs/lib/smb/mbuf.c                 |  467 +++++++++++++++++
 dist/smbfs/lib/smb/nb.c                   |  191 +++++++
 dist/smbfs/lib/smb/nb_name.c              |  199 +++++++
 dist/smbfs/lib/smb/nb_net.c               |  201 +++++++
 dist/smbfs/lib/smb/nbns_rq.c              |  380 ++++++++++++++
 dist/smbfs/lib/smb/nls.c                  |  236 +++++++++
 dist/smbfs/lib/smb/print.c                |   97 +++
 dist/smbfs/lib/smb/rap.c                  |  404 +++++++++++++++
 dist/smbfs/lib/smb/rcfile.c               |  499 +++++++++++++++++++
 dist/smbfs/lib/smb/rcfile_priv.h          |   20 +
 dist/smbfs/lib/smb/rq.c                   |  179 ++++++
 dist/smbfs/lib/smb/subr.c                 |  376 ++++++++++++++
 dist/smbfs/mount_smbfs/Makefile           |   18 +
 dist/smbfs/mount_smbfs/getmntopts.c       |  108 ++++
 dist/smbfs/mount_smbfs/mntopts.h          |  109 ++++
 dist/smbfs/mount_smbfs/mount_smbfs.8      |  156 +++++
 dist/smbfs/mount_smbfs/mount_smbfs.c      |  278 ++++++++++
 dist/smbfs/smbutil/Makefile               |    9 +
 dist/smbfs/smbutil/common.h               |   20 +
 dist/smbfs/smbutil/dumptree.c             |  142 +++++
 dist/smbfs/smbutil/login.c                |  211 ++++++++
 dist/smbfs/smbutil/lookup.c               |  110 ++++
 dist/smbfs/smbutil/print.c                |  152 +++++
 dist/smbfs/smbutil/smbutil.1              |  134 +++++
 dist/smbfs/smbutil/smbutil.c              |  159 ++++++
 dist/smbfs/smbutil/view.c                 |  137 +++++
 53 files changed, 7329 insertions(+), 0 deletions(-)

diffs (truncated from 7542 to 300 lines):

diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/COPYRIGHT
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/COPYRIGHT      Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,29 @@
+ Copyright (c) 2000, 2001 Boris Popov
+ 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. All advertising materials mentioning features or use of this software
+    must display the following acknowledgement:
+    This product includes software developed by Boris Popov.
+ 4. Neither the name of the author nor the names of any co-contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/CREDITS
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/CREDITS        Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,11 @@
+
+       In the development process next sources were used:
+
+Various documents from the Microsoft ftp site.
+
+HTML docs published by Thursby Software.
+
+Special thanks to the Samba team for permission to use their source
+code as reference.
+
+Author - Boris Popov <bp%butya.kz@localhost>, <bp%freebsd.org@localhost>
diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/FREEBSD-upgrade
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/FREEBSD-upgrade        Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,6 @@
+$FreeBSD: src/contrib/smbfs/FREEBSD-upgrade,v 1.1 2001/12/14 11:11:31 sheldonh Exp $
+
+The smbfs distribution was written with FreeBSD in mind, so the only
+change required before an import is:
+
+rm -rf kernel
diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/HISTORY
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/HISTORY        Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,148 @@
+22.07.2002     1.4.5 (bug fix only)
+    - Some iconv libraries may refuse to recode some characters. This
+      caused problems with translation between server and local charsets.
+
+16.04.2002     1.4.4
+    - Workaround for W2K bug in resource listing.
+    - Minor bug fixes.
+    - Manual pages updated. Thanks to Ruslan Ermilov.
+
+26.12.2001     1.4.3 (interim)
+    - Additional cleanups for FreeBSD builds.
+    - Charset specifications now accepted in the [default] section.
+
+20.12.2001     1.4.2 (interim)
+    - Various merges (but not all) from Darwin project.
+    - Minor man pages corrections.
+    - Support builds in the FreeBSD main tree.
+
+16.04.2001     1.4.1
+    - Kernel side of smbfs committed in the FreeBSD-current. It controlled
+      by following options: LIBMCHAIN, LIBICONV, NETSMB, NETSMBCRYPTO and SMBFS.
+    - Removed static dependency on the libiconv library, option WITH_ICONV
+      removed as well. If you use libiconv support, make sure that the latest
+      port is installed.
+    - Multiple mount/umount operations called in parallel can cause kernel
+      panic - fixed.
+    - Misc code cleanups.
+
+26.02.2001     1.3.6
+    - Names of some options is the config.mk.in file are changed. The old ones
+      are still supported.
+    - Synch with changes in the recent -current (you'll need kernel compiled
+      from sources at least as of Feb 24).
+    - In all previous versions of smbfs signals weren't properly masked,
+      which caused erratical behavior of some programs (ftp(1) for example).
+    - Mounted shares may become "frozen" (no timeout occurs) if server died or
+      disconnected for some reason - fixed.
+
+09.02.2001     1.3.5
+    - The user and server names was swapped in the "TreeConnect"
+      request (fixed by Jonathan Hanna).
+    - smb requester could cause a panic if there is no free mbufs - fixed.
+    - It is possible to use smbfs with devfs now, but it wasn't tested under
+      SMP. Also note that device permissions will be wrong, because devfs
+      do not allow passing of credentials to the cloning function.
+    - nsmbX device moved from the /dev/net directory to /dev directory.
+
+31.01.2001     1.3.4
+    - Maintance: synch with changes in the recent -current
+
+28.01.2001     1.3.3
+    - Connection handling engine rewritten in order to reduce number of
+      possible deadlocks during reconnect operations.
+    - Directory traversals should be faster on large directories.
+    - smbfs now can talk to the NetApp servers (thanks to Jonathan Hanna).
+    - smbfs.sh.sample script updated (ideas from Nikolai Saoukh).
+    - Minor bug fixes.
+
+19.11.2000     1.3.2
+    - synch with changes in the recent -current
+    - nail down a nasty bug which may cause incorrect values supplied as
+      domain name (reported by Harald Weis).
+    - There was a bug in the directory listing code which caused long directory
+      traversals to fail (reported by A G F Keahan).
+
+29.10.2000     1.3.1
+    - An attempt was made to get rid from the possible kernel stack overflow.
+    - Now connection will be restored properly under -stable.
+    NOTE: NT servers have an 'AutoDisconnect' feature which will drop client
+    connection after some time of idleing. smbfs will restore connection on
+    the next request, but one may wish to setup a cron job with a simple
+    'ls /ntmount' command.
+
+20.10.2000     1.3.0
+    - Network IO engine significantly reworked. Now it uses kernel threads
+      to implement 'smbiod' process which handles network traffic for each VC.
+      Previous model were incapable to serve large number of mount points and
+      didn't work well with intensive IO operations performed on a different
+      files on the same mount point. Special care was taken on better 
+      usage of MP systems.
+      Unfortunately, kernel threads aren't supported by FreeBSD 3.X and for
+      now it is excluded from the list of supported systems.
+    - Reduce overhead caused by using single hash table for each mount point.
+
+26.09.2000     1.2.8 (never released)
+    - More SMP related bugs are fixed.
+    - Make smbfs compatible with the Linux emulator.
+    - smbfs now known to work with IBM LanManager (special thanks to
+      Eugen Averin <mad%euinf.dp.ua@localhost>)
+    - Fix problem with files bigger than 2GB (reported by Lee McKenna)
+    - Please note that smbfs may not work properly with FreeBSD 3.X.
+
+16.08.2000     1.2.7
+    - Maintance: use better algorithm to detect SYSCTL_HANDLER_ARGS changes
+      to avoid compilation problems on various versions of FreeBSD.
+
+07.08.2000     1.2.6
+    - Fix iconv support, was broken in the 1.2.5
+    - Minor corrections to 'smbutil view' command.
+    - Fix kernel memory leak caused by two subsequent and identical
+      'smbutil login' commands.
+
+25.07.2000     1.2.5
+    - NetBIOS name resolver added. '-I' option still supported. WINS server
+      can be specified in the nsmbrc file (nbns variable). To use resolver
+      with Win9X machines you have to specify WINS server in the config file.
+
+12.07.2000     1.2.4
+    - Variable SRCTREE in the config.mk replaced with SYSDIR and should
+      point to the sys directory. '/usr/src/sys' for example.
+    - Correct problem with the keep-alive packets
+
+04.07.2000     1.2.3
+    - Killed some bugs related to the out-of-mbufs condition.
+    - new keyword 'addr' added to the config file to specify server address.
+    - Another attempt to make reconnection procedure more stable.
+
+21.06.2000     1.2.2
+    - Device handles wasn't freed under FreeBSD 3.4 - fixed.
+      Implement correct handling of multiple connections to the same NT
+      server (thanks to kit <kit.mitchell%team.xtra.co.nz@localhost>) for report.
+      More misc fixes for an NT servers.
+
+11.06.2000     1.2.1
+    - More bug fixes in the connection handling mechanism.
+      mount_smbfs(8) manpage has now proper description for an '-N' option.
+      smbutil supports new commands:
+       'print' - send file to the remote printer
+       'view'  - list shares available on the specified host
+       'login' - create permanent connection to remote host
+       'logout'- counterpart of 'login'
+       'crypt' - produce an encrypted password to store in the .nsmbrc file.
+
+01.06.2000     1.1.2
+    - Support for FreeBSD 3.4 added (see INSTALL file for details).
+      Add advisory locking support in order to make fcntl(2), flock(2)
+      system calls actually work on smbfs.
+      Few non-serious bugs fixed.
+
+16.05.2000     1.0.5
+    - fix authentication code, this caused troubles with NT server.
+      (Thanks to Neil Blakey-Milner and Andrew Zavjalov for testing)
+      Some documentation changes.
+
+14.05.2000     1.0.2
+    - first public release
+
+Boris Popov <bp%butya.kz@localhost>
diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/INSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/INSTALL        Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,68 @@
+    1. Building
+    ===========
+
+    Copy config.in file to the config.local and edit it for your needs. Build
+process requires kernel sources in order to compile KLD module. If you want
+to use encrypted passwords you'll need an src/sys/crypto directory (sys-crypto
+cvsup collection) because encryption process involves DES algorithm.
+
+    Note for FreeBSD-current: it have kernel module sources in the base
+tree and requires options LIBMCHAIN and LIBICONV included in the kernel
+config file. smbfs can be either compiled in the kernel or loaded as module.
+
+    If FreeBSD machine and SMB server uses different character sets you
+may consider install ports/converters/iconv package (version 2.0 required).
+
+    Type 'make' to compile.
+       
+    If you're running any previous version of smbfs, unmount all mounted
+shares and unload an old module via 'kldunload smbfs' command.
+
+
+    2. Installing
+    =============
+
+    'make install' command will copy compiled binaries to /usr/local/bin
+directory and KLD module into /modules directory.
+
+    If you're running smbfs for the first time, it is also necessary to
+run 'make makedev' command in order to create /dev/nsmb0 device.
+
+    3. Configuring
+    ==============
+
+    KLD module can be loaded either manually:
+    
+    kldload smbfs.ko
+
+ or via loader.conf(5) file:
+
+    smbfs_load="YES"
+
+    However it is not strictly necessary because mount_smbfs(8) command
+will load it automatically.
+
+    Copy ./examples/dot.nsmbrc file into your home directory with ./.nsmbrc
+name and edit it for your needs.
+
+
+    4. Running
+    ==========
+
+    Please read mount_smbfs man page to get overview of command options.
+
+    Here is a quick example:
+
+       mount_smbfs -I hostname //bp@myserver/myshare /mnt
+
+    If something goes wrong, please try to find a problem and, if it is a bug
+ send me detailed description or patch. Before complaining about a bug, please
+ check the same operations with smbclient program included in the Samba package.
+ 
+
+
+    5. Deinstalling
+    ===============
+
+    All files can be completly removed by typing 'make deinstall' in the 
+working directory.
diff -r e05c9a31332f -r e348e099fca2 dist/smbfs/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/smbfs/Makefile       Sun Feb 16 08:15:07 2003 +0000
@@ -0,0 +1,87 @@
+#      $Id: Makefile,v 1.1.1.1 2003/02/16 08:15:07 jdolecek Exp $
+#
+#      Valid targets:
+#      install         installs binaries and man pages
+#      deinstall       undo install (except man pages)
+#      install-src     copy .h files in /usr/local/include
+#      install-lib     copy lib files in /usr/lib
+#      deinstall-lib,
+#      deinstall-src   undo corresponding install-* target
+#      clean           cleanup source tree
+
+.if ${MACHINE_ARCH} != "i386"
+.      error "only IA32 machines supported"
+.endif



Home | Main Index | Thread Index | Old Index