Print this page
NEX-13644 File access audit logging
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-18380 Catch up with illumos SMB fix 9769
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
9769 SMB domain logon fails with I18N user name
9774 libmlrpc changes in 1575 missed some things
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Robert Mustacchi <rm@joyent.com>
NEX-17589 Get "too high" smbd error when copy big file to cifs share (redo)
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-17558 add mdb walker for smbd share cache
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
1575 untangle libmlrpc from SMB server
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-15554 make-smbsrv needs updates
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-15554 make-smbsrv needs updates
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-4083 Upstream changes from illumos 5917 and 5995
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-2702 want make-smbsrv clean to be more selective
OS-266 sync v8 mdb module to illumos-joyent f1ab5c2
NEX-1633 smb_open_attr_only() does not return true if READ_CONTROL is set
NEX-1810 extended security Kerberos (inbound)
NEX-1638 Updated DC Locator
 Includes work by: matt.barden@nexenta.com, kevin.crowe@nexenta.com
NEX-1456 Cannot receive incremental stream for dataset shared via SMB: destination dataset has been modified. part 1
SMB-153 Quota tab for the Share does not work
SMB-123 misleading log messages from smb_logon
SMB-113 Some dtrace scripts for SMB
SMB-95 improve smbsrv developer tools
SMB-11 SMB2 message parse & dispatch
SMB-12 SMB2 Negotiate Protocol
SMB-13 SMB2 Session Setup
SMB-14 SMB2 Logoff
SMB-15 SMB2 Tree Connect
SMB-16 SMB2 Tree Disconnect
SMB-17 SMB2 Create
SMB-18 SMB2 Close
SMB-19 SMB2 Flush
SMB-20 SMB2 Read
SMB-21 SMB2 Write
SMB-22 SMB2 Lock/Unlock
SMB-23 SMB2 Ioctl
SMB-24 SMB2 Cancel
SMB-25 SMB2 Echo
SMB-26 SMB2 Query Dir
SMB-27 SMB2 Change Notify
SMB-28 SMB2 Query Info
SMB-29 SMB2 Set Info
SMB-30 SMB2 Oplocks
SMB-53 SMB2 Create Context options
(SMB2 code review cleanup 1, 2, 3)
SMB-72 Improve startup/shudown debug features
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>
OS-3 Convenience scripts to build/clean smbsrv, zfs

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/quick/make-smbsrv
          +++ new/usr/src/tools/quick/make-smbsrv
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  # Common Development and Distribution License ("CDDL"), version 1.0.
   5    5  # You may only use this file in accordance with the terms of version
   6    6  # 1.0 of the CDDL.
   7    7  #
   8    8  # A full copy of the text of the CDDL should have accompanied this
   9    9  # source.  A copy of the CDDL is also available via the Internet at
  10   10  # http://www.illumos.org/license/CDDL.
  11   11  #
  12   12  
  13   13  #
  14      -# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       14 +# Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  15   15  #
  16   16  
  17      -# Use distributed make (dmake) by default.
  18      -make=${MAKE:-dmake}
       17 +# Use normal make (not dmake) by default.
       18 +make=${MAKE:-make}
  19   19  
  20   20  CLOSED_IS_PRESENT=no
  21   21  export CLOSED_IS_PRESENT
  22   22  
  23   23  # Do this if you want to use dbx or gdb
  24   24  # export SOURCEDEBUG=yes
  25   25  
  26   26  [ -n "$SRC" ] || {
  27   27    echo "SRC not set.  Run 'ws' or 'bldenv' first."
  28   28    exit 1
  29   29  }
  30   30  
  31   31  cpu=`uname -p`
  32   32  case $cpu in
  33   33  i386)
  34   34          x=intel
       35 +        kmdb_arch="amd64"
  35   36          mdb_arch="ia32 amd64"
  36   37          arch64=amd64
  37   38          ;;
  38   39  sparc)
  39   40          x=sparc
  40      -        mdb_arch=v9
       41 +        kmdb_arch=v9
       42 +        mdb_arch="v7 v9"
  41   43          arch64=sparcv9
  42   44          ;;
  43   45  *)  echo "Huh?" ; exit 1;;
  44   46  esac
  45   47  
  46   48  ################################################################
  47   49  
  48   50  build_tools() {
  49   51    test -f $SRC/tools/proto/root_i386-nd/opt/onbld/bin/genoffsets ||
  50   52      (cd $SRC/tools && $make install)
↓ open down ↓ 20 lines elided ↑ open up ↑
  71   73  then
  72   74    targ=install_h
  73   75  
  74   76    # Just the parts of "make sgs" we need, and
  75   77    # skip them if they appear to be done.
  76   78    # ... stuff under $SRC
  77   79    test -f $SRC/uts/common/sys/priv_names.h ||
  78   80      (cd $SRC/uts && $make -k all_h)
  79   81  
  80   82    test -f $SRC/head/rpcsvc/nispasswd.h ||
  81      -    (cd $SRC/head && $make -k install_h)
       83 +    (cd $SRC/head && $make -k $targ)
  82   84  
  83   85    # ... stuff under $ROOT (proto area)
  84   86    test -d $ROOT/usr/include/sys ||
  85   87      (cd $SRC && $make rootdirs)
  86   88    test -f $ROOT/usr/include/sys/types.h ||
  87      -    (cd $SRC/uts && $make -k install_h)
       89 +    (cd $SRC/uts && $make -k $targ)
  88   90    test -f $ROOT/usr/include/rpcsvc/daemon_utils.h ||
  89      -    (cd $SRC/head && $make install_h)
       91 +    (cd $SRC/head && $make $targ)
  90   92  
  91   93    # always update the smbsrv headers to be safe
  92      -  (cd $SRC/uts/common/gssapi && $make -k install_h)
  93      -  (cd $SRC/uts/common/sys && $make -k install_h)
  94      -  (cd $SRC/uts/common/smb && $make -k install_h)
  95      -  (cd $SRC/uts/common/smbsrv && $make -k install_h)
       94 +  (cd $SRC/uts/common/gssapi && $make -k $targ)
       95 +  (cd $SRC/uts/common/sys && $make -k $targ)
       96 +  (cd $SRC/uts/common/smb && $make -k $targ)
       97 +  (cd $SRC/uts/common/smbsrv && $make -k $targ)
       98 +  (cd $SRC/uts/common/c2 && $make -k $targ)
       99 +fi
  96  100  
      101 +if [ "$targ" = lint ]
      102 +then
      103 +  targ=check
      104 +  (cd $SRC/uts/common/smb && $make -k $targ)
      105 +  (cd $SRC/uts/common/smbsrv && $make -k $targ)
  97  106  fi
  98  107  
  99  108  # Need some library headers too...
 100  109  for lib in \
 101  110    libads \
 102  111    libbsm \
 103  112    libcmdutils \
 104  113    libcryptoutil \
 105  114    libdevid \
 106  115    libfakekernel \
 107  116    libgss \
 108      -  libkrb5 \
 109  117    libidmap \
      118 +  libkrb5 \
      119 +  libmlrpc \
 110  120    libpam \
 111  121    libsec \
 112  122    libscf \
 113  123    libshare \
 114  124    libsmbfs \
 115  125    libsqlite \
 116  126    libuutil \
      127 +  libzfs_core \
      128 +  libzfs \
 117  129    passwdutil \
      130 +  pkcs11 \
 118  131    smbsrv
 119  132  do
 120  133    (cd $SRC/lib/$lib && $make $targ)
 121  134  done
 122  135  }
 123  136  
 124  137  ################################################################
 125  138  
 126  139  do_kern() {
 127  140    case $1 in
↓ open down ↓ 27 lines elided ↑ open up ↑
 155  168  }
 156  169  
 157  170  # lib2 builds stuff we include in the tar file,
 158  171  # or that we don't mind rebuilding after clean.
 159  172  
 160  173  do_lib2() {
 161  174  
 162  175  for lib in \
 163  176    libfakekernel \
 164  177    libads \
 165      -  libsmbfs
      178 +  libsmbfs \
      179 +  libmlrpc
 166  180  do
 167  181    (cd $SRC/lib/$lib && $make $1)
 168  182  done
 169  183  
 170  184  (cd $SRC/lib/libshare && $make $1 PLUGINS=smb)
 171  185  (cd $SRC/lib/smbsrv && $make $1)
 172  186  (cd $SRC/lib/passwdutil && $make $1)
 173  187  (cd $SRC/lib/pam_modules/smb && $make $1)
 174  188  
 175  189  }
 176  190  
 177  191  ################################################################
 178  192  
 179  193  do_cmds() {
 180  194  
 181  195  case $1 in
 182  196  install)
 183  197    # mount programs need fslib.o
 184  198    (cd $SRC/cmd/fs.d && $make fslib.o)
 185      -  (cd $SRC/cmd/fs.d/smbclnt && $make $1 catalog)
 186  199    ;;
 187  200  clean|clobber)
 188      -  (cd $SRC/cmd/fs.d/smbclnt && $make $1)
 189  201    (cd $SRC/cmd/fs.d && $make ${1}_local)
 190  202    ;;
 191  203  esac
 192  204  
 193      -(cd $SRC/cmd/devfsadm && $make $1)
 194  205  (cd $SRC/cmd/smbsrv && $make $1)
 195  206  
 196  207  # Build the MDB modules, WITH the linktest
 197  208  (cd $SRC/cmd/mdb/tools && $make $1)
 198      -for a in $mdb_arch
      209 +
      210 +# kmdb_arch is 64-bit only
      211 +for a in $kmdb_arch
 199  212  do
 200  213    case $1 in
 201  214    install|lint)
 202  215      (cd $SRC/cmd/mdb/$x/$a/kmdb &&
 203  216          $make kmdb_modlinktest.o )
 204  217      ;;
 205  218    clean|clobber)
 206  219      (cd $SRC/cmd/mdb/$x/$a/kmdb &&
 207  220          $make -k $1 )
 208  221      ;;
 209  222    esac
 210      -
 211  223    (cd $SRC/cmd/mdb/$x/$a/nsmb &&
 212  224          $make $1 KMDB_LINKTEST_ENABLE= )
 213  225    (cd $SRC/cmd/mdb/$x/$a/smbfs &&
 214  226          $make $1 KMDB_LINKTEST_ENABLE= )
 215  227    (cd $SRC/cmd/mdb/$x/$a/smbsrv &&
 216  228          $make $1 KMDB_LINKTEST_ENABLE= )
 217      -  (cd $SRC/cmd/mdb/$x/$a/libfksmbsrv &&
 218      -        $make $1 KMDB_LINKTEST_ENABLE= )
 219      -
 220      -# We build these libraries (to the proto area), so we need to
 221      -# build the mdb modules too so mdb will load them.
 222      -  (cd $SRC/cmd/mdb/$x/$a/libcmdutils &&
 223      -        $make $1 )
 224      -  (cd $SRC/cmd/mdb/$x/$a/libavl &&
 225      -        $make $1 )
 226      -
 227  229  done
 228  230  
 229      -(cd $SRC/cmd/Adm/sun && $make $1)
      231 +# mdb_arch is both 32-bit & 64-bit
      232 +for a in $mdb_arch
      233 +do
      234 +  # We build these libraries (to the proto area), so we need to
      235 +  # build the mdb modules for all dependent libraries too.
 230  236  
 231      -# Deal with mode 0400 file annoyance...
 232      -# See usr/src/cmd/Adm/sun/Makefile
 233      -if [ $1 = install ]; then
 234      -  chmod a+r $ROOT/var/smb/smbpasswd
 235      -fi
      237 +  for lib in libfksmbsrv libmlsvc libcmdutils libavl
      238 +  do
      239 +    (cd $SRC/cmd/mdb/$x/$a/$lib && $make $1 )
      240 +
      241 +  done
      242 +done
 236  243  }
 237  244  
 238  245  
 239  246  ################################################################
 240  247  # This builds $SRC/TAGS (and cscope.files) in a helpful order.
 241  248  
 242  249  do_tags() {
 243  250          (cd $SRC ;
 244  251          find uts/common/sys -name '*.[ch]' -print |sort
 245  252          find uts/common/net -name '*.[ch]' -print |sort
 246  253          find uts/common/netinet -name '*.[ch]' -print |sort
 247  254          find uts/common/smb -name '*.[ch]' -print |sort
 248  255          find uts/common/smbsrv -name '*.ndl' -print |sort
 249  256          find uts/common/smbsrv -name '*.[ch]' -print |sort
 250  257          find uts/common/fs/smbsrv -name '*.[ch]' -print |sort
 251  258          find uts/common/gssapi -name '*.[ch]' -print |sort
      259 +        find common/smbsrv -name '*.[ch]' -print |sort
 252  260          find head -name '*.h' -print |sort
 253  261          find lib/smbsrv -name '*.[ch]' -print |sort
 254  262          find lib/libsmbfs -name '*.[ch]' -print |sort
      263 +        find lib/libmlrpc -name '*.ndl' -print |sort
      264 +        find lib/libmlrpc -name '*.[ch]' -print |sort
 255  265          find lib/libads -name '*.[ch]' -print |sort
 256  266          find lib/libgss -name '*.[ch]' -print |sort
 257  267          find cmd/smbsrv -name '*.[ch]' -print |sort
 258      -        find common/smbsrv -name '*.[ch]' -print |sort
 259  268          ) > $SRC/cscope.files
 260  269  
 261  270          (cd $SRC ;
 262  271          exctags -e --langmap=c:+.ndl -h ndl -L - < cscope.files
 263  272          cscope -b )
 264  273  }
 265  274  
 266  275  ################################################################
 267  276  # This creates a tarfile one can use to update a test machine.
 268  277  
 269  278  do_tar() {
 270  279          git_rev=`git rev-parse --short=8 HEAD`
 271  280          files="
 272  281  lib/svc/manifest/network/smb/server.xml
 273  282  usr/kernel/drv/$arch64/smbsrv
 274      -usr/kernel/drv/smbsrv
 275  283  usr/kernel/kmdb/$arch64/smbsrv
 276      -usr/kernel/kmdb/smbsrv
 277  284  usr/lib/fs/smb/$arch64/libshare_smb.so.1
 278  285  usr/lib/fs/smb/libshare_smb.so.1
 279  286  usr/lib/libsmbfs.so.1
 280  287  usr/lib/mdb/kvm/$arch64/smbsrv.so
 281  288  usr/lib/mdb/kvm/smbsrv.so
      289 +usr/lib/mdb/proc/libmlsvc.so
 282  290  usr/lib/reparse/libreparse_smb.so.1
 283  291  usr/lib/security/pam_smb_passwd.so.1
 284  292  usr/lib/smbsrv/dtrace
 285      -usr/lib/smbsrv/libmlrpc.so.1
      293 +usr/lib/libmlrpc.so.2
 286  294  usr/lib/smbsrv/libmlsvc.so.1
 287  295  usr/lib/smbsrv/libsmb.so.1
 288  296  usr/lib/smbsrv/libsmbns.so.1
      297 +usr/lib/smbsrv/nvlprint
 289  298  usr/lib/smbsrv/smbd
 290      -usr/sbin/devfsadm
 291  299  usr/sbin/smbadm
 292  300  usr/sbin/smbstat
 293  301  "
 294  302  
 295  303          (cd $ROOT && tar cfj ../../smbsrv-${git_rev}.tar.bz2 $files)
 296  304  }
 297  305  
 298  306  ################################################################
 299  307  
 300  308  if [ "$1" = "" ]; then
↓ open down ↓ 8 lines elided ↑ open up ↑
 309  317    install)
 310  318      build_tools
 311  319      set -e
 312  320      do_hdrs $arg
 313  321      do_kern $arg
 314  322      do_lib1 $arg
 315  323      do_lib2 $arg
 316  324      do_cmds $arg
 317  325      ;;
 318  326    lint)
      327 +    do_hdrs $arg
 319  328      do_kern $arg
 320  329      do_lib1 $arg
 321  330      do_lib2 $arg
 322  331      do_cmds $arg
 323  332      ;;
 324  333    clean)
 325  334      # intentionally skip: lib1, hdrs, tools
 326  335      do_cmds $arg
 327  336      do_lib2 $arg
 328  337      do_kern $arg
↓ open down ↓ 21 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX