Source-Changes-HG archive

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

[src/trunk]: src/sys remove SMBFS and nsmb(4) - kernel part



details:   https://anonhg.NetBSD.org/src/rev/d7ca6c3de3d3
branches:  trunk
changeset: 970807:d7ca6c3de3d3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Apr 04 15:43:21 2020 +0000

description:
remove SMBFS and nsmb(4) - kernel part

it's unmaintained and supports only obsolete SMB1

diffstat:

 sys/Makefile                                  |     4 +-
 sys/conf/files                                |     3 +-
 sys/conf/filesystems.config                   |     4 +-
 sys/fs/Makefile                               |     4 +-
 sys/fs/smbfs/Makefile                         |     7 -
 sys/fs/smbfs/files.smbfs                      |    12 -
 sys/fs/smbfs/smbfs.h                          |   101 -
 sys/fs/smbfs/smbfs_io.c                       |   450 ------
 sys/fs/smbfs/smbfs_kq.c                       |   550 --------
 sys/fs/smbfs/smbfs_node.c                     |   404 ------
 sys/fs/smbfs/smbfs_node.h                     |   109 -
 sys/fs/smbfs/smbfs_smb.c                      |  1645 -------------------------
 sys/fs/smbfs/smbfs_subr.c                     |   354 -----
 sys/fs/smbfs/smbfs_subr.h                     |   189 --
 sys/fs/smbfs/smbfs_vfsops.c                   |   457 ------
 sys/fs/smbfs/smbfs_vnops.c                    |  1374 --------------------
 sys/modules/Makefile                          |     3 +-
 sys/modules/smbfs/Makefile                    |    13 -
 sys/netsmb/Makefile                           |     7 -
 sys/netsmb/files.netsmb                       |    16 -
 sys/netsmb/iconv.c                            |   112 -
 sys/netsmb/iconv.h                            |   113 -
 sys/netsmb/mchain.h                           |   116 -
 sys/netsmb/netbios.h                          |   135 --
 sys/netsmb/smb.h                              |   530 --------
 sys/netsmb/smb_conn.c                         |   973 --------------
 sys/netsmb/smb_conn.h                         |   470 -------
 sys/netsmb/smb_crypt.c                        |   152 --
 sys/netsmb/smb_dev.c                          |   453 ------
 sys/netsmb/smb_dev.h                          |   199 ---
 sys/netsmb/smb_iod.c                          |   747 -----------
 sys/netsmb/smb_rq.c                           |   787 -----------
 sys/netsmb/smb_rq.h                           |   157 --
 sys/netsmb/smb_smb.c                          |   949 --------------
 sys/netsmb/smb_subr.c                         |   406 ------
 sys/netsmb/smb_subr.h                         |   133 --
 sys/netsmb/smb_tran.h                         |    95 -
 sys/netsmb/smb_trantcp.c                      |   680 ----------
 sys/netsmb/smb_trantcp.h                      |   102 -
 sys/netsmb/smb_usr.c                          |   359 -----
 sys/netsmb/subr_mchain.c                      |   614 ---------
 sys/rump/dev/lib/libnetsmb/Makefile           |    21 -
 sys/rump/dev/lib/libnetsmb/NETSMB.ioconf      |     8 -
 sys/rump/dev/lib/libnetsmb/netsmb_component.c |    59 -
 sys/rump/dev/lib/libnetsmb/netsmb_iconv.c     |    79 -
 sys/rump/dev/lib/libnetsmb/netsmb_user.c      |   105 -
 sys/rump/dev/lib/libnetsmb/netsmb_user.h      |    31 -
 sys/rump/fs/Makefile.rumpfscomp               |     4 +-
 sys/rump/fs/lib/libsmbfs/Makefile             |    13 -
 49 files changed, 9 insertions(+), 14299 deletions(-)

diffs (truncated from 14554 to 300 lines):

diff -r be19f5147a02 -r d7ca6c3de3d3 sys/Makefile
--- a/sys/Makefile      Sat Apr 04 15:39:13 2020 +0000
+++ b/sys/Makefile      Sat Apr 04 15:43:21 2020 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile,v 1.84 2019/06/17 17:01:50 sevan Exp $
+#      $NetBSD: Makefile,v 1.85 2020/04/04 15:43:21 jdolecek Exp $
 
 .include <bsd.own.mk>
 
 SUBDIR=        altq arch compat dev fs miscfs \
        net net80211 netatalk netbt netcan netipsec netinet netinet6 \
-        netmpls netsmb \
+        netmpls \
        nfs opencrypto sys ufs uvm
 
 .if make(obj) || make(cleandir) || ${MKKMOD} != "no"
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/conf/files
--- a/sys/conf/files    Sat Apr 04 15:39:13 2020 +0000
+++ b/sys/conf/files    Sat Apr 04 15:43:21 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1262 2020/03/31 03:42:10 nisimura Exp $
+#      $NetBSD: files,v 1.1263 2020/04/04 15:43:22 jdolecek Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20171118
@@ -1499,7 +1499,6 @@
 include "fs/ptyfs/files.ptyfs"
 include "fs/puffs/files.puffs"
 include "fs/udf/files.udf"
-include "fs/smbfs/files.smbfs"
 include "fs/sysvbfs/files.sysvbfs"
 include "fs/tmpfs/files.tmpfs"
 include "fs/union/files.union"
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/conf/filesystems.config
--- a/sys/conf/filesystems.config       Sat Apr 04 15:39:13 2020 +0000
+++ b/sys/conf/filesystems.config       Sat Apr 04 15:43:21 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: filesystems.config,v 1.13 2019/06/17 17:06:39 christos Exp $
+# $NetBSD: filesystems.config,v 1.14 2020/04/04 15:43:22 jdolecek Exp $
 #file-system   ADOSFS          # AmigaDOS-compatible file system
 #options       APPLE_UFS       # Apple UFS support in FFS
 #file-system   AUTOFS          # Automounter Filesystem
@@ -26,8 +26,6 @@
 file-system    PTYFS           # /dev/ptm support
 file-system    PUFFS           # Userspace file systems (e.g. ntfs-3g & sshfs)
 pseudo-device  putter          # for puffs and pud
-file-system    SMBFS           # experimental - CIFS; also needs nsmb (below)
-pseudo-device  nsmb            # experimental - SMB requester
 #file-system   SYSVBFS         # sysvfs
 file-system    TMPFS           # Efficient memory file-system
 #file-system   UDF             # experimental - OSTA UDF CD/DVD file-system
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/fs/Makefile
--- a/sys/fs/Makefile   Sat Apr 04 15:39:13 2020 +0000
+++ b/sys/fs/Makefile   Sat Apr 04 15:43:21 2020 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.21 2018/01/09 03:31:13 christos Exp $
+#      $NetBSD: Makefile,v 1.22 2020/04/04 15:43:21 jdolecek Exp $
 
 SUBDIR=        adosfs autofs cd9660 efs filecorefs hfs msdosfs nilfs ntfs ptyfs \
-       puffs smbfs sysvbfs tmpfs udf union v7fs
+       puffs sysvbfs tmpfs udf union v7fs
 
 .include <bsd.kinc.mk>
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/fs/smbfs/Makefile
--- a/sys/fs/smbfs/Makefile     Sat Apr 04 15:39:13 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#      $NetBSD: Makefile,v 1.3 2009/09/03 12:04:50 pooka Exp $
-
-INCSDIR= /usr/include/fs/smbfs
-
-INCS=  smbfs.h
-
-.include <bsd.kinc.mk>
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/fs/smbfs/files.smbfs
--- a/sys/fs/smbfs/files.smbfs  Sat Apr 04 15:39:13 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#      $NetBSD: files.smbfs,v 1.3 2014/10/11 06:42:19 uebayasi Exp $
-
-deffs  SMBFS
-
-define smbfs: vfs
-file   fs/smbfs/smbfs_io.c             smbfs
-file   fs/smbfs/smbfs_kq.c             smbfs
-file   fs/smbfs/smbfs_node.c           smbfs
-file   fs/smbfs/smbfs_smb.c            smbfs
-file   fs/smbfs/smbfs_subr.c           smbfs
-file   fs/smbfs/smbfs_vfsops.c         smbfs
-file   fs/smbfs/smbfs_vnops.c          smbfs
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/fs/smbfs/smbfs.h
--- a/sys/fs/smbfs/smbfs.h      Sat Apr 04 15:39:13 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*     $NetBSD: smbfs.h,v 1.18 2014/12/21 10:48:53 hannken Exp $       */
-
-/*
- * 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.
- *
- * FreeBSD: src/sys/fs/smbfs/smbfs.h,v 1.3 2001/12/02 08:56:58 bp Exp
- */
-#ifndef _FS_SMBFS_SMBFS_H_
-#define _FS_SMBFS_SMBFS_H_
-
-#define SMBFS_VERMAJ   1
-#define SMBFS_VERMIN   1013
-#define SMBFS_VERSION  (SMBFS_VERMAJ*100000 + SMBFS_VERMIN)
-#define        SMBFS_VFSNAME   "smbfs"
-
-/* Values for flags */
-#define SMBFS_MOUNT_SOFT       0x0001
-#define SMBFS_MOUNT_INTR       0x0002
-#define SMBFS_MOUNT_STRONG     0x0004
-#define        SMBFS_MOUNT_HAVE_NLS    0x0008
-#define        SMBFS_MOUNT_NO_LONG     0x0010
-
-#define        SMBFS_MAXPATHCOMP       256     /* maximum number of path components */
-
-
-/* Layout of the mount control block for a netware file system. */
-struct smbfs_args {
-       int             version;
-       int             dev_fd;         /* descriptor of open nsmb device */
-       u_int           flags;
-       uid_t           uid;
-       gid_t           gid;
-       mode_t          file_mode;
-       mode_t          dir_mode;
-       int             caseopt;
-};
-
-#ifdef _KERNEL
-
-struct smbnode;
-struct smb_share;
-struct u_cred;
-struct vop_ioctl_args;
-struct buf;
-struct pool;
-
-struct smbmount {
-       struct smbfs_args       sm_args;
-       struct mount *          sm_mp;
-       struct smbnode *        sm_root;
-       kauth_cred_t            sm_owner;
-       int                     sm_flags;
-       long                    sm_nextino;
-       struct smb_share *      sm_share;
-       struct smbnode *        sm_npstack[SMBFS_MAXPATHCOMP];
-       int                     sm_caseopt;
-       int                     sm_didrele;
-};
-
-#define VFSTOSMBFS(mp)         ((struct smbmount *)((mp)->mnt_data))
-#define SMBFSTOVFS(smp)                ((struct mount *)((smp)->sm_mp))
-#define VTOVFS(vp)             ((vp)->v_mount)
-#define        VTOSMBFS(vp)            (VFSTOSMBFS(VTOVFS(vp)))
-
-int smbfs_doio(struct buf *, kauth_cred_t, struct lwp *);
-int smbfs_vinvalbuf(struct vnode *, int, kauth_cred_t, struct lwp *, int);
-int smbfs_kqfilter(void *);
-
-extern struct pool smbfs_node_pool;
-
-#endif /* KERNEL */
-
-#endif /* _FS_SMBFS_SMBFS_H_ */
diff -r be19f5147a02 -r d7ca6c3de3d3 sys/fs/smbfs/smbfs_io.c
--- a/sys/fs/smbfs/smbfs_io.c   Sat Apr 04 15:39:13 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,450 +0,0 @@
-/*     $NetBSD: smbfs_io.c,v 1.34 2010/04/23 15:38:47 pooka Exp $      */
-
-/*
- * 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.
- *
- * FreeBSD: src/sys/fs/smbfs/smbfs_io.c,v 1.7 2001/12/02 08:56:58 bp Exp
- *
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbfs_io.c,v 1.34 2010/04/23 15:38:47 pooka Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/resourcevar.h>   /* defines plimit structure in proc struct */
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/fcntl.h>
-#include <sys/buf.h>
-#include <sys/mount.h>
-#include <sys/malloc.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/dirent.h>
-#include <sys/signalvar.h>
-#include <sys/sysctl.h>
-#include <sys/vmmeter.h>
-#include <sys/kauth.h>
-
-#ifndef __NetBSD__
-#include <vm/vm.h>
-#if __FreeBSD_version < 400000
-#include <vm/vm_prot.h>
-#endif
-#include <vm/vm_page.h>
-#include <vm/vm_extern.h>
-#include <vm/vm_object.h>
-#include <vm/vm_pager.h>
-#include <vm/vnode_pager.h>
-#else /* __NetBSD__ */
-#include <uvm/uvm.h>
-#include <uvm/uvm_extern.h>
-#endif /* __NetBSD__ */
-
-/*
-#include <sys/ioccom.h>
-*/
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_subr.h>
-
-#include <fs/smbfs/smbfs.h>
-#include <fs/smbfs/smbfs_node.h>
-#include <fs/smbfs/smbfs_subr.h>
-
-/*#define SMBFS_RWGENERIC*/
-
-#define DE_SIZE        (sizeof(struct dirent))
-
-static int
-smbfs_readvdir(struct vnode *vp, struct uio *uio, kauth_cred_t cred)
-{
-       struct dirent *de;
-       struct smb_cred scred;
-       struct smbfs_fctx *ctx;
-       struct smbnode *np = VTOSMB(vp);
-       int error = 0/*, *eofflag = ap->a_eofflag*/;
-       long offset, limit;
-
-       KASSERT(vp->v_type == VDIR);
-
-       if (uio->uio_resid < DE_SIZE || uio->uio_offset < 0)
-               return EINVAL;



Home | Main Index | Thread Index | Old Index