Print this page
10150 smbd needs smatch fixes


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2014 Nexenta Systems, Inc.  All rights reserved.

  24 #
  25 
  26 
  27 PROG=   smbd
  28 OBJS=                           \
  29         smbd_authsvc.o          \
  30         smbd_doorsvc.o          \
  31         smbd_join.o             \
  32         smbd_krb5lookup.o       \
  33         smbd_krb5ssp.o          \
  34         smbd_logon.o            \
  35         smbd_main.o             \
  36         smbd_nicmon.o           \
  37         smbd_ntlmssp.o          \
  38         smbd_pipesvc.o          \
  39         smbd_share_doorsvc.o    \
  40         smbd_spool.o            \
  41         smbd_syslog.o           \
  42         smbd_vss.o
  43 


  52 ROOTMANIFESTDIR = $(ROOTSVCSMB)
  53 ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
  54 ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
  55 
  56 $(ROOTMANIFEST):= FILEMODE = 0444
  57 $(ROOTSVCMETHOD):= FILEMODE = 0555
  58 $(ROOTVARSMBDLL):= FILEMODE = 0755
  59 
  60 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
  61 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
  62 
  63 CFLAGS += $(CCVERBOSE)
  64 CPPFLAGS += -D_IPP_PRIVATE_STRUCTURES
  65 CPPFLAGS += -D_REENTRANT
  66 CPPFLAGS += -Dsyslog=smb_syslog
  67 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
  68 
  69 # Should not have to do this, but the Kerberos includes are a mess.
  70 CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5
  71 



  72 CSTD =       $(CSTD_GNU99)
  73 C99LMODE =      -Xc99=%all
  74 
  75 LDFLAGS += -R/usr/lib/smbsrv
  76 LDLIBS += -L$(ROOT)/usr/lib/smbsrv
  77 # prefer to keep libs ordered by dependence
  78 LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss
  79 LDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem
  80 $(PROG) := LDLIBS += -lkrb5
  81 
  82 $(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
  83 
  84 ROOTSMBDDIR = $(ROOTLIB)/smbsrv
  85 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
  86 
  87 FILEMODE = 0444
  88 $(ROOTSMBDFILE):= FILEMODE = 0555
  89 
  90 $(ROOTSMBDDIR)/%: %
  91         $(INS.file)




   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  24 # Copyright (c) 2018, Joyent, Inc.
  25 #
  26 
  27 
  28 PROG=   smbd
  29 OBJS=                           \
  30         smbd_authsvc.o          \
  31         smbd_doorsvc.o          \
  32         smbd_join.o             \
  33         smbd_krb5lookup.o       \
  34         smbd_krb5ssp.o          \
  35         smbd_logon.o            \
  36         smbd_main.o             \
  37         smbd_nicmon.o           \
  38         smbd_ntlmssp.o          \
  39         smbd_pipesvc.o          \
  40         smbd_share_doorsvc.o    \
  41         smbd_spool.o            \
  42         smbd_syslog.o           \
  43         smbd_vss.o
  44 


  53 ROOTMANIFESTDIR = $(ROOTSVCSMB)
  54 ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
  55 ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
  56 
  57 $(ROOTMANIFEST):= FILEMODE = 0444
  58 $(ROOTSVCMETHOD):= FILEMODE = 0555
  59 $(ROOTVARSMBDLL):= FILEMODE = 0755
  60 
  61 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
  62 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
  63 
  64 CFLAGS += $(CCVERBOSE)
  65 CPPFLAGS += -D_IPP_PRIVATE_STRUCTURES
  66 CPPFLAGS += -D_REENTRANT
  67 CPPFLAGS += -Dsyslog=smb_syslog
  68 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
  69 
  70 # Should not have to do this, but the Kerberos includes are a mess.
  71 CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5
  72 
  73 # needs work
  74 SMOFF += all_func_returns,deref_check
  75 
  76 CSTD =       $(CSTD_GNU99)
  77 C99LMODE =      -Xc99=%all
  78 
  79 LDFLAGS += -R/usr/lib/smbsrv
  80 LDLIBS += -L$(ROOT)/usr/lib/smbsrv
  81 # prefer to keep libs ordered by dependence
  82 LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss
  83 LDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem
  84 $(PROG) := LDLIBS += -lkrb5
  85 
  86 $(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
  87 
  88 ROOTSMBDDIR = $(ROOTLIB)/smbsrv
  89 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
  90 
  91 FILEMODE = 0444
  92 $(ROOTSMBDFILE):= FILEMODE = 0555
  93 
  94 $(ROOTSMBDDIR)/%: %
  95         $(INS.file)