libtommath: Fix possible integer overflow CVE-2023-36328
[heimdal.git] / lib / kadm5 / NTMakefile
blob9357a7fa1fe0a55af6c73ecb2cf4f4c0133522a7
1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
4 # All rights reserved.
5
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9
10 # - Redistributions of source code must retain the above copyright
11 #   notice, this list of conditions and the following disclaimer.
12
13 # - Redistributions in binary form must reproduce the above copyright
14 #   notice, this list of conditions and the following disclaimer in
15 #   the documentation and/or other materials provided with the
16 #   distribution.
17
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
30
32 RELDIR=lib\kadm5 
34 !include ../../windows/NTMakefile.w32 
36 dist_libkadm5clnt_la_SOURCES =  \
37         ad.c                    \
38         chpass_c.c              \
39         client_glue.c           \
40         common_glue.c           \
41         create_c.c              \
42         delete_c.c              \
43         destroy_c.c             \
44         flush_c.c               \
45         free.c                  \
46         get_c.c                 \
47         get_princs_c.c          \
48         init_c.c                \
49         kadm5_locl.h            \
50         marshall.c              \
51         modify_c.c              \
52         private.h               \
53         privs_c.c               \
54         prune_c.c               \
55         randkey_c.c             \
56         rename_c.c              \
57         send_recv.c             \
58         kadm5-pwcheck.h         \
59         admin.h                 \
60         kadm5-hook.h
62 dist_libkadm5srv_la_SOURCES =   \
63         acl.c                   \
64         admin.h                 \
65         bump_pw_expire.c        \
66         chpass_s.c              \
67         common_glue.c           \
68         context_s.c             \
69         create_s.c              \
70         delete_s.c              \
71         destroy_s.c             \
72         ent_setup.c             \
73         error.c                 \
74         flush_s.c               \
75         free.c                  \
76         get_princs_s.c          \
77         get_s.c                 \
78         init_s.c                \
79         kadm5_locl.h            \
80         keys.c                  \
81         log.c                   \
82         marshall.c              \
83         modify_s.c              \
84         password_quality.c      \
85         private.h               \
86         privs_s.c               \
87         prune_s.c               \
88         randkey_s.c             \
89         rename_s.c              \
90         server_glue.c           \
91         server_hooks.c          \
92         set_keys.c              \
93         setkey3_s.c             \
94         set_modifier.c          \
95         kadm5-pwcheck.h         \
96         admin.h                 \
97         kadm5-hook.h
99 LIBKADM5CLNT_OBJS=                  \
100         $(OBJ)\ad.obj               \
101         $(OBJ)\chpass_c.obj         \
102         $(OBJ)\client_glue.obj      \
103         $(OBJ)\common_glue.obj      \
104         $(OBJ)\create_c.obj         \
105         $(OBJ)\delete_c.obj         \
106         $(OBJ)\destroy_c.obj        \
107         $(OBJ)\flush_c.obj          \
108         $(OBJ)\free.obj             \
109         $(OBJ)\get_c.obj            \
110         $(OBJ)\get_princs_c.obj     \
111         $(OBJ)\init_c.obj           \
112         $(OBJ)\marshall.obj         \
113         $(OBJ)\modify_c.obj         \
114         $(OBJ)\privs_c.obj          \
115         $(OBJ)\prune_c.obj          \
116         $(OBJ)\randkey_c.obj        \
117         $(OBJ)\rename_c.obj         \
118         $(OBJ)\send_recv.obj        \
119         $(OBJ)\kadm5_err.obj
121 LIBKADM5SRV_OBJS=                   \
122         $(OBJ)\acl.obj              \
123         $(OBJ)\bump_pw_expire.obj   \
124         $(OBJ)\chpass_s.obj         \
125         $(OBJ)\common_glue.obj      \
126         $(OBJ)\context_s.obj        \
127         $(OBJ)\create_s.obj         \
128         $(OBJ)\delete_s.obj         \
129         $(OBJ)\destroy_s.obj        \
130         $(OBJ)\ent_setup.obj        \
131         $(OBJ)\error.obj            \
132         $(OBJ)\flush_s.obj          \
133         $(OBJ)\free.obj             \
134         $(OBJ)\get_princs_s.obj     \
135         $(OBJ)\get_s.obj            \
136         $(OBJ)\init_s.obj           \
137         $(OBJ)\keys.obj             \
138         $(OBJ)\log.obj              \
139         $(OBJ)\marshall.obj         \
140         $(OBJ)\modify_s.obj         \
141         $(OBJ)\password_quality.obj \
142         $(OBJ)\privs_s.obj          \
143         $(OBJ)\prune_s.obj          \
144         $(OBJ)\randkey_s.obj        \
145         $(OBJ)\rename_s.obj         \
146         $(OBJ)\server_glue.obj      \
147         $(OBJ)\server_hooks.obj     \
148         $(OBJ)\set_keys.obj         \
149         $(OBJ)\setkey3_s.obj        \
150         $(OBJ)\set_modifier.obj     \
151         $(OBJ)\kadm5_err.obj
154 proto_opts = -q -R "^(_|kadm5_c_|kadm5_s_|kadm5_log)" -P remove
156 $(OBJ)\kadm5-protos.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES)
157         $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \
158                 -o $@ \
159                 $(dist_libkadm5srv_la_SOURCES) \
160                 $(dist_libkadm5clnt_la_SOURCES) \
161         || $(RM) $@
163 $(OBJ)\kadm5-private.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES)
164         $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \
165                 -p $@ \
166                 $(dist_libkadm5srv_la_SOURCES) \
167                 $(dist_libkadm5clnt_la_SOURCES) \
168         || $(RM) $@
170 $(OBJ)\iprop-commands.c $(OBJ)\iprop-commands.h: iprop-commands.in
171         cd $(OBJ)
172         $(CP) $(SRCDIR)\iprop-commands.in $(OBJ)
173         $(BINDIR)\slc.exe iprop-commands.in
174         cd $(SRCDIR)
176 $(OBJ)\kadm5_err.h $(OBJ)kadm5_err.c: kadm5_err.et
177         cd $(OBJ)
178         $(BINDIR)\compile_et.exe $(SRCDIR)\kadm5_err.et
179         cd $(SRCDIR)
181 $(KADM5INCDIR)\kadm5_err.h: $(OBJ)\kadm5_err.h
183 KADM5INCDIR=$(INCDIR)\kadm5
185 INCFILES=\
186         $(KADM5INCDIR)\kadm5_err.h      \
187         $(KADM5INCDIR)\admin.h  \
188         $(KADM5INCDIR)\private.h        \
189         $(KADM5INCDIR)\kadm5-hook.h     \
190         $(KADM5INCDIR)\kadm5-protos.h   \
191         $(KADM5INCDIR)\kadm5-private.h  \
192         $(OBJ)\iprop-commands.h
194 SBINPROGRAMS=$(SBINDIR)\iprop-log.exe
196 LIBEXECPROGRAMS=$(LIBEXECDIR)\ipropd-master.exe $(LIBEXECDIR)\ipropd-slave.exe
198 EXELIBDEPS= \
199         $(LIBKADM5SRV) \
200         $(LIBROKEN) \
201         $(LIBHEIMDAL) \
202         $(LIBHDB) \
203         $(LIBSQLITE) \
204         $(LIBSL) \
205         $(LIBCOMERR) \
206         $(LIBVERS)
208 $(SBINDIR)\iprop-log.exe: $(OBJ)\iprop-log.obj $(OBJ)\iprop-commands.obj $(EXELIBDEPS) \
209                 $(OBJ)\iprop-log-version.res
210         $(EXECONLINK)
211         $(EXEPREP)
213 $(LIBEXECDIR)\ipropd-master.exe: $(OBJ)\ipropd_master.obj $(OBJ)\ipropd_common.obj \
214                 $(EXELIBDEPS) $(OBJ)\ipropd-master-version.res
215         $(EXECONLINK)
216         $(EXEPREP)
218 $(LIBEXECDIR)\ipropd-slave.exe: $(OBJ)\ipropd_slave.obj $(OBJ)\ipropd_common.obj \
219                 $(EXELIBDEPS) $(OBJ)\ipropd-slave-version.res
220         $(EXECONLINK)
221         $(EXEPREP)
223 $(LIBKADM5CLNT): $(LIBKADM5CLNT_OBJS)
224         $(LIBCON)
226 LIBKADM5SRVRES=$(OBJ)\libkadm5srv-version.res
228 $(LIBKADM5SRV): $(BINDIR)\libkadm5srv.dll
230 $(BINDIR)\libkadm5srv.dll: $(LIBKADM5SRV_OBJS) $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB) $(LIBCOMERR) $(LIBSQLITE) $(LIBKADM5SRVRES) $(LIBHEIMBASE)
231         $(DLLGUILINK) -implib:$(LIBKADM5SRV) -def:libkadm5srv-exports.def
232         $(DLLPREP_NODIST)
234 all:: $(INCFILES) $(LIBKADM5SRV) $(LIBKADM5CLNT)
236 all-tools:: $(SBINPROGRAMS) $(LIBEXECPROGRAMS)
238 clean::
239         -$(RM) $(INCFILES)
240         -$(RM) $(LIBKADM5CLNT)
241         -$(RM) $(LIBKADM5SRV)
242         -$(RM) $(BINDIR)\libkadm5srv.*
243         -$(RM) $(SBINPROGRAMS:.exe=.*)
244         -$(RM) $(LIBEXECPROGRAMS:.exe=.*)
246 test:: test-binaries test-run
248 test-binaries:  \
249         $(OBJ)\default_keys.exe \
250         $(OBJ)\test_pw_quality.exe \
251         $(OBJ)\sample_passwd_check.dll \
252         $(OBJ)\sample_hook.dll
254 $(OBJ)\default_keys.exe: $(OBJ)\default_keys.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB)
255         $(EXECONLINK)
256         $(EXEPREP_NODIST)
258 $(OBJ)\test_pw_quality.exe: $(OBJ)\test_pw_quality.obj  \
259         $(LIBROKEN) $(LIBKADM5SRV) $(LIBVERS) $(LIBHEIMDAL)
260         $(EXECONLINK)
261         $(EXEPREP_NODIST)
263 $(OBJ)\sample_passwd_check.dll: $(OBJ)\sample_passwd_check.obj $(LIBHEIMDAL)
264         $(DLLGUILINK) /DEF:<<
265 EXPORTS
266         version DATA
267         check_length
269         $(DLLPREP_NODIST)
271 $(OBJ)\sample_hook.dll: $(OBJ)\sample_hook.obj $(LIBKADM5SRV) $(LIBHEIMDAL)
272         $(DLLGUILINK) /DEF:<<
273 EXPORTS
274         kadm5_hook_plugin_load
276         $(DLLPREP_NODIST)
278 test-run:
279         cd $(OBJ)
280         -default_keys.exe
281         -test_pw_quality.exe
282         cd $(SRCDIR)
284 {$(OBJ)}.h{$(KADM5INCDIR)}.h:
285         $(CP) $< $@
287 {}.h{$(KADM5INCDIR)}.h:
288         $(CP) $< $@
290 {}.c{$(OBJ)}.obj::
291         $(C2OBJ_P) -I$(OBJ) -I$(KADM5INCDIR)
293 test-exports:
294         $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkadm5srv-exports.def
296 test:: test-exports