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
        
@@ -9,15 +9,15 @@
 # source.  A copy of the CDDL is also available via the Internet at
 # http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
 #
 
-# Use distributed make (dmake) by default.
-make=${MAKE:-dmake}
+# Use normal make (not dmake) by default.
+make=${MAKE:-make}
 
 CLOSED_IS_PRESENT=no
 export CLOSED_IS_PRESENT
 
 # Do this if you want to use dbx or gdb
@@ -30,16 +30,18 @@
 
 cpu=`uname -p`
 case $cpu in
 i386)
         x=intel
+        kmdb_arch="amd64"
         mdb_arch="ia32 amd64"
         arch64=amd64
         ;;
 sparc)
         x=sparc
-        mdb_arch=v9
+        kmdb_arch=v9
+        mdb_arch="v7 v9"
         arch64=sparcv9
         ;;
 *)  echo "Huh?" ; exit 1;;
 esac
 
@@ -76,26 +78,33 @@
   # ... stuff under $SRC
   test -f $SRC/uts/common/sys/priv_names.h ||
     (cd $SRC/uts && $make -k all_h)
 
   test -f $SRC/head/rpcsvc/nispasswd.h ||
-    (cd $SRC/head && $make -k install_h)
+    (cd $SRC/head && $make -k $targ)
 
   # ... stuff under $ROOT (proto area)
   test -d $ROOT/usr/include/sys ||
     (cd $SRC && $make rootdirs)
   test -f $ROOT/usr/include/sys/types.h ||
-    (cd $SRC/uts && $make -k install_h)
+    (cd $SRC/uts && $make -k $targ)
   test -f $ROOT/usr/include/rpcsvc/daemon_utils.h ||
-    (cd $SRC/head && $make install_h)
+    (cd $SRC/head && $make $targ)
 
   # always update the smbsrv headers to be safe
-  (cd $SRC/uts/common/gssapi && $make -k install_h)
-  (cd $SRC/uts/common/sys && $make -k install_h)
-  (cd $SRC/uts/common/smb && $make -k install_h)
-  (cd $SRC/uts/common/smbsrv && $make -k install_h)
+  (cd $SRC/uts/common/gssapi && $make -k $targ)
+  (cd $SRC/uts/common/sys && $make -k $targ)
+  (cd $SRC/uts/common/smb && $make -k $targ)
+  (cd $SRC/uts/common/smbsrv && $make -k $targ)
+  (cd $SRC/uts/common/c2 && $make -k $targ)
+fi
 
+if [ "$targ" = lint ]
+then
+  targ=check
+  (cd $SRC/uts/common/smb && $make -k $targ)
+  (cd $SRC/uts/common/smbsrv && $make -k $targ)
 fi
 
 # Need some library headers too...
 for lib in \
   libads \
@@ -103,20 +112,24 @@
   libcmdutils \
   libcryptoutil \
   libdevid \
   libfakekernel \
   libgss \
-  libkrb5 \
   libidmap \
+  libkrb5 \
+  libmlrpc \
   libpam \
   libsec \
   libscf \
   libshare \
   libsmbfs \
   libsqlite \
   libuutil \
+  libzfs_core \
+  libzfs \
   passwdutil \
+  pkcs11 \
   smbsrv
 do
   (cd $SRC/lib/$lib && $make $targ)
 done
 }
@@ -160,11 +173,12 @@
 do_lib2() {
 
 for lib in \
   libfakekernel \
   libads \
-  libsmbfs
+  libsmbfs \
+  libmlrpc
 do
   (cd $SRC/lib/$lib && $make $1)
 done
 
 (cd $SRC/lib/libshare && $make $1 PLUGINS=smb)
@@ -180,24 +194,23 @@
 
 case $1 in
 install)
   # mount programs need fslib.o
   (cd $SRC/cmd/fs.d && $make fslib.o)
-  (cd $SRC/cmd/fs.d/smbclnt && $make $1 catalog)
   ;;
 clean|clobber)
-  (cd $SRC/cmd/fs.d/smbclnt && $make $1)
   (cd $SRC/cmd/fs.d && $make ${1}_local)
   ;;
 esac
 
-(cd $SRC/cmd/devfsadm && $make $1)
 (cd $SRC/cmd/smbsrv && $make $1)
 
 # Build the MDB modules, WITH the linktest
 (cd $SRC/cmd/mdb/tools && $make $1)
-for a in $mdb_arch
+
+# kmdb_arch is 64-bit only
+for a in $kmdb_arch
 do
   case $1 in
   install|lint)
     (cd $SRC/cmd/mdb/$x/$a/kmdb &&
         $make kmdb_modlinktest.o )
@@ -205,36 +218,30 @@
   clean|clobber)
     (cd $SRC/cmd/mdb/$x/$a/kmdb &&
         $make -k $1 )
     ;;
   esac
-
   (cd $SRC/cmd/mdb/$x/$a/nsmb &&
         $make $1 KMDB_LINKTEST_ENABLE= )
   (cd $SRC/cmd/mdb/$x/$a/smbfs &&
         $make $1 KMDB_LINKTEST_ENABLE= )
   (cd $SRC/cmd/mdb/$x/$a/smbsrv &&
         $make $1 KMDB_LINKTEST_ENABLE= )
-  (cd $SRC/cmd/mdb/$x/$a/libfksmbsrv &&
-        $make $1 KMDB_LINKTEST_ENABLE= )
-
-# We build these libraries (to the proto area), so we need to
-# build the mdb modules too so mdb will load them.
-  (cd $SRC/cmd/mdb/$x/$a/libcmdutils &&
-        $make $1 )
-  (cd $SRC/cmd/mdb/$x/$a/libavl &&
-        $make $1 )
-
 done
 
-(cd $SRC/cmd/Adm/sun && $make $1)
+# mdb_arch is both 32-bit & 64-bit
+for a in $mdb_arch
+do
+  # We build these libraries (to the proto area), so we need to
+  # build the mdb modules for all dependent libraries too.
 
-# Deal with mode 0400 file annoyance...
-# See usr/src/cmd/Adm/sun/Makefile
-if [ $1 = install ]; then
-  chmod a+r $ROOT/var/smb/smbpasswd
-fi
+  for lib in libfksmbsrv libmlsvc libcmdutils libavl
+  do
+    (cd $SRC/cmd/mdb/$x/$a/$lib && $make $1 )
+
+  done
+done
 }
 
 
 ################################################################
 # This builds $SRC/TAGS (and cscope.files) in a helpful order.
@@ -247,17 +254,19 @@
         find uts/common/smb -name '*.[ch]' -print |sort
         find uts/common/smbsrv -name '*.ndl' -print |sort
         find uts/common/smbsrv -name '*.[ch]' -print |sort
         find uts/common/fs/smbsrv -name '*.[ch]' -print |sort
         find uts/common/gssapi -name '*.[ch]' -print |sort
+        find common/smbsrv -name '*.[ch]' -print |sort
         find head -name '*.h' -print |sort
         find lib/smbsrv -name '*.[ch]' -print |sort
         find lib/libsmbfs -name '*.[ch]' -print |sort
+        find lib/libmlrpc -name '*.ndl' -print |sort
+        find lib/libmlrpc -name '*.[ch]' -print |sort
         find lib/libads -name '*.[ch]' -print |sort
         find lib/libgss -name '*.[ch]' -print |sort
         find cmd/smbsrv -name '*.[ch]' -print |sort
-        find common/smbsrv -name '*.[ch]' -print |sort
         ) > $SRC/cscope.files
 
         (cd $SRC ;
         exctags -e --langmap=c:+.ndl -h ndl -L - < cscope.files
         cscope -b )
@@ -269,27 +278,26 @@
 do_tar() {
         git_rev=`git rev-parse --short=8 HEAD`
         files="
 lib/svc/manifest/network/smb/server.xml
 usr/kernel/drv/$arch64/smbsrv
-usr/kernel/drv/smbsrv
 usr/kernel/kmdb/$arch64/smbsrv
-usr/kernel/kmdb/smbsrv
 usr/lib/fs/smb/$arch64/libshare_smb.so.1
 usr/lib/fs/smb/libshare_smb.so.1
 usr/lib/libsmbfs.so.1
 usr/lib/mdb/kvm/$arch64/smbsrv.so
 usr/lib/mdb/kvm/smbsrv.so
+usr/lib/mdb/proc/libmlsvc.so
 usr/lib/reparse/libreparse_smb.so.1
 usr/lib/security/pam_smb_passwd.so.1
 usr/lib/smbsrv/dtrace
-usr/lib/smbsrv/libmlrpc.so.1
+usr/lib/libmlrpc.so.2
 usr/lib/smbsrv/libmlsvc.so.1
 usr/lib/smbsrv/libsmb.so.1
 usr/lib/smbsrv/libsmbns.so.1
+usr/lib/smbsrv/nvlprint
 usr/lib/smbsrv/smbd
-usr/sbin/devfsadm
 usr/sbin/smbadm
 usr/sbin/smbstat
 "
 
         (cd $ROOT && tar cfj ../../smbsrv-${git_rev}.tar.bz2 $files)
@@ -314,10 +322,11 @@
     do_lib1 $arg
     do_lib2 $arg
     do_cmds $arg
     ;;
   lint)
+    do_hdrs $arg
     do_kern $arg
     do_lib1 $arg
     do_lib2 $arg
     do_cmds $arg
     ;;