Print this page
10150 smbd needs smatch fixes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/smbsrv/smbd/Makefile
+++ new/usr/src/cmd/smbsrv/smbd/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright 2014 Nexenta Systems, Inc. All rights reserved.
24 +# Copyright (c) 2018, Joyent, Inc.
24 25 #
25 26
26 27
27 28 PROG= smbd
28 29 OBJS= \
29 30 smbd_authsvc.o \
30 31 smbd_doorsvc.o \
31 32 smbd_join.o \
32 33 smbd_krb5lookup.o \
33 34 smbd_krb5ssp.o \
34 35 smbd_logon.o \
35 36 smbd_main.o \
36 37 smbd_nicmon.o \
37 38 smbd_ntlmssp.o \
38 39 smbd_pipesvc.o \
39 40 smbd_share_doorsvc.o \
40 41 smbd_spool.o \
41 42 smbd_syslog.o \
42 43 smbd_vss.o
43 44
44 45 SRCS= $(OBJS:%.o=%.c)
45 46
46 47 include ../../Makefile.cmd
47 48
48 49 MANIFEST= server.xml
49 50 SVCMETHOD= svc-smbd
50 51 LOGDLL= eventlog.dll
51 52
52 53 ROOTMANIFESTDIR = $(ROOTSVCSMB)
53 54 ROOTVARSMBDLLDIR = $(ROOTVARSMB)/cvol/windows/system32
54 55 ROOTVARSMBDLL= $(LOGDLL:%=$(ROOTVARSMBDLLDIR)/%)
55 56
56 57 $(ROOTMANIFEST):= FILEMODE = 0444
57 58 $(ROOTSVCMETHOD):= FILEMODE = 0555
58 59 $(ROOTVARSMBDLL):= FILEMODE = 0755
59 60
60 61 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
61 62 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
62 63
63 64 CFLAGS += $(CCVERBOSE)
64 65 CPPFLAGS += -D_IPP_PRIVATE_STRUCTURES
65 66 CPPFLAGS += -D_REENTRANT
66 67 CPPFLAGS += -Dsyslog=smb_syslog
67 68 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
68 69
69 70 # Should not have to do this, but the Kerberos includes are a mess.
70 71 CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5
71 72
73 +# needs work
74 +SMOFF += all_func_returns,deref_check
75 +
72 76 CSTD = $(CSTD_GNU99)
73 77 C99LMODE = -Xc99=%all
74 78
75 79 LDFLAGS += -R/usr/lib/smbsrv
76 80 LDLIBS += -L$(ROOT)/usr/lib/smbsrv
77 81 # prefer to keep libs ordered by dependence
78 82 LDLIBS += -lmlsvc -lmlrpc -lsmbns -lsmb -lsmbfs -lgss
79 83 LDLIBS += -lzfs -lbsm -lscf -lcmdutils -lsocket -lnsl -lumem
80 84 $(PROG) := LDLIBS += -lkrb5
81 85
82 86 $(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
83 87
84 88 ROOTSMBDDIR = $(ROOTLIB)/smbsrv
85 89 ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%)
86 90
87 91 FILEMODE = 0444
88 92 $(ROOTSMBDFILE):= FILEMODE = 0555
89 93
90 94 $(ROOTSMBDDIR)/%: %
91 95 $(INS.file)
92 96
93 97 $(ROOTVARSMBDLLDIR)/%: %
94 98 $(INS.file)
95 99
96 100 all: $(PROG)
97 101
98 102 clean:
99 103 $(RM) $(OBJS)
100 104
101 105 lint: lint_SRCS
102 106
103 107 $(PROG): $(OBJS)
104 108 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
105 109 $(POST_PROCESS)
106 110
107 111 check: $(CHKMANIFEST)
108 112
109 113 _msg:
110 114
111 115 include ../../Makefile.targ
112 116
113 117 install: all .WAIT $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
114 118 $(ROOTSMBDFILE) ${ROOTSVCMETHOD} $(ROOTVARSMBDLL)
115 119
116 120 .KEEP_STATE:
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX