pavao_src/
lib.rs

1use std::collections::HashSet;
2use std::ffi::OsStr;
3use std::path::{Path, PathBuf};
4use std::process::Command;
5use std::{env, fs};
6
7/// Source files to compile for libsmbclient
8const SRC_FILES: &[&str] = &[
9    "third_party/heimdal/lib/com_err/compile_et.c",
10    "third_party/heimdal/lib/com_err/parse.tab.c",
11    "third_party/heimdal/lib/com_err/lex.lex.c",
12    "lib/replace/replace.c",
13    "third_party/heimdal/lib/vers/print_version.c",
14    "third_party/heimdal_build/version.c",
15    "third_party/heimdal_build/compile_et.objlist.empty.c",
16    "third_party/heimdal/lib/roken/base64.c",
17    "third_party/heimdal/lib/roken/ct.c",
18    "third_party/heimdal/lib/roken/hex.c",
19    "third_party/heimdal/lib/roken/bswap.c",
20    "third_party/heimdal/lib/roken/dumpdata.c",
21    "third_party/heimdal/lib/roken/emalloc.c",
22    "third_party/heimdal/lib/roken/ecalloc.c",
23    "third_party/heimdal/lib/roken/getarg.c",
24    "third_party/heimdal/lib/roken/getauxval.c",
25    "third_party/heimdal/lib/roken/get_window_size.c",
26    "third_party/heimdal/lib/roken/getdtablesize.c",
27    "third_party/heimdal/lib/roken/h_errno.c",
28    "third_party/heimdal/lib/roken/issuid.c",
29    "third_party/heimdal/lib/roken/net_read.c",
30    "third_party/heimdal/lib/roken/net_write.c",
31    "third_party/heimdal/lib/roken/parse_time.c",
32    "third_party/heimdal/lib/roken/parse_units.c",
33    "third_party/heimdal/lib/roken/vis.c",
34    "third_party/heimdal/lib/roken/strlwr.c",
35    "third_party/heimdal/lib/roken/strsep_copy.c",
36    "third_party/heimdal/lib/roken/strsep.c",
37    "third_party/heimdal/lib/roken/strupr.c",
38    "third_party/heimdal/lib/roken/strpool.c",
39    "third_party/heimdal/lib/roken/estrdup.c",
40    "third_party/heimdal/lib/roken/erealloc.c",
41    "third_party/heimdal/lib/roken/secure_getenv.c",
42    "third_party/heimdal/lib/roken/simple_exec.c",
43    "third_party/heimdal/lib/roken/strcollect.c",
44    "third_party/heimdal/lib/roken/rtbl.c",
45    "third_party/heimdal/lib/roken/rand.c",
46    "third_party/heimdal/lib/roken/cloexec.c",
47    "third_party/heimdal/lib/roken/clz.c",
48    "third_party/heimdal/lib/roken/xfree.c",
49    "third_party/heimdal/lib/roken/timeval.c",
50    "third_party/heimdal/lib/roken/mergesort.c",
51    "third_party/heimdal/lib/roken/mergesort_r.c",
52    "third_party/heimdal_build/replace.c",
53    "third_party/heimdal/lib/base/array.c",
54    "third_party/heimdal/lib/base/bool.c",
55    "third_party/heimdal/lib/base/bsearch.c",
56    "third_party/heimdal/lib/base/data.c",
57    "third_party/heimdal/lib/base/db.c",
58    "third_party/heimdal/lib/base/dict.c",
59    "third_party/heimdal/lib/base/error.c",
60    "third_party/heimdal/lib/base/heimbase.c",
61    "third_party/heimdal/lib/base/string.c",
62    "third_party/heimdal/lib/base/number.c",
63    "third_party/heimdal/lib/base/null.c",
64    "third_party/heimdal/lib/base/json.c",
65    "third_party/heimdal/lib/base/heim_err.c",
66    "third_party/heimdal/lib/com_err/com_err.c",
67    "third_party/heimdal/lib/com_err/error.c",
68    "third_party/heimdal/lib/asn1/gen_copy.c",
69    "third_party/heimdal/lib/asn1/gen_print.c",
70    "third_party/heimdal/lib/asn1/gen_decode.c",
71    "third_party/heimdal/lib/asn1/gen_encode.c",
72    "third_party/heimdal/lib/asn1/gen_free.c",
73    "third_party/heimdal/lib/asn1/gen_glue.c",
74    "third_party/heimdal/lib/asn1/gen_length.c",
75    "third_party/heimdal/lib/asn1/gen_seq.c",
76    "third_party/heimdal/lib/asn1/gen_template.c",
77    "third_party/heimdal/lib/asn1/hash.c",
78    "third_party/heimdal/lib/asn1/symbol.c",
79    "third_party/heimdal/lib/asn1/main.c",
80    "third_party/heimdal/lib/asn1/asn1parse.tab.c",
81    "third_party/heimdal/lib/asn1/lex.lex.c",
82    "third_party/heimdal_build/asn1_compile.objlist.empty.c",
83    "third_party/heimdal/lib/asn1/gen.c",
84    "lib/talloc/talloc.c",
85    "lib/util/time_basic.c",
86    "lib/util/blocking.c",
87    "lib/util/close_low_fd.c",
88    #[cfg(target_os = "linux")]
89    "lib/util/gpfswrap.c",
90    "lib/util/debug.c",
91    "lib/util/iov_buf.c",
92    "third_party/heimdal/lib/roken/resolve.c",
93    "third_party/heimdal/lib/roken/socket.c",
94    "third_party/heimdal/lib/roken/roken_gethostby.c",
95    "third_party/heimdal/lib/roken/mkostemp.c",
96    "third_party/heimdal/lib/roken/getuserinfo.c",
97    "lib/tevent/tevent.c",
98    "lib/tevent/tevent_debug.c",
99    "lib/tevent/tevent_fd.c",
100    "lib/tevent/tevent_immediate.c",
101    "lib/tevent/tevent_queue.c",
102    "lib/tevent/tevent_req.c",
103    "lib/tevent/tevent_wrapper.c",
104    "lib/tevent/tevent_poll.c",
105    "lib/tevent/tevent_threads.c",
106    "lib/tevent/tevent_signal.c",
107    "lib/tevent/tevent_standard.c",
108    "lib/tevent/tevent_timed.c",
109    "lib/tevent/tevent_util.c",
110    "lib/tevent/tevent_wakeup.c",
111    #[cfg(target_os = "linux")]
112    "lib/tevent/tevent_epoll.c",
113    "lib/util/sys_rw.c",
114    "lib/util/sys_rw_data.c",
115    "lib/util/fault.c",
116    "lib/util/signal.c",
117    "lib/util/util_process.c",
118    "lib/util/genrand.c",
119    "lib/util/setid.c",
120    "lib/util/charset/iconv.c",
121    "lib/util/charset/weird.c",
122    "lib/util/charset/charset_macosxfs.c",
123    "lib/util/tini.c",
124    "lib/util/charset/codepoints.c",
125    "lib/util/charset/convert_string.c",
126    "lib/util/charset/util_str.c",
127    "lib/util/charset/util_unistr_w.c",
128    "lib/util/charset/pull_push.c",
129    "lib/util/charset/util_unistr.c",
130    "lib/util/tiniparser.c",
131    "lib/util/data_blob.c",
132    "lib/util/util_file.c",
133    "lib/util/sys_popen.c",
134    "lib/util/time.c",
135    "lib/util/util.c",
136    "lib/util/idtree.c",
137    "lib/util/substitute.c",
138    "lib/util/util_strlist.c",
139    "lib/util/strv_util.c",
140    "lib/util/bitmap.c",
141    "lib/util/select.c",
142    "lib/util/pidfile.c",
143    "lib/util/become_daemon.c",
144    "lib/util/mkdir_p.c",
145    "lib/util/smb_strtox.c",
146    "lib/crypto/md4.c",
147    "lib/util/ms_fnmatch.c",
148    "lib/util/strv.c",
149    "lib/util/base64.c",
150    "lib/util/dprintf.c",
151    "lib/util/dns_cmp.c",
152    "lib/util/fsusage.c",
153    "lib/util/genrand_util.c",
154    "lib/util/getpass.c",
155    "lib/util/idtree_random.c",
156    "lib/util/memcache.c",
157    "lib/util/params.c",
158    "lib/util/rbtree.c",
159    "lib/util/rfc1738.c",
160    "lib/util/server_id.c",
161    "lib/util/smb_threads.c",
162    "lib/util/system.c",
163    "lib/util/talloc_keep_secret.c",
164    "lib/util/talloc_stack.c",
165    "lib/util/tevent_debug.c",
166    "lib/util/tfork.c",
167    "lib/util/tftw.c",
168    "lib/util/unix_match.c",
169    "lib/util/util_id.c",
170    "lib/util/util_net.c",
171    "lib/util/util_paths.c",
172    "lib/util/util_str.c",
173    "lib/util/util_str_common.c",
174    "lib/util/util_strlist_v3.c",
175    "dynconfig/dynconfig.c",
176    "lib/util/util_str_hex.c",
177    "libcli/util/doserr.c",
178    "libcli/util/errormap.c",
179    "libcli/util/nterr.c",
180    "libcli/util/errmap_unix.c",
181    "libcli/util/hresult.c",
182    "third_party/heimdal/lib/base/config_file.c",
183    "third_party/heimdal/lib/base/context.c",
184    "third_party/heimdal/lib/base/error_string.c",
185    "third_party/heimdal/lib/base/expand_path.c",
186    "third_party/heimdal/lib/base/log.c",
187    "third_party/heimdal/lib/base/plugin.c",
188    "third_party/heimdal/lib/base/warn.c",
189    "librpc/ndr/ndr_string.c",
190    "librpc/ndr/ndr_basic.c",
191    "librpc/ndr/uuid.c",
192    "librpc/ndr/ndr.c",
193    "librpc/ndr/ndr_misc.c",
194    "librpc/gen_ndr/ndr_misc.c",
195    "librpc/ndr/util.c",
196    "lib/util/stable_sort.c",
197    "third_party/heimdal/lib/asn1/asn1_pkcs8_asn1.c",
198    "third_party/heimdal/lib/asn1/asn1_pkcs9_asn1.c",
199    "third_party/heimdal/lib/asn1/asn1_rfc4108_asn1.c",
200    "third_party/heimdal/lib/asn1/asn1_rfc2459_asn1.c",
201    "third_party/heimdal/lib/hx509/asn1_pkcs10_asn1.c",
202    "third_party/heimdal/lib/asn1/asn1_krb5_asn1.c",
203    "third_party/heimdal/lib/asn1/der_get.c",
204    "third_party/heimdal/lib/asn1/der_put.c",
205    "third_party/heimdal/lib/asn1/der_free.c",
206    "third_party/heimdal/lib/asn1/der_format.c",
207    "third_party/heimdal/lib/asn1/der_length.c",
208    "third_party/heimdal/lib/asn1/der_copy.c",
209    "third_party/heimdal/lib/asn1/der_cmp.c",
210    "third_party/heimdal/lib/asn1/der_print.c",
211    "third_party/heimdal/lib/asn1/extra.c",
212    "third_party/heimdal/lib/asn1/timegm.c",
213    "third_party/heimdal/lib/asn1/template.c",
214    "third_party/heimdal/lib/asn1/oid_resolution.c",
215    "third_party/heimdal/lib/asn1/asn1_err.c",
216    "third_party/heimdal_build/asn1.empty.c",
217    "third_party/heimdal/lib/asn1/asn1_kx509_asn1.c",
218    "third_party/heimdal/lib/hx509/asn1_ocsp_asn1.c",
219    "third_party/heimdal/lib/asn1/asn1_digest_asn1.c",
220    "third_party/heimdal/lib/asn1/asn1_pkinit_asn1.c",
221    "third_party/heimdal/lib/asn1/asn1_cms_asn1.c",
222    "third_party/heimdal/lib/asn1/asn1_pkcs12_asn1.c",
223    "lib/tdb/common/check.c",
224    "lib/tdb/common/error.c",
225    "lib/tdb/common/tdb.c",
226    "lib/tdb/common/traverse.c",
227    "lib/tdb/common/freelistcheck.c",
228    "lib/tdb/common/lock.c",
229    "lib/tdb/common/dump.c",
230    "lib/tdb/common/freelist.c",
231    "lib/tdb/common/io.c",
232    "lib/tdb/common/open.c",
233    "lib/tdb/common/transaction.c",
234    "lib/tdb/common/hash.c",
235    "lib/tdb/common/summary.c",
236    "lib/tdb/common/rescue.c",
237    "lib/tdb/common/mutex.c",
238    "librpc/gen_ndr/ndr_security.c",
239    "librpc/ndr/ndr_sec_helper.c",
240    "librpc/gen_ndr/ndr_conditional_ace.c",
241    "libcli/security/dom_sid.c",
242    "libcli/security/display_sec.c",
243    "libcli/security/secace.c",
244    "libcli/security/secacl.c",
245    "libcli/security/security_descriptor.c",
246    "libcli/security/sddl.c",
247    "libcli/security/privileges.c",
248    "libcli/security/security_token.c",
249    "libcli/security/access_check.c",
250    "libcli/security/object_tree.c",
251    "libcli/security/create_descriptor.c",
252    "libcli/security/util_sid.c",
253    "libcli/security/session.c",
254    "libcli/security/secdesc.c",
255    "libcli/security/conditional_ace.c",
256    "libcli/security/sddl_conditional_ace.c",
257    "libcli/security/claims-conversions.c",
258    "third_party/heimdal/lib/hcrypto/libtommath/bn_cutoffs.c",
259    "third_party/heimdal/lib/hcrypto/libtommath/bn_deprecated.c",
260    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_2expt.c",
261    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_abs.c",
262    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_add.c",
263    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_add_d.c",
264    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_addmod.c",
265    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_and.c",
266    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clamp.c",
267    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clear.c",
268    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clear_multi.c",
269    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp.c",
270    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp_d.c",
271    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp_mag.c",
272    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cnt_lsb.c",
273    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_complement.c",
274    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_copy.c",
275    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_count_bits.c",
276    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_decr.c",
277    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div.c",
278    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_2.c",
279    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_2d.c",
280    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_3.c",
281    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_d.c",
282    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c",
283    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_reduce.c",
284    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_setup.c",
285    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_error_to_string.c",
286    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exch.c",
287    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_expt_u32.c",
288    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exptmod.c",
289    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exteuclid.c",
290    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c",
291    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_from_sbin.c",
292    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_from_ubin.c",
293    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_fwrite.c",
294    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_gcd.c",
295    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_double.c",
296    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_i32.c",
297    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_i64.c",
298    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_l.c",
299    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_ll.c",
300    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_u32.c",
301    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_u64.c",
302    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_ul.c",
303    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_ull.c",
304    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_grow.c",
305    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_incr.c",
306    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init.c",
307    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_copy.c",
308    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_i32.c",
309    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_i64.c",
310    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_l.c",
311    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ll.c",
312    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_multi.c",
313    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_set.c",
314    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_size.c",
315    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_u32.c",
316    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_u64.c",
317    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ul.c",
318    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ull.c",
319    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_invmod.c",
320    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_is_square.c",
321    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_iseven.c",
322    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_isodd.c",
323    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_kronecker.c",
324    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_lcm.c",
325    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_log_u32.c",
326    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_lshd.c",
327    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod.c",
328    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod_2d.c",
329    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod_d.c",
330    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c",
331    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c",
332    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_setup.c",
333    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul.c",
334    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_2.c",
335    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_2d.c",
336    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_d.c",
337    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mulmod.c",
338    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_neg.c",
339    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_or.c",
340    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_pack.c",
341    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_pack_count.c",
342    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_fermat.c",
343    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_frobenius_underwood.c",
344    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_is_prime.c",
345    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c",
346    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c",
347    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_rabin_miller_trials.c",
348    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_rand.c",
349    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_strong_lucas_selfridge.c",
350    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_radix_size.c",
351    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_radix_smap.c",
352    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_rand.c",
353    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_read_radix.c",
354    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce.c",
355    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k.c",
356    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c",
357    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c",
358    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c",
359    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c",
360    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c",
361    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_setup.c",
362    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_root_u32.c",
363    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_rshd.c",
364    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sbin_size.c",
365    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set.c",
366    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_double.c",
367    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_i32.c",
368    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_i64.c",
369    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_l.c",
370    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ll.c",
371    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_u32.c",
372    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_u64.c",
373    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ul.c",
374    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ull.c",
375    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_shrink.c",
376    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_signed_rsh.c",
377    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqr.c",
378    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrmod.c",
379    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrt.c",
380    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrtmod_prime.c",
381    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sub.c",
382    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sub_d.c",
383    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_submod.c",
384    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_radix.c",
385    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_sbin.c",
386    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_ubin.c",
387    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_ubin_size.c",
388    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_unpack.c",
389    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_xor.c",
390    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_zero.c",
391    "third_party/heimdal/lib/hcrypto/libtommath/bn_prime_tab.c",
392    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_add.c",
393    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_balance_mul.c",
394    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_exptmod.c",
395    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_exptmod_fast.c",
396    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_get_bit.c",
397    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_invmod_fast.c",
398    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_invmod_slow.c",
399    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_karatsuba_mul.c",
400    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_karatsuba_sqr.c",
401    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_montgomery_reduce_fast.c",
402    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_digs.c",
403    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_digs_fast.c",
404    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c",
405    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs_fast.c",
406    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_prime_is_divisible.c",
407    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_rand_jenkins.c",
408    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_rand_platform.c",
409    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_reverse.c",
410    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sqr.c",
411    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sqr_fast.c",
412    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sub.c",
413    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_toom_mul.c",
414    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_toom_sqr.c",
415    "third_party/heimdal/lib/hcrypto/aes.c",
416    "third_party/heimdal/lib/hcrypto/bn.c",
417    "third_party/heimdal/lib/hcrypto/dh.c",
418    "third_party/heimdal/lib/hcrypto/dh-ltm.c",
419    "third_party/heimdal/lib/hcrypto/des.c",
420    "third_party/heimdal/lib/hcrypto/dsa.c",
421    "third_party/heimdal/lib/hcrypto/engine.c",
422    "third_party/heimdal/lib/hcrypto/md4.c",
423    "third_party/heimdal/lib/hcrypto/md5.c",
424    "third_party/heimdal/lib/hcrypto/rsa.c",
425    "third_party/heimdal/lib/hcrypto/rsa-ltm.c",
426    "third_party/heimdal/lib/hcrypto/rc2.c",
427    "third_party/heimdal/lib/hcrypto/rc4.c",
428    "third_party/heimdal/lib/hcrypto/rijndael-alg-fst.c",
429    "third_party/heimdal/lib/hcrypto/rnd_keys.c",
430    "third_party/heimdal/lib/hcrypto/sha.c",
431    "third_party/heimdal/lib/hcrypto/sha256.c",
432    "third_party/heimdal/lib/hcrypto/sha512.c",
433    "third_party/heimdal/lib/hcrypto/ui.c",
434    "third_party/heimdal/lib/hcrypto/evp.c",
435    "third_party/heimdal/lib/hcrypto/evp-hcrypto.c",
436    "third_party/heimdal/lib/hcrypto/pkcs5.c",
437    "third_party/heimdal/lib/hcrypto/pkcs12.c",
438    "third_party/heimdal/lib/hcrypto/rand.c",
439    "third_party/heimdal/lib/hcrypto/rand-unix.c",
440    "third_party/heimdal/lib/hcrypto/rand-fortuna.c",
441    "third_party/heimdal/lib/hcrypto/rand-timer.c",
442    "third_party/heimdal/lib/hcrypto/hmac.c",
443    "third_party/heimdal/lib/hcrypto/camellia.c",
444    "third_party/heimdal/lib/hcrypto/camellia-ntt.c",
445    "third_party/heimdal/lib/hcrypto/common.c",
446    "third_party/heimdal/lib/hcrypto/validate.c",
447    "third_party/heimdal/lib/wind/wind_err.c",
448    "third_party/heimdal/lib/wind/stringprep.c",
449    "third_party/heimdal/lib/wind/errorlist.c",
450    "third_party/heimdal/lib/wind/errorlist_table.c",
451    "third_party/heimdal/lib/wind/normalize.c",
452    "third_party/heimdal/lib/wind/normalize_table.c",
453    "third_party/heimdal/lib/wind/combining.c",
454    "third_party/heimdal/lib/wind/combining_table.c",
455    "third_party/heimdal/lib/wind/utf8.c",
456    "third_party/heimdal/lib/wind/bidi.c",
457    "third_party/heimdal/lib/wind/bidi_table.c",
458    "third_party/heimdal/lib/wind/ldap.c",
459    "third_party/heimdal/lib/wind/map.c",
460    "third_party/heimdal/lib/wind/map_table.c",
461    "librpc/gen_ndr/ndr_dns.c",
462    "librpc/ndr/ndr_dns.c",
463    "librpc/ndr/ndr_dns_utils.c",
464    "librpc/gen_ndr/ndr_nbt.c",
465    "librpc/ndr/ndr_nbt.c",
466    "librpc/gen_ndr/ndr_dnsp.c",
467    "librpc/ndr/ndr_dnsp.c",
468    "libcli/nbt/nbtname.c",
469    "third_party/heimdal/lib/hx509/ca.c",
470    "third_party/heimdal/lib/hx509/cert.c",
471    "third_party/heimdal/lib/hx509/cms.c",
472    "third_party/heimdal/lib/hx509/collector.c",
473    "third_party/heimdal/lib/hx509/crypto.c",
474    "third_party/heimdal/lib/hx509/crypto-ec.c",
475    "third_party/heimdal/lib/hx509/error.c",
476    "third_party/heimdal/lib/hx509/env.c",
477    "third_party/heimdal/lib/hx509/file.c",
478    "third_party/heimdal/lib/hx509/keyset.c",
479    "third_party/heimdal/lib/hx509/ks_dir.c",
480    "third_party/heimdal/lib/hx509/ks_file.c",
481    "third_party/heimdal/lib/hx509/ks_keychain.c",
482    "third_party/heimdal/lib/hx509/ks_mem.c",
483    "third_party/heimdal/lib/hx509/ks_null.c",
484    "third_party/heimdal/lib/hx509/ks_p11.c",
485    "third_party/heimdal/lib/hx509/ks_p12.c",
486    "third_party/heimdal/lib/hx509/lock.c",
487    "third_party/heimdal/lib/hx509/name.c",
488    "third_party/heimdal/lib/hx509/peer.c",
489    "third_party/heimdal/lib/hx509/print.c",
490    "third_party/heimdal/lib/hx509/req.c",
491    "third_party/heimdal/lib/hx509/revoke.c",
492    "third_party/heimdal/lib/hx509/sel.c",
493    "third_party/heimdal/lib/hx509/hx509_err.c",
494    "third_party/heimdal/lib/hx509/sel-lex.lex.c",
495    "third_party/heimdal/lib/hx509/sel-gram.tab.c",
496    "lib/util/tevent_unix.c",
497    "lib/util/tevent_ntstatus.c",
498    "lib/util/tevent_werror.c",
499    "lib/util/tevent_req_profile.c",
500    "lib/util/util_tdb.c",
501    "lib/tdb_wrap/tdb_wrap.c",
502    "lib/param/loadparm_server_role.c",
503    "librpc/gen_ndr/ndr_wkssvc.c",
504    "librpc/gen_ndr/ndr_dssetup.c",
505    "librpc/gen_ndr/ndr_netlogon.c",
506    "librpc/ndr/ndr_netlogon.c",
507    "librpc/gen_ndr/ndr_notify.c",
508    "librpc/gen_ndr/ndr_srvsvc.c",
509    "librpc/ndr-standard.empty.c",
510    "librpc/gen_ndr/ndr_samr.c",
511    "librpc/gen_ndr/ndr_ntsvcs.c",
512    "librpc/gen_ndr/ndr_initshutdown.c",
513    "librpc/ndr/ndr_spoolss_buf.c",
514    "librpc/gen_ndr/ndr_echo.c",
515    "librpc/gen_ndr/ndr_eventlog6.c",
516    "librpc/gen_ndr/ndr_winreg.c",
517    "librpc/gen_ndr/ndr_eventlog.c",
518    "librpc/gen_ndr/ndr_atsvc.c",
519    "librpc/gen_ndr/ndr_file_id.c",
520    "librpc/gen_ndr/ndr_dfs.c",
521    "librpc/gen_ndr/ndr_server_id.c",
522    "librpc/gen_ndr/ndr_lsa.c",
523    "librpc/gen_ndr/ndr_svcctl.c",
524    "librpc/ndr/ndr_svcctl.c",
525    "librpc/gen_ndr/ndr_spoolss.c",
526    "third_party/heimdal/lib/krb5/crypto.c",
527    "third_party/heimdal/lib/krb5/acache.c",
528    "third_party/heimdal/lib/krb5/add_et_list.c",
529    "third_party/heimdal/lib/krb5/addr_families.c",
530    "third_party/heimdal/lib/krb5/appdefault.c",
531    "third_party/heimdal/lib/krb5/asn1_glue.c",
532    "third_party/heimdal/lib/krb5/auth_context.c",
533    "third_party/heimdal/lib/krb5/authdata.c",
534    "third_party/heimdal/lib/krb5/build_ap_req.c",
535    "third_party/heimdal/lib/krb5/build_auth.c",
536    "third_party/heimdal/lib/krb5/cache.c",
537    "third_party/heimdal/lib/krb5/changepw.c",
538    "third_party/heimdal/lib/krb5/codec.c",
539    "third_party/heimdal/lib/krb5/config_file.c",
540    "third_party/heimdal/lib/krb5/constants.c",
541    "third_party/heimdal/lib/krb5/convert_creds.c",
542    "third_party/heimdal/lib/krb5/copy_host_realm.c",
543    "third_party/heimdal/lib/krb5/crc.c",
544    "third_party/heimdal/lib/krb5/creds.c",
545    "third_party/heimdal/lib/krb5/crypto-aes-sha1.c",
546    "third_party/heimdal/lib/krb5/crypto-aes-sha2.c",
547    "third_party/heimdal/lib/krb5/crypto-algs.c",
548    "third_party/heimdal/lib/krb5/crypto-arcfour.c",
549    "third_party/heimdal/lib/krb5/crypto-des3.c",
550    "third_party/heimdal/lib/krb5/crypto-des.c",
551    "third_party/heimdal/lib/krb5/crypto-des-common.c",
552    "third_party/heimdal/lib/krb5/crypto-evp.c",
553    "third_party/heimdal/lib/krb5/crypto-null.c",
554    "third_party/heimdal/lib/krb5/crypto-pk.c",
555    "third_party/heimdal/lib/krb5/crypto-rand.c",
556    "third_party/heimdal/lib/krb5/data.c",
557    "third_party/heimdal/lib/krb5/dcache.c",
558    "third_party/heimdal/lib/krb5/db_plugin.c",
559    "third_party/heimdal/lib/krb5/deprecated.c",
560    "third_party/heimdal/lib/krb5/eai_to_heim_errno.c",
561    "third_party/heimdal/lib/krb5/enomem.c",
562    "third_party/heimdal/lib/krb5/error_string.c",
563    "third_party/heimdal/lib/krb5/expand_hostname.c",
564    "third_party/heimdal/lib/krb5/fast.c",
565    "third_party/heimdal/lib/krb5/fcache.c",
566    "third_party/heimdal/lib/krb5/free.c",
567    "third_party/heimdal/lib/krb5/free_host_realm.c",
568    "third_party/heimdal/lib/krb5/generate_seq_number.c",
569    "third_party/heimdal/lib/krb5/generate_subkey.c",
570    "third_party/heimdal/lib/krb5/get_addrs.c",
571    "third_party/heimdal/lib/krb5/get_cred.c",
572    "third_party/heimdal/lib/krb5/get_default_principal.c",
573    "third_party/heimdal/lib/krb5/get_default_realm.c",
574    "third_party/heimdal/lib/krb5/get_for_creds.c",
575    "third_party/heimdal/lib/krb5/get_host_realm.c",
576    "third_party/heimdal/lib/krb5/get_in_tkt.c",
577    "third_party/heimdal/lib/krb5/get_port.c",
578    "third_party/heimdal/lib/krb5/init_creds.c",
579    "third_party/heimdal/lib/krb5/init_creds_pw.c",
580    "third_party/heimdal/lib/krb5/kcm.c",
581    "third_party/heimdal/lib/krb5/keyblock.c",
582    "third_party/heimdal/lib/krb5/keytab.c",
583    "third_party/heimdal/lib/krb5/keytab_any.c",
584    "third_party/heimdal/lib/krb5/keytab_file.c",
585    "third_party/heimdal/lib/krb5/keytab_memory.c",
586    "third_party/heimdal/lib/krb5/keytab_keyfile.c",
587    "third_party/heimdal/lib/krb5/krbhst.c",
588    "third_party/heimdal/lib/krb5/krcache.c",
589    "third_party/heimdal/lib/krb5/log.c",
590    "third_party/heimdal/lib/krb5/mcache.c",
591    "third_party/heimdal/lib/krb5/misc.c",
592    "third_party/heimdal/lib/krb5/mk_error.c",
593    "third_party/heimdal/lib/krb5/mk_priv.c",
594    "third_party/heimdal/lib/krb5/mk_rep.c",
595    "third_party/heimdal/lib/krb5/mk_req.c",
596    "third_party/heimdal/lib/krb5/mk_req_ext.c",
597    "third_party/heimdal/lib/krb5/mit_glue.c",
598    "third_party/heimdal/lib/krb5/net_read.c",
599    "third_party/heimdal/lib/krb5/net_write.c",
600    "third_party/heimdal/lib/krb5/n-fold.c",
601    "third_party/heimdal/lib/krb5/padata.c",
602    "third_party/heimdal/lib/krb5/pkinit.c",
603    "third_party/heimdal/lib/krb5/pkinit-ec.c",
604    "third_party/heimdal/lib/krb5/principal.c",
605    "third_party/heimdal/lib/krb5/prog_setup.c",
606    "third_party/heimdal/lib/krb5/pac.c",
607    "third_party/heimdal/lib/krb5/pcache.c",
608    "third_party/heimdal/lib/krb5/prompter_posix.c",
609    "third_party/heimdal/lib/krb5/rd_cred.c",
610    "third_party/heimdal/lib/krb5/rd_error.c",
611    "third_party/heimdal/lib/krb5/rd_priv.c",
612    "third_party/heimdal/lib/krb5/rd_rep.c",
613    "third_party/heimdal/lib/krb5/rd_req.c",
614    "third_party/heimdal/lib/krb5/replay.c",
615    "third_party/heimdal/lib/krb5/salt.c",
616    "third_party/heimdal/lib/krb5/salt-aes-sha1.c",
617    "third_party/heimdal/lib/krb5/salt-aes-sha2.c",
618    "third_party/heimdal/lib/krb5/salt-arcfour.c",
619    "third_party/heimdal/lib/krb5/salt-des3.c",
620    "third_party/heimdal/lib/krb5/salt-des.c",
621    "third_party/heimdal/lib/krb5/send_to_kdc.c",
622    "third_party/heimdal/lib/krb5/set_default_realm.c",
623    "third_party/heimdal/lib/krb5/store.c",
624    "third_party/heimdal/lib/krb5/store-int.c",
625    "third_party/heimdal/lib/krb5/store_emem.c",
626    "third_party/heimdal/lib/krb5/store_fd.c",
627    "third_party/heimdal/lib/krb5/store_mem.c",
628    "third_party/heimdal/lib/krb5/store_stdio.c",
629    "third_party/heimdal/lib/krb5/ticket.c",
630    "third_party/heimdal/lib/krb5/time.c",
631    "third_party/heimdal/lib/krb5/transited.c",
632    "third_party/heimdal/lib/krb5/version.c",
633    "third_party/heimdal/lib/krb5/warn.c",
634    "third_party/heimdal/lib/krb5/krb5_err.c",
635    "third_party/heimdal/lib/krb5/sp800-108-kdf.c",
636    "third_party/heimdal/lib/krb5/aname_to_localname.c",
637    "third_party/heimdal/lib/krb5/kuserok.c",
638    "third_party/heimdal/lib/krb5/kx509.c",
639    "third_party/heimdal/lib/krb5/mk_cred.c",
640    "third_party/heimdal/lib/krb5/kx509_err.c",
641    "third_party/heimdal/lib/krb5/k524_err.c",
642    "third_party/heimdal/lib/krb5/krb_err.c",
643    "third_party/heimdal/lib/krb5/k5e1_err.c",
644    "third_party/heimdal_build/krb5-glue.c",
645    "third_party/heimdal/lib/ipc/client.c",
646    "third_party/heimdal/lib/ipc/common.c",
647    "third_party/heimdal/lib/krb5/expand_path.c",
648    "third_party/heimdal/lib/krb5/plugin.c",
649    "third_party/heimdal/lib/krb5/context.c",
650    "lib/util/asn1.c",
651    "lib/crypto/gnutls_error.c",
652    "lib/crypto/gnutls_aead_aes_256_cbc_hmac_sha512.c",
653    "lib/crypto/gnutls_arcfour_confounded_md5.c",
654    "lib/crypto/gnutls_weak_crypto.c",
655    "lib/crypto/gnutls_sp800_108.c",
656    "lib/param/loadparm.c",
657    "lib/param/util.c",
658    "lib/param/param_table.c",
659    "lib/dbwrap/dbwrap.c",
660    "lib/dbwrap/dbwrap_util.c",
661    "lib/dbwrap/dbwrap_rbt.c",
662    "lib/dbwrap/dbwrap_tdb.c",
663    "lib/dbwrap/dbwrap_local_open.c",
664    "librpc/ndr/ndr_krb5pac.c",
665    "librpc/gen_ndr/ndr_krb5pac.c",
666    "librpc/ndr/ndr_compression.c",
667    "lib/compression/lzxpress.c",
668    "lib/compression/lzxpress_huffman.c",
669    "librpc/gen_ndr/ndr_claims.c",
670    "librpc/ndr/ndr_claims.c",
671    "third_party/heimdal/lib/gssapi/asn1_gssapi_asn1.c",
672    "third_party/heimdal_build/gssapi.empty.c",
673    "third_party/heimdal/lib/gssapi/asn1_spnego_asn1.c",
674    "third_party/heimdal/lib/gssapi/spnego/init_sec_context.c",
675    "third_party/heimdal/lib/gssapi/spnego/external.c",
676    "third_party/heimdal/lib/gssapi/spnego/compat.c",
677    "third_party/heimdal/lib/gssapi/spnego/context_stubs.c",
678    "third_party/heimdal/lib/gssapi/spnego/context_storage.c",
679    "third_party/heimdal/lib/gssapi/spnego/accept_sec_context.c",
680    "third_party/heimdal/lib/gssapi/spnego/negoex_ctx.c",
681    "third_party/heimdal/lib/gssapi/spnego/negoex_err.c",
682    "third_party/heimdal/lib/gssapi/spnego/negoex_util.c",
683    "third_party/heimdal/lib/gssapi/krb5/copy_ccache.c",
684    "third_party/heimdal/lib/gssapi/krb5/delete_sec_context.c",
685    "third_party/heimdal/lib/gssapi/krb5/duplicate_cred.c",
686    "third_party/heimdal/lib/gssapi/krb5/init_sec_context.c",
687    "third_party/heimdal/lib/gssapi/krb5/context_time.c",
688    "third_party/heimdal/lib/gssapi/krb5/init.c",
689    "third_party/heimdal/lib/gssapi/krb5/address_to_krb5addr.c",
690    "third_party/heimdal/lib/gssapi/krb5/get_mic.c",
691    "third_party/heimdal/lib/gssapi/krb5/inquire_context.c",
692    "third_party/heimdal/lib/gssapi/krb5/add_cred.c",
693    "third_party/heimdal/lib/gssapi/krb5/inquire_cred.c",
694    "third_party/heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c",
695    "third_party/heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c",
696    "third_party/heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c",
697    "third_party/heimdal/lib/gssapi/krb5/inquire_names_for_mech.c",
698    "third_party/heimdal/lib/gssapi/krb5/indicate_mechs.c",
699    "third_party/heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c",
700    "third_party/heimdal/lib/gssapi/krb5/name_attrs.c",
701    "third_party/heimdal/lib/gssapi/krb5/export_sec_context.c",
702    "third_party/heimdal/lib/gssapi/krb5/import_sec_context.c",
703    "third_party/heimdal/lib/gssapi/krb5/duplicate_name.c",
704    "third_party/heimdal/lib/gssapi/krb5/import_name.c",
705    "third_party/heimdal/lib/gssapi/krb5/compare_name.c",
706    "third_party/heimdal/lib/gssapi/krb5/export_name.c",
707    "third_party/heimdal/lib/gssapi/krb5/canonicalize_name.c",
708    "third_party/heimdal/lib/gssapi/krb5/unwrap.c",
709    "third_party/heimdal/lib/gssapi/krb5/wrap.c",
710    "third_party/heimdal/lib/gssapi/krb5/release_name.c",
711    "third_party/heimdal/lib/gssapi/krb5/cfx.c",
712    "third_party/heimdal/lib/gssapi/krb5/8003.c",
713    "third_party/heimdal/lib/gssapi/krb5/arcfour.c",
714    "third_party/heimdal/lib/gssapi/krb5/encapsulate.c",
715    "third_party/heimdal/lib/gssapi/krb5/display_name.c",
716    "third_party/heimdal/lib/gssapi/krb5/sequence.c",
717    "third_party/heimdal/lib/gssapi/krb5/display_status.c",
718    "third_party/heimdal/lib/gssapi/krb5/release_buffer.c",
719    "third_party/heimdal/lib/gssapi/krb5/external.c",
720    "third_party/heimdal/lib/gssapi/krb5/compat.c",
721    "third_party/heimdal/lib/gssapi/krb5/creds.c",
722    "third_party/heimdal/lib/gssapi/krb5/ccache_name.c",
723    "third_party/heimdal/lib/gssapi/krb5/acquire_cred.c",
724    "third_party/heimdal/lib/gssapi/krb5/release_cred.c",
725    "third_party/heimdal/lib/gssapi/krb5/store_cred.c",
726    "third_party/heimdal/lib/gssapi/krb5/set_cred_option.c",
727    "third_party/heimdal/lib/gssapi/krb5/decapsulate.c",
728    "third_party/heimdal/lib/gssapi/krb5/verify_mic.c",
729    "third_party/heimdal/lib/gssapi/krb5/accept_sec_context.c",
730    "third_party/heimdal/lib/gssapi/krb5/set_sec_context_option.c",
731    "third_party/heimdal/lib/gssapi/krb5/process_context_token.c",
732    "third_party/heimdal/lib/gssapi/krb5/prf.c",
733    "third_party/heimdal/lib/gssapi/krb5/aeap.c",
734    "third_party/heimdal/lib/gssapi/krb5/pname_to_uid.c",
735    "third_party/heimdal/lib/gssapi/krb5/authorize_localname.c",
736    "third_party/heimdal/lib/gssapi/krb5/gkrb5_err.c",
737    "third_party/heimdal/lib/gssapi/mech/cred.c",
738    "third_party/heimdal/lib/gssapi/mech/context.c",
739    "third_party/heimdal/lib/gssapi/mech/gss_krb5.c",
740    "third_party/heimdal/lib/gssapi/mech/gss_mech_switch.c",
741    "third_party/heimdal/lib/gssapi/mech/gss_process_context_token.c",
742    "third_party/heimdal/lib/gssapi/mech/gss_buffer_set.c",
743    "third_party/heimdal/lib/gssapi/mech/gss_aeap.c",
744    "third_party/heimdal/lib/gssapi/mech/gss_add_cred.c",
745    "third_party/heimdal/lib/gssapi/mech/gss_add_cred_from.c",
746    "third_party/heimdal/lib/gssapi/mech/gss_acquire_cred_from.c",
747    "third_party/heimdal/lib/gssapi/mech/gss_cred.c",
748    "third_party/heimdal/lib/gssapi/mech/gss_store_cred_into.c",
749    "third_party/heimdal/lib/gssapi/mech/gss_add_oid_set_member.c",
750    "third_party/heimdal/lib/gssapi/mech/gss_compare_name.c",
751    "third_party/heimdal/lib/gssapi/mech/gss_release_oid_set.c",
752    "third_party/heimdal/lib/gssapi/mech/gss_create_empty_oid_set.c",
753    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_oid_set.c",
754    "third_party/heimdal/lib/gssapi/mech/gss_decapsulate_token.c",
755    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred_by_oid.c",
756    "third_party/heimdal/lib/gssapi/mech/gss_canonicalize_name.c",
757    "third_party/heimdal/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c",
758    "third_party/heimdal/lib/gssapi/mech/gss_inquire_names_for_mech.c",
759    "third_party/heimdal/lib/gssapi/mech/gss_inquire_mechs_for_name.c",
760    "third_party/heimdal/lib/gssapi/mech/gss_wrap_size_limit.c",
761    "third_party/heimdal/lib/gssapi/mech/gss_names.c",
762    "third_party/heimdal/lib/gssapi/mech/gss_verify.c",
763    "third_party/heimdal/lib/gssapi/mech/gss_display_name.c",
764    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_oid.c",
765    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_cred.c",
766    "third_party/heimdal/lib/gssapi/mech/gss_display_status.c",
767    "third_party/heimdal/lib/gssapi/mech/gss_release_buffer.c",
768    "third_party/heimdal/lib/gssapi/mech/gss_release_oid.c",
769    "third_party/heimdal/lib/gssapi/mech/gss_test_oid_set_member.c",
770    "third_party/heimdal/lib/gssapi/mech/gss_release_cred.c",
771    "third_party/heimdal/lib/gssapi/mech/gss_set_sec_context_option.c",
772    "third_party/heimdal/lib/gssapi/mech/gss_export_name.c",
773    "third_party/heimdal/lib/gssapi/mech/gss_seal.c",
774    "third_party/heimdal/lib/gssapi/mech/gss_acquire_cred.c",
775    "third_party/heimdal/lib/gssapi/mech/gss_unseal.c",
776    "third_party/heimdal/lib/gssapi/mech/gss_verify_mic.c",
777    "third_party/heimdal/lib/gssapi/mech/gss_accept_sec_context.c",
778    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred_by_mech.c",
779    "third_party/heimdal/lib/gssapi/mech/gss_indicate_mechs.c",
780    "third_party/heimdal/lib/gssapi/mech/gss_get_neg_mechs.c",
781    "third_party/heimdal/lib/gssapi/mech/gss_delete_sec_context.c",
782    "third_party/heimdal/lib/gssapi/mech/gss_sign.c",
783    "third_party/heimdal/lib/gssapi/mech/gss_utils.c",
784    "third_party/heimdal/lib/gssapi/mech/gss_init_sec_context.c",
785    "third_party/heimdal/lib/gssapi/mech/gss_oid_equal.c",
786    "third_party/heimdal/lib/gssapi/mech/gss_oid.c",
787    "third_party/heimdal/lib/gssapi/mech/gss_oid_to_str.c",
788    "third_party/heimdal/lib/gssapi/mech/gss_mo.c",
789    "third_party/heimdal/lib/gssapi/mech/gss_context_time.c",
790    "third_party/heimdal/lib/gssapi/mech/gss_encapsulate_token.c",
791    "third_party/heimdal/lib/gssapi/mech/gss_get_mic.c",
792    "third_party/heimdal/lib/gssapi/mech/gss_import_sec_context.c",
793    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred.c",
794    "third_party/heimdal/lib/gssapi/mech/gss_wrap.c",
795    "third_party/heimdal/lib/gssapi/mech/gss_import_name.c",
796    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_name.c",
797    "third_party/heimdal/lib/gssapi/mech/gss_unwrap.c",
798    "third_party/heimdal/lib/gssapi/mech/gss_export_sec_context.c",
799    "third_party/heimdal/lib/gssapi/mech/gss_export_name_composite.c",
800    "third_party/heimdal/lib/gssapi/mech/gss_inquire_context.c",
801    "third_party/heimdal/lib/gssapi/mech/gss_release_name.c",
802    "third_party/heimdal/lib/gssapi/mech/gss_set_cred_option.c",
803    "third_party/heimdal/lib/gssapi/mech/gss_pseudo_random.c",
804    "third_party/heimdal/lib/gssapi/mech/gss_authorize_localname.c",
805    "third_party/heimdal/lib/gssapi/mech/gss_get_name_attribute.c",
806    "third_party/heimdal/lib/gssapi/mech/gssspi_exchange_meta_data.c",
807    "third_party/heimdal/lib/gssapi/mech/gssspi_query_mechanism_info.c",
808    "third_party/heimdal/lib/gssapi/mech/gssspi_query_meta_data.c",
809    "third_party/heimdal_build/gssapi-glue.c",
810    "lib/util/msghdr.c",
811    "lib/socket/interfaces.c",
812    "source4/lib/events/tevent_s4.c",
813    "librpc/gen_ndr/ndr_krb5ccache.c",
814    "librpc/ndr/ndr_negoex.c",
815    "librpc/gen_ndr/ndr_negoex.c",
816    "librpc/gen_ndr/ndr_smb2_lease_struct.c",
817    "librpc/gen_ndr/ndr_named_pipe_auth.c",
818    "librpc/ndr/ndr_drsuapi.c",
819    "librpc/gen_ndr/ndr_drsuapi.c",
820    "librpc/gen_ndr/ndr_epmapper.c",
821    "librpc/gen_ndr/ndr_mgmt.c",
822    "librpc/ndr-samba.empty.c",
823    "librpc/gen_ndr/ndr_mdssvc.c",
824    "librpc/gen_ndr/ndr_gmsa.c",
825    "librpc/gen_ndr/ndr_smb3posix.c",
826    "librpc/gen_ndr/ndr_wsp.c",
827    "librpc/wsp/wsp_helper.c",
828    "librpc/wsp/wsp_props_gen.c",
829    "source3/librpc/gen_ndr/ndr_rpcd_witness.c",
830    "source3/librpc/gen_ndr/ndr_open_files.c",
831    "librpc/ndr/ndr_drsblobs.c",
832    "librpc/gen_ndr/ndr_drsblobs.c",
833    "librpc/gen_ndr/ndr_dnsserver.c",
834    "librpc/ndr/ndr_dnsserver.c",
835    "librpc/gen_ndr/ndr_fsrvp.c",
836    "librpc/ndr/ndr_schannel.c",
837    "librpc/gen_ndr/ndr_schannel.c",
838    "librpc/ndr/ndr_xattr.c",
839    "librpc/gen_ndr/ndr_xattr.c",
840    "librpc/gen_ndr/ndr_ntprinting.c",
841    "librpc/ndr/ndr_ntprinting.c",
842    "librpc/gen_ndr/ndr_idmap.c",
843    "librpc/gen_ndr/ndr_unixinfo.c",
844    "librpc/ndr/ndr_ntlmssp.c",
845    "librpc/gen_ndr/ndr_ntlmssp.c",
846    "librpc/gen_ndr/ndr_auth.c",
847    "librpc/ndr/ndr_auth.c",
848    "librpc/gen_ndr/ndr_witness.c",
849    "librpc/ndr/ndr_witness.c",
850    "source3/librpc/gen_ndr/ndr_smbXsrv.c",
851    "librpc/gen_ndr/ndr_gkdi.c",
852    "lib/ldb/common/ldb.c",
853    "lib/ldb/common/ldb_modules.c",
854    "lib/ldb/common/ldb_ldif.c",
855    "lib/ldb/common/ldb_parse.c",
856    "lib/ldb/common/ldb_msg.c",
857    "lib/ldb/common/ldb_utf8.c",
858    "lib/ldb/common/ldb_debug.c",
859    "lib/ldb/common/ldb_dn.c",
860    "lib/ldb/common/ldb_match.c",
861    "lib/ldb/common/ldb_options.c",
862    "lib/ldb/common/ldb_pack.c",
863    "lib/ldb/common/ldb_attributes.c",
864    "lib/ldb/common/attrib_handlers.c",
865    "lib/ldb/common/ldb_controls.c",
866    "lib/ldb/common/qsort.c",
867    "lib/ldb/ldb_map/ldb_map.c",
868    "lib/ldb/ldb_map/ldb_map_inbound.c",
869    "lib/ldb/ldb_map/ldb_map_outbound.c",
870    "lib/krb5_wrap/krb5_samba.c",
871    "lib/krb5_wrap/gss_samba.c",
872    "lib/krb5_wrap/keytab_util.c",
873    "lib/krb5_wrap/enctype_convert.c",
874    "lib/krb5_wrap/krb5_errs.c",
875    "lib/messaging/messages_dgm.c",
876    "lib/messaging/messages_dgm_ref.c",
877    "lib/pthreadpool/pthreadpool.c",
878    "lib/pthreadpool/pthreadpool_pipe.c",
879    "lib/pthreadpool/pthreadpool_tevent.c",
880    "lib/util/server_id_db.c",
881    "source3/lib/messages_util.c",
882    "source4/cluster/cluster.c",
883    "source4/cluster/local.c",
884    "source4/lib/socket/socket_ip.c",
885    "source4/libcli/resolve/resolve.c",
886    "source4/libcli/composite/composite.c",
887    "lib/samba-sockets.empty.c",
888    "source4/lib/socket/socket_unix.c",
889    "lib/util/access.c",
890    "source4/lib/socket/socket.c",
891    "source4/lib/socket/access.c",
892    "source4/lib/socket/connect_multi.c",
893    "source4/lib/socket/connect.c",
894    "lib/tsocket/tsocket.c",
895    "lib/tsocket/tsocket_helpers.c",
896    "lib/tsocket/tsocket_bsd.c",
897    "source4/lib/messaging/messaging_send.c",
898    "lib/util/unix_privs.c",
899    "libcli/ldap/ldap_message.c",
900    "libcli/ldap/ldap_ndr.c",
901    "libcli/auth/pam_errors.c",
902    "libcli/lsarpc/util_lsarpc.c",
903    "libcli/auth/ntlm_check.c",
904    "lib/util/util_str_escape.c",
905    "libcli/auth/credentials.c",
906    "libcli/auth/session.c",
907    "libcli/auth/smbencrypt.c",
908    "libcli/auth/smbdes.c",
909    "libcli/auth/msrpc_parse.c",
910    "libcli/auth/cliauth.empty.c",
911    "libcli/auth/spnego_parse.c",
912    "libcli/auth/schannel_state_tdb.c",
913    "libds/common/flag_mapping.c",
914    "auth/authn_policy.c",
915    "lib/audit_logging/audit_logging.c",
916    "auth/auth_sam_reply.c",
917    "auth/wbc_auth_util.c",
918    "auth/auth_log.c",
919    "auth/auth_util.c",
920    "lib/crypto/gmsa.c",
921    "lib/util/util_runcmd.c",
922    "source4/dsdb/common/util.c",
923    "source4/dsdb/common/util_trusts.c",
924    "source4/dsdb/common/util_groups.c",
925    "source4/dsdb/common/util_samr.c",
926    "source4/dsdb/common/dsdb_dn.c",
927    "source4/dsdb/common/dsdb_access.c",
928    "source4/dsdb/common/util_links.c",
929    "source4/dsdb/common/rodc_helper.c",
930    "source4/dsdb/gmsa/gkdi.c",
931    "source4/dsdb/gmsa/util.c",
932    "source3/lib/version.c",
933    "lib/crypto/gkdi.c",
934    "lib/util/util_ldb.c",
935    "lib/ldb-samba/ldb_wrap.c",
936    "source4/dsdb/schema/schema_init.c",
937    "source4/dsdb/schema/schema_set.c",
938    "source4/dsdb/schema/schema_query.c",
939    "source4/dsdb/schema/schema_syntax.c",
940    "source4/dsdb/schema/schema_description.c",
941    "source4/dsdb/schema/schema_convert_to_ol.c",
942    "source4/dsdb/schema/schema_inferiors.c",
943    "source4/dsdb/schema/schema_prefixmap.c",
944    "source4/dsdb/schema/schema_info_attr.c",
945    "source4/dsdb/schema/schema_filtered.c",
946    "source4/dsdb/schema/dsdb_dn.c",
947    "lib/ldb-samba/ldif_handlers.c",
948    "lib/ldb-samba/ldb_matching_rules.c",
949    "source4/auth/kerberos/kerberos_pac.c",
950    "source4/lib/tls/tlscert.c",
951    "source4/lib/tls/tls_tstream.c",
952    "source4/auth/kerberos/krb5_init_context.c",
953    "source4/lib/stream/packet.c",
954    "auth/kerberos/gssapi_pac.c",
955    "auth/kerberos/kerberos_pac.c",
956    "auth/kerberos/gssapi_helper.c",
957    "auth/credentials/credentials_secrets.c",
958    "auth/credentials/credentials.c",
959    "auth/credentials/credentials_krb5.c",
960    "source4/auth/kerberos/srv_keytab.c",
961    "source4/param/secrets.c",
962    "auth/credentials/credentials_ntlm.c",
963    "source4/auth/kerberos/kerberos_util.c",
964    "auth/credentials/credentials_gmsa.c",
965    "nsswitch/libwbclient/wbc_guid.c",
966    "nsswitch/libwbclient/wbc_idmap.c",
967    "nsswitch/libwbclient/wbclient.c",
968    "nsswitch/libwbclient/wbc_pam.c",
969    "nsswitch/libwbclient/wbc_pwd.c",
970    "nsswitch/libwbclient/wbc_sid.c",
971    "nsswitch/libwbclient/wbc_util.c",
972    "nsswitch/wb_common.c",
973    "libcli/drsuapi/repl_decrypt.c",
974    "source4/auth/session.c",
975    "source4/dsdb/samdb/samdb.c",
976    "source4/dsdb/samdb/samdb_privilege.c",
977    "source4/dsdb/samdb/cracknames.c",
978    "source4/dsdb/repl/replicated_objects.c",
979    "source4/auth/sam.c",
980    "source4/auth/system_session.c",
981    "lib/util/modules.c",
982    "libcli/http/gensec/generic.c",
983    "auth/ntlmssp/gensec_ntlmssp.c",
984    "auth/ntlmssp/ntlmssp.c",
985    "auth/ntlmssp/ntlmssp_util.c",
986    "auth/ntlmssp/ntlmssp_ndr.c",
987    "auth/ntlmssp/ntlmssp_client.c",
988    "auth/ntlmssp/ntlmssp_server.c",
989    "auth/ntlmssp/ntlmssp_sign.c",
990    "auth/ntlmssp/gensec_ntlmssp_server.c",
991    "auth/gensec/external.c",
992    "auth/gensec/schannel.c",
993    "source4/auth/gensec/gensec_tstream.c",
994    "auth/gensec/ncalrpc.c",
995    "auth/gensec/gensec.c",
996    "auth/gensec/gensec_start.c",
997    "auth/gensec/gensec_util.c",
998    "source4/auth/gensec/gensec_gssapi.c",
999    "auth/ntlmssp/gensec_ntlmssp.empty.c",
1000    "auth/gensec/spnego.c",
1001    "libcli/http/gensec/basic.c",
1002    "source3/lib/util_sec.c",
1003    "source3/lib/util_str.c",
1004    "source3/lib/adt_tree.c",
1005    "source3/lib/util_malloc.c",
1006    "source3/lib/file_id.c",
1007    "source3/lib/cbuf.c",
1008    "source3/lib/per_thread_cwd.c",
1009    "libcli/dns/dns.c",
1010    "libcli/dns/resolvconf.c",
1011    "lib/util/talloc_report_printf.c",
1012    "libcli/registry/util_reg.c",
1013    "source3/lib/cluster_support.c",
1014    "source3/lib/ctdb_dummy.c",
1015    "source3/lib/smbd_shim.c",
1016    "source3/lib/charcnv.c",
1017    "source3/lib/fstring.c",
1018    "source4/lib/socket/interface.c",
1019    "libcli/nbt/nbtsocket.c",
1020    "libcli/nbt/namequery.c",
1021    "libcli/nbt/nameregister.c",
1022    "libcli/nbt/namerefresh.c",
1023    "libcli/nbt/namerelease.c",
1024    "libcli/nbt/lmhosts.c",
1025    "lib/addns/dnsquery.c",
1026    "lib/addns/dnsrecord.c",
1027    "lib/addns/dnsutils.c",
1028    "lib/addns/dnssock.c",
1029    "lib/addns/dnsgss.c",
1030    "lib/addns/dnsmarshall.c",
1031    "lib/addns/error.c",
1032    "lib/addns/dnsquery_srv.c",
1033    "libcli/dns/dns_lookup.c",
1034    "source3/param/util.c",
1035    "source3/registry/reg_backend_smbconf.c",
1036    "source3/registry/reg_init_smbconf.c",
1037    "source3/registry/reg_util_token.c",
1038    "source3/registry/reg_api_util.c",
1039    "librpc/gen_ndr/ndr_messaging.c",
1040    "source3/registry/reg_api.c",
1041    "source3/registry/reg_dispatcher.c",
1042    "source3/registry/reg_cachehook.c",
1043    "source3/registry/reg_objects.c",
1044    "source3/registry/reg_util_internal.c",
1045    "source3/lib/util_nttoken.c",
1046    "source3/registry/reg_backend_db.c",
1047    "source3/registry/reg_parse_internal.c",
1048    "source3/registry/reg_parse.c",
1049    "source3/lib/srprs.c",
1050    "source3/registry/reg_init_basic.c",
1051    "source3/lib/dbwrap/dbwrap_open.c",
1052    "source3/lib/dbwrap/dbwrap_watch.c",
1053    "source3/lib/g_lock.c",
1054    "lib/smbconf/smbconf.c",
1055    "lib/smbconf/smbconf_txt.c",
1056    "lib/smbconf/smbconf_util.c",
1057    "source3/lib/util_tdb.c",
1058    "source3/lib/smbconf/smbconf_init.c",
1059    "source3/lib/smbconf/smbconf_reg.c",
1060    "source3/lib/util_tsock.c",
1061    "source3/param/loadparm.c",
1062    "source3/lib/sharesec.c",
1063    "source3/lib/ldap_debug_handler.c",
1064    "source3/lib/util_names.c",
1065    "source3/param/loadparm_ctx.c",
1066    "source3/libsmb/errormap.c",
1067    "source3/libsmb/smberr.c",
1068    "source3/lib/errmap_unix.c",
1069    "lib/util/util_pw.c",
1070    "lib/async_req/async_sock.c",
1071    "source3/lib/system.c",
1072    "source3/lib/sendfile.c",
1073    "source3/lib/recvfile.c",
1074    "source3/lib/time.c",
1075    "source3/lib/util_sid.c",
1076    "source3/lib/util_specialsids.c",
1077    "source3/lib/util_file.c",
1078    "source3/lib/util.c",
1079    "source3/lib/util_path.c",
1080    "source3/lib/util_matching.c",
1081    "source3/lib/util_procid.c",
1082    "source3/lib/util_sock.c",
1083    "source3/lib/util_transfer_file.c",
1084    "source3/lib/util_macstreams.c",
1085    "source3/lib/messages.c",
1086    "source3/lib/util_cluster.c",
1087    "source3/lib/id_cache.c",
1088    "source3/lib/serverid.c",
1089    "source3/lib/server_id_watch.c",
1090    "source3/lib/server_id_db_util.c",
1091    "source3/lib/addrchange.c",
1092    "lib/util/debug_s3.c",
1093    "source3/lib/dumpcore.c",
1094    "source3/lib/interface.c",
1095    "source3/lib/username.c",
1096    "source3/lib/smbrun.c",
1097    "source3/lib/wins_srv.c",
1098    "source3/lib/substitute.c",
1099    "source3/lib/substitute_generic.c",
1100    "source3/lib/ms_fnmatch.c",
1101    "source3/lib/tallocmsg.c",
1102    "source3/lib/dmallocmsg.c",
1103    "source3/lib/gencache.c",
1104    "source3/lib/util_event.c",
1105    "source3/lib/global_contexts.c",
1106    "source3/lib/ldap_escape.c",
1107    "source3/lib/system_smbd.c",
1108    "source3/lib/audit.c",
1109    "source3/lib/idmap_cache.c",
1110    "source3/lib/namemap_cache.c",
1111    "source3/lib/util_ea.c",
1112    "source3/lib/background.c",
1113    "source4/libcli/resolve/bcast.c",
1114    "source4/libcli/resolve/nbtlist.c",
1115    "source4/libcli/resolve/wins.c",
1116    "source4/libcli/resolve/dns_ex.c",
1117    "source4/libcli/resolve/host.c",
1118    "source4/libcli/resolve/lmhosts.c",
1119    "source4/libcli/resolve/resolve_lp.c",
1120    "libcli/util/tstream.c",
1121    "source4/libcli/ldap/ldap_client.c",
1122    "source4/libcli/ldap/ldap_bind.c",
1123    "source4/libcli/ldap/ldap_ildap.c",
1124    "source4/libcli/ldap/ldap_controls.c",
1125    "librpc/gen_ndr/ndr_cab.c",
1126    "librpc/ndr/ndr_cab.c",
1127    "librpc/gen_ndr/ndr_browser.c",
1128    "librpc/gen_ndr/ndr_w32time.c",
1129    "source4/librpc/gen_ndr/ndr_sasl_helpers.c",
1130    "librpc/gen_ndr/ndr_rot.c",
1131    "librpc/gen_ndr/ndr_nfs4acl.c",
1132    "source4/librpc/ndr-samba4.empty.c",
1133    "librpc/gen_ndr/ndr_winstation.c",
1134    "librpc/ndr/ndr_table.c",
1135    "source4/librpc/gen_ndr/tables.c",
1136    "librpc/gen_ndr/ndr_printcap.c",
1137    "librpc/gen_ndr/ndr_wzcsvc.c",
1138    "source4/librpc/gen_ndr/ndr_irpc.c",
1139    "librpc/gen_ndr/ndr_clusapi.c",
1140    "source4/librpc/gen_ndr/ndr_winsif.c",
1141    "librpc/gen_ndr/ndr_audiosrv.c",
1142    "librpc/gen_ndr/ndr_winspool.c",
1143    "librpc/ndr/ndr_orpc.c",
1144    "librpc/gen_ndr/ndr_orpc.c",
1145    "librpc/gen_ndr/ndr_fsrvp_state.c",
1146    "librpc/gen_ndr/ndr_winbind.c",
1147    "librpc/gen_ndr/ndr_rap.c",
1148    "librpc/ndr/ndr_rap.c",
1149    "source4/librpc/gen_ndr/ndr_opendb.c",
1150    "librpc/NDR_NBT.empty.c",
1151    "source4/librpc/gen_ndr/ndr_winsrepl.c",
1152    "librpc/gen_ndr/ndr_dsbackup.c",
1153    "librpc/gen_ndr/ndr_frstrans.c",
1154    "librpc/gen_ndr/ndr_efs.c",
1155    "librpc/gen_ndr/ndr_dfsblobs.c",
1156    "librpc/gen_ndr/ndr_quota.c",
1157    "librpc/gen_ndr/ndr_keysvc.c",
1158    "source3/librpc/gen_ndr/ndr_leases_db.c",
1159    "librpc/gen_ndr/ndr_preg.c",
1160    "librpc/ndr/ndr_preg.c",
1161    "librpc/ndr/ndr_bkupblobs.c",
1162    "librpc/gen_ndr/ndr_bkupblobs.c",
1163    "librpc/gen_ndr/ndr_frsapi.c",
1164    "librpc/gen_ndr/ndr_msgsvc.c",
1165    "librpc/gen_ndr/ndr_policyagent.c",
1166    "source3/librpc/gen_ndr/ndr_ads.c",
1167    "source3/librpc/ndr/ndr_ads.c",
1168    "librpc/gen_ndr/ndr_dcerpc.c",
1169    "librpc/ndr/ndr_dcerpc.c",
1170    "librpc/ndr/ndr_frsrpc.c",
1171    "librpc/gen_ndr/ndr_frsrpc.c",
1172    "source3/librpc/gen_ndr/ndr_perfcount.c",
1173    "librpc/gen_ndr/ndr_trkwks.c",
1174    "librpc/gen_ndr/ndr_dbgidl.c",
1175    "librpc/gen_ndr/ndr_scerpc.c",
1176    "source4/librpc/gen_ndr/ndr_ntp_signd.c",
1177    "librpc/gen_ndr/ndr_ioctl.c",
1178    "librpc/ndr/ndr_ioctl.c",
1179    "librpc/gen_ndr/ndr_smb_acl.c",
1180    "librpc/gen_ndr/ndr_ODJ.c",
1181    "librpc/ndr/ndr_ODJ.c",
1182    "source3/librpc/gen_ndr/ndr_secrets.c",
1183    "librpc/ndr/ndr_backupkey.c",
1184    "librpc/gen_ndr/ndr_backupkey.c",
1185    "librpc/gen_ndr/ndr_fscc.c",
1186    "libcli/smb/read_smb.c",
1187    "libcli/netlogon/netlogon.c",
1188    "libcli/cldap/cldap.c",
1189    "source3/passdb/secrets.c",
1190    "source3/passdb/machine_account_secrets.c",
1191    "source3/passdb/machine_sid.c",
1192    "source3/passdb/secrets_lsa.c",
1193    "librpc/rpc/dcerpc_error.c",
1194    "librpc/rpc/binding.c",
1195    "librpc/rpc/dcerpc_util.c",
1196    "librpc/rpc/binding_handle.c",
1197    "libcli/smb/smb_signing.c",
1198    "libcli/smb/smb_seal.c",
1199    "libcli/smb/smb2_negotiate_context.c",
1200    "libcli/smb/smb2_create_blob.c",
1201    "libcli/smb/smb2_signing.c",
1202    "libcli/smb/smb2_lease.c",
1203    "libcli/smb/util.c",
1204    "libcli/smb/smbXcli_base.c",
1205    "libcli/smb/smb1cli_trans.c",
1206    "libcli/smb/smb1cli_echo.c",
1207    "libcli/smb/smb1cli_create.c",
1208    "libcli/smb/smb1cli_session.c",
1209    "libcli/smb/smb1cli_close.c",
1210    "libcli/smb/smb1cli_write.c",
1211    "libcli/smb/smb1cli_read.c",
1212    "libcli/smb/smb2cli_session.c",
1213    "libcli/smb/smb2cli_tcon.c",
1214    "libcli/smb/smb2cli_create.c",
1215    "libcli/smb/smb2cli_close.c",
1216    "libcli/smb/smb2cli_read.c",
1217    "libcli/smb/smb2cli_write.c",
1218    "libcli/smb/smb2cli_flush.c",
1219    "libcli/smb/smb2cli_set_info.c",
1220    "libcli/smb/smb2cli_query_info.c",
1221    "libcli/smb/smb2cli_notify.c",
1222    "libcli/smb/smb2cli_query_directory.c",
1223    "libcli/smb/smb2cli_ioctl.c",
1224    "libcli/smb/smb2cli_echo.c",
1225    "libcli/smb/smb2_posix.c",
1226    "libcli/smb/tstream_smbXcli_np.c",
1227    "libcli/smb/reparse.c",
1228    "source3/lib/tldap.c",
1229    "source3/lib/tldap_util.c",
1230    "source3/lib/tldap_gensec_bind.c",
1231    "source3/lib/tldap_tls_connect.c",
1232    "third_party/heimdal_build/k5crypto.empty.c",
1233    "source3/libads/cldap.c",
1234    "source3/libads/netlogon_ping.c",
1235    "source3/librpc/crypto/gse_krb5.c",
1236    "source3/librpc/crypto/gse.c",
1237    "source3/libads/kerberos.c",
1238    "source3/libads/ads_status.c",
1239    "source3/libsmb/unexpected.c",
1240    "source3/libsmb/namecache.c",
1241    "source3/libsmb/nmblib.c",
1242    "source3/libsmb/clidgram.c",
1243    "source3/libsmb/namequery.c",
1244    "source3/libsmb/conncache.c",
1245    "source3/libads/sitename_cache.c",
1246    "librpc/gen_ndr/ndr_initshutdown_c.c",
1247    "librpc/gen_ndr/ndr_eventlog_c.c",
1248    "librpc/gen_ndr/ndr_wkssvc_c.c",
1249    "librpc/dcerpc-samba.empty.c",
1250    "librpc/gen_ndr/ndr_spoolss_c.c",
1251    "librpc/gen_ndr/ndr_epmapper_c.c",
1252    "librpc/gen_ndr/ndr_dfs_c.c",
1253    "librpc/gen_ndr/ndr_winreg_c.c",
1254    "librpc/gen_ndr/ndr_lsa_c.c",
1255    "librpc/gen_ndr/ndr_srvsvc_c.c",
1256    "librpc/gen_ndr/ndr_netlogon_c.c",
1257    "librpc/gen_ndr/ndr_svcctl_c.c",
1258    "librpc/gen_ndr/ndr_echo_c.c",
1259    "librpc/gen_ndr/ndr_atsvc_c.c",
1260    "librpc/gen_ndr/ndr_ntsvcs_c.c",
1261    "librpc/gen_ndr/ndr_gkdi_c.c",
1262    "librpc/gen_ndr/ndr_samr_c.c",
1263    "librpc/gen_ndr/ndr_dnsserver_c.c",
1264    "libcli/named_pipe_auth/npa_tstream.c",
1265    "libcli/named_pipe_auth/tstream_u32_read.c",
1266    "source3/libsmb/auth_generic.c",
1267    "source3/libsmb/clientgen.c",
1268    "source3/libsmb/cliconnect.c",
1269    "source3/libsmb/clifile.c",
1270    "source3/libsmb/clirap.c",
1271    "source3/libsmb/clierror.c",
1272    "source3/libsmb/climessage.c",
1273    "source3/libsmb/clireadwrite.c",
1274    "source3/libsmb/clilist.c",
1275    "source3/libsmb/cliprint.c",
1276    "source3/libsmb/clitrans.c",
1277    "source3/libsmb/clisecdesc.c",
1278    "source3/libsmb/cliquota.c",
1279    "source3/libsmb/clifsinfo.c",
1280    "source3/libsmb/clidfs.c",
1281    "source3/libsmb/clioplock.c",
1282    "source3/libsmb/async_smb.c",
1283    "source3/libsmb/clisymlink.c",
1284    "source3/libsmb/smbsock_connect.c",
1285    "source3/libsmb/cli_smb2_fnum.c",
1286    "source3/rpc_client/cli_pipe.c",
1287    "source3/rpc_client/rpc_transport_np.c",
1288    "source3/rpc_client/rpc_transport_sock.c",
1289    "source3/rpc_client/rpc_transport_tstream.c",
1290    "source3/rpc_client/local_np.c",
1291    "source3/librpc/rpc/dcerpc_helpers.c",
1292    "libcli/auth/netlogon_creds_cli.c",
1293    "source3/rpc_client/cli_lsarpc.c",
1294    "source3/rpc_client/init_lsa.c",
1295    "source3/libsmb/libsmb_cache.c",
1296    "source3/libsmb/libsmb_compat.c",
1297    "source3/libsmb/libsmb_context.c",
1298    "source3/libsmb/libsmb_dir.c",
1299    "source3/libsmb/libsmb_file.c",
1300    "source3/libsmb/libsmb_misc.c",
1301    "source3/libsmb/libsmb_path.c",
1302    "source3/libsmb/libsmb_printjob.c",
1303    "source3/libsmb/libsmb_server.c",
1304    "source3/libsmb/libsmb_stat.c",
1305    "source3/libsmb/libsmb_xattr.c",
1306    "source3/libsmb/libsmb_setget.c",
1307];
1308
1309const TDB_SRC: &[&str] = &[
1310    "lib/tdb/common/check.c",
1311    "lib/tdb/common/error.c",
1312    "lib/tdb/common/tdb.c",
1313    "lib/tdb/common/traverse.c",
1314    "lib/tdb/common/freelistcheck.c",
1315    "lib/tdb/common/lock.c",
1316    "lib/tdb/common/dump.c",
1317    "lib/tdb/common/freelist.c",
1318    "lib/tdb/common/io.c",
1319    "lib/tdb/common/open.c",
1320    "lib/tdb/common/transaction.c",
1321    "lib/tdb/common/hash.c",
1322    "lib/tdb/common/summary.c",
1323    "lib/tdb/common/rescue.c",
1324    "lib/tdb/common/mutex.c",
1325];
1326
1327const TALLOC_SRC: &[&str] = &["lib/talloc/talloc.c"];
1328
1329const TEVENT_SRC: &[&str] = &[
1330    "lib/tevent/tevent.c",
1331    "lib/tevent/tevent_debug.c",
1332    "lib/tevent/tevent_fd.c",
1333    "lib/tevent/tevent_immediate.c",
1334    "lib/tevent/tevent_queue.c",
1335    "lib/tevent/tevent_req.c",
1336    "lib/tevent/tevent_wrapper.c",
1337    "lib/tevent/tevent_poll.c",
1338    "lib/tevent/tevent_threads.c",
1339    "lib/tevent/tevent_signal.c",
1340    "lib/tevent/tevent_standard.c",
1341    "lib/tevent/tevent_timed.c",
1342    "lib/tevent/tevent_util.c",
1343    "lib/tevent/tevent_wakeup.c",
1344    #[cfg(target_os = "linux")]
1345    "lib/tevent/tevent_epoll.c",
1346];
1347
1348/// Artifacts produced by the build process.
1349pub struct Artifacts {
1350    pub lib_dir: PathBuf,
1351    pub include_dir: PathBuf,
1352}
1353
1354/// samba version
1355pub fn version() -> &'static str {
1356    // get pkg version and remove any `-`
1357    env!("CARGO_PKG_VERSION")
1358        .split('-')
1359        .next()
1360        .expect("Invalid version format")
1361}
1362
1363/// Build configuration
1364pub struct Build {
1365    out_dir: Option<PathBuf>,
1366    target: Option<String>,
1367    host: Option<String>,
1368    samba_dir: Option<PathBuf>,
1369    gnutls: Option<Vec<PathBuf>>,
1370}
1371
1372impl Default for Build {
1373    fn default() -> Self {
1374        Self::new()
1375    }
1376}
1377
1378impl Build {
1379    /// Init a new [`Build`] configuration.
1380    pub fn new() -> Build {
1381        Build {
1382            out_dir: env::var_os("OUT_DIR").map(|s| PathBuf::from(s).join("samba-build")),
1383            target: env::var("TARGET").ok(),
1384            host: env::var("HOST").ok(),
1385            samba_dir: Some(PathBuf::from("/usr/local/samba")),
1386            gnutls: None,
1387        }
1388    }
1389
1390    pub fn out_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build {
1391        self.out_dir = Some(path.as_ref().to_path_buf());
1392        self
1393    }
1394
1395    pub fn target(&mut self, target: &str) -> &mut Build {
1396        self.target = Some(target.to_string());
1397        self
1398    }
1399
1400    pub fn host(&mut self, host: &str) -> &mut Build {
1401        self.host = Some(host.to_string());
1402        self
1403    }
1404
1405    pub fn samba_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build {
1406        self.samba_dir = Some(path.as_ref().to_path_buf());
1407        self
1408    }
1409
1410    pub fn gnutls(&mut self, paths: Vec<PathBuf>) -> &mut Build {
1411        self.gnutls = Some(paths);
1412        self
1413    }
1414
1415    fn cmd_make(&self) -> Result<Command, &'static str> {
1416        let host = &self.host.as_ref().ok_or("HOST dir not set")?[..];
1417        Ok(
1418            if host.contains("dragonfly")
1419                || host.contains("freebsd")
1420                || host.contains("openbsd")
1421                || host.contains("solaris")
1422                || host.contains("illumos")
1423            {
1424                Command::new("gmake")
1425            } else {
1426                Command::new("make")
1427            },
1428        )
1429    }
1430
1431    /// Build the samba library. Print cargo:warning=... if the build fails.
1432    pub fn build(&mut self) -> Artifacts {
1433        match self.try_build() {
1434            Ok(a) => a,
1435            Err(e) => {
1436                println!("cargo:warning=pavao-src: failed to build samba from source");
1437                eprintln!("\n\n\n{e}\n\n\n");
1438                std::process::exit(1);
1439            }
1440        }
1441    }
1442
1443    /// Try to build the samba library.
1444    pub fn try_build(&mut self) -> Result<Artifacts, String> {
1445        let target = &self.target.as_ref().ok_or("TARGET dir not set")?[..];
1446        let host = &self.host.as_ref().ok_or("HOST dir not set")?[..];
1447        let os = Self::os(target)?;
1448        let out_dir = self.out_dir.as_ref().ok_or("OUT_DIR not set")?;
1449        let build_dir = out_dir.join("build");
1450
1451        if build_dir.exists() {
1452            fs::remove_dir_all(&build_dir).map_err(|e| format!("build_dir: {e}"))?;
1453        }
1454
1455        let inner_dir = build_dir.join("src");
1456        fs::create_dir_all(&inner_dir).map_err(|e| format!("{}: {e}", inner_dir.display()))?;
1457
1458        // get src at `inner_dir`
1459        clone_samba(&inner_dir)?;
1460
1461        // init cc
1462        let mut cc = cc::Build::new();
1463        cc.target(target).host(host).warnings(false).opt_level(2);
1464        let compiler = cc.get_compiler();
1465        let mut cc_env = compiler.cc_env();
1466        if cc_env.is_empty() {
1467            cc_env = compiler.path().to_path_buf().into_os_string();
1468        }
1469
1470        // get ar
1471        let ar = cc.get_archiver();
1472
1473        // configure
1474        let mut configure = Command::new("sh");
1475        configure.arg("./configure");
1476        configure.arg("--disable-python");
1477        configure.arg("--without-systemd");
1478        configure.arg("--without-ldb-lmdb");
1479        configure.arg("--without-ad-dc");
1480        configure.arg("--bundled-libraries=ALL");
1481        configure.arg("--without-libarchive");
1482        #[cfg(target_os = "macos")]
1483        configure.arg("--without-acl-support"); // not supported on mac
1484        configure.env("CC", cc_env);
1485        configure.env("AR", ar.get_program());
1486        // On MacOS we need to explicitly declare include paths for gnutls
1487        #[cfg(target_os = "macos")]
1488        {
1489            let gnutls_paths = self.gnutls.as_ref().ok_or("gnutls paths not set")?;
1490            add_env_includes(&mut configure, gnutls_paths)?;
1491        }
1492
1493        let ranlib = cc.get_ranlib();
1494        let mut args = vec![ranlib.get_program()];
1495        args.extend(ranlib.get_args());
1496        configure.env("RANLIB", args.join(OsStr::new(" ")));
1497
1498        let mut skip_next = false;
1499        let mut is_isysroot = false;
1500        let mut ios_isysroot = None;
1501        for arg in compiler.args() {
1502            // For whatever reason `-static` on MUSL seems to cause
1503            // issues...
1504            if target.contains("musl") && arg == "-static" {
1505                continue;
1506            }
1507
1508            // cc includes an `-arch` flag for Apple platforms, but we've
1509            // already selected an arch implicitly via the target above, and
1510            // OpenSSL contains about the conflict if both are specified.
1511            if target.contains("apple") && arg == "-arch" {
1512                skip_next = true;
1513                continue;
1514            }
1515
1516            // cargo-lipo specifies this but OpenSSL complains
1517            if target.contains("apple-ios") {
1518                if arg == "-isysroot" {
1519                    is_isysroot = true;
1520                    continue;
1521                }
1522
1523                if is_isysroot {
1524                    is_isysroot = false;
1525                    ios_isysroot = Some(arg.to_str().ok_or("isysroot arg")?.to_string());
1526                    continue;
1527                }
1528            }
1529
1530            if skip_next {
1531                skip_next = false;
1532                continue;
1533            }
1534        }
1535
1536        if os.contains("iossimulator") {
1537            if let Some(ref isysr) = ios_isysroot {
1538                configure.env(
1539                    "CC",
1540                    format!(
1541                        "xcrun -sdk iphonesimulator cc -isysroot {}",
1542                        Path::new(isysr).display()
1543                    ),
1544                );
1545            }
1546        }
1547
1548        configure.current_dir(&inner_dir);
1549        // run configure
1550        self.run_command(configure, "configuring samba build")?;
1551
1552        // make tdb
1553        self.build_target("tdb", &inner_dir, &ios_isysroot)?;
1554        // make smbclient
1555        self.build_target("smbclient", &inner_dir, &ios_isysroot)?;
1556
1557        // build static library -> bin/default/source3/libsmb
1558        let lib_dir = inner_dir.join("bin").join("default");
1559
1560        let mut build_static = cc.get_archiver();
1561        build_static.arg("rcs");
1562        build_static.arg("libsmbclient.a");
1563        build_static.current_dir(&lib_dir);
1564
1565        // dedup src files
1566        let unique_src: HashSet<String> = SRC_FILES
1567            .iter()
1568            .chain(TDB_SRC)
1569            .chain(TALLOC_SRC)
1570            .chain(TEVENT_SRC)
1571            .map(|s| s.to_string())
1572            .collect();
1573
1574        let mut logfile = std::fs::File::create("/tmp/samba-build.log")
1575            .map_err(|e| format!("failed to create build log: {e}"))?;
1576        // push object
1577        for object in unique_src {
1578            let path = lib_dir.join(object);
1579
1580            let object_file = Self::find_object_for_src(&path).ok_or(format!(
1581                "object file not found for source file: {}",
1582                path.display()
1583            ))?;
1584
1585            use std::io::Write;
1586            writeln!(logfile, "object file: {}", object_file.display()).ok();
1587            build_static.arg(object_file.display().to_string());
1588        }
1589
1590        // run ar
1591        self.run_command(build_static, "building static library")?;
1592
1593        // include_dir -> bin/default/include/public/
1594        let include_dir = inner_dir
1595            .join("bin")
1596            .join("default")
1597            .join("include")
1598            .join("public");
1599
1600        Ok(Artifacts {
1601            lib_dir,
1602            include_dir,
1603        })
1604    }
1605
1606    fn find_object_for_src(src: &Path) -> Option<PathBuf> {
1607        let glob = format!("{}.*.o", src.display());
1608        glob::glob(&glob)
1609            .ok()?
1610            .filter_map(|entry| entry.ok())
1611            .next()
1612    }
1613
1614    fn build_target(
1615        &self,
1616        target: &str,
1617        build_dir: &Path,
1618        ios_isysroot: &Option<String>,
1619    ) -> Result<(), String> {
1620        let mut make = self.cmd_make()?;
1621        make.current_dir(build_dir);
1622        make.arg(target);
1623        if let Some(s) = env::var_os("CARGO_MAKEFLAGS") {
1624            make.env("MAKEFLAGS", s);
1625        }
1626        if let Some(ref isysr) = ios_isysroot {
1627            let components: Vec<&str> = isysr.split("/SDKs/").collect();
1628            make.env("CROSS_TOP", components[0]);
1629            make.env("CROSS_SDK", components[1]);
1630        }
1631        self.run_command(make, &format!("building {target}"))
1632    }
1633
1634    #[track_caller]
1635    fn run_command(&self, mut command: Command, desc: &str) -> Result<(), String> {
1636        println!("running {:?}", command);
1637        let status = command.status();
1638
1639        let verbose_error = match status {
1640            Ok(status) if status.success() => return Ok(()),
1641            Ok(status) => format!(
1642                "'{exe}' reported failure with {status}",
1643                exe = command.get_program().to_string_lossy()
1644            ),
1645            Err(failed) => match failed.kind() {
1646                std::io::ErrorKind::NotFound => format!(
1647                    "Command '{exe}' not found. Is {exe} installed?",
1648                    exe = command.get_program().to_string_lossy()
1649                ),
1650                _ => format!(
1651                    "Could not run '{exe}', because {failed}",
1652                    exe = command.get_program().to_string_lossy()
1653                ),
1654            },
1655        };
1656        println!("cargo:warning={desc}: {verbose_error}");
1657        Err(format!(
1658            "Error {desc}:
1659    {verbose_error}
1660    Command failed: {command:?}"
1661        ))
1662    }
1663
1664    fn os(target: &str) -> Result<&'static str, String> {
1665        let os = match target {
1666            "aarch64-apple-darwin" => "darwin64-arm64-cc",
1667            "aarch64-linux-android" => "linux-aarch64",
1668            "aarch64-unknown-freebsd" => "BSD-generic64",
1669            "aarch64-unknown-openbsd" => "BSD-generic64",
1670            "aarch64-unknown-linux-gnu" => "linux-aarch64",
1671            "aarch64-unknown-linux-musl" => "linux-aarch64",
1672            "aarch64-alpine-linux-musl" => "linux-aarch64",
1673            "aarch64-chimera-linux-musl" => "linux-aarch64",
1674            "aarch64-unknown-netbsd" => "BSD-generic64",
1675            "aarch64_be-unknown-netbsd" => "BSD-generic64",
1676            "aarch64-pc-windows-msvc" => "VC-WIN64-ARM",
1677            "aarch64-uwp-windows-msvc" => "VC-WIN64-ARM-UWP",
1678            "arm-linux-androideabi" => "linux-armv4",
1679            "armv7-linux-androideabi" => "linux-armv4",
1680            "arm-unknown-linux-gnueabi" => "linux-armv4",
1681            "arm-unknown-linux-gnueabihf" => "linux-armv4",
1682            "arm-unknown-linux-musleabi" => "linux-armv4",
1683            "arm-unknown-linux-musleabihf" => "linux-armv4",
1684            "arm-chimera-linux-musleabihf" => "linux-armv4",
1685            "armv5te-unknown-linux-gnueabi" => "linux-armv4",
1686            "armv5te-unknown-linux-musleabi" => "linux-armv4",
1687            "armv6-unknown-freebsd" => "BSD-generic32",
1688            "armv6-alpine-linux-musleabihf" => "linux-armv6",
1689            "armv7-unknown-freebsd" => "BSD-armv4",
1690            "armv7-unknown-linux-gnueabi" => "linux-armv4",
1691            "armv7-unknown-linux-musleabi" => "linux-armv4",
1692            "armv7-unknown-linux-gnueabihf" => "linux-armv4",
1693            "armv7-unknown-linux-musleabihf" => "linux-armv4",
1694            "armv7-alpine-linux-musleabihf" => "linux-armv4",
1695            "armv7-chimera-linux-musleabihf" => "linux-armv4",
1696            "armv7-unknown-netbsd-eabihf" => "BSD-generic32",
1697            "asmjs-unknown-emscripten" => "gcc",
1698            "i586-unknown-linux-gnu" => "linux-elf",
1699            "i586-unknown-linux-musl" => "linux-elf",
1700            "i586-alpine-linux-musl" => "linux-elf",
1701            "i586-unknown-netbsd" => "BSD-x86-elf",
1702            "i686-apple-darwin" => "darwin-i386-cc",
1703            "i686-linux-android" => "linux-elf",
1704            "i686-pc-windows-gnu" => "mingw",
1705            "i686-pc-windows-msvc" => "VC-WIN32",
1706            "i686-win7-windows-msvc" => "VC-WIN32",
1707            "i686-unknown-freebsd" => "BSD-x86-elf",
1708            "i686-unknown-haiku" => "haiku-x86",
1709            "i686-unknown-linux-gnu" => "linux-elf",
1710            "i686-unknown-linux-musl" => "linux-elf",
1711            "i686-unknown-netbsd" => "BSD-x86-elf",
1712            "i686-uwp-windows-msvc" => "VC-WIN32-UWP",
1713            "loongarch64-unknown-linux-gnu" => "linux-generic64",
1714            "loongarch64-unknown-linux-musl" => "linux-generic64",
1715            "mips-unknown-linux-gnu" => "linux-mips32",
1716            "mips-unknown-linux-musl" => "linux-mips32",
1717            "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
1718            "mips64-unknown-linux-muslabi64" => "linux64-mips64",
1719            "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
1720            "mips64el-unknown-linux-muslabi64" => "linux64-mips64",
1721            "mipsel-unknown-linux-gnu" => "linux-mips32",
1722            "mipsel-unknown-linux-musl" => "linux-mips32",
1723            "powerpc-unknown-freebsd" => "BSD-ppc",
1724            "powerpc-unknown-linux-gnu" => "linux-ppc",
1725            "powerpc-unknown-linux-gnuspe" => "linux-ppc",
1726            "powerpc-chimera-linux-musl" => "linux-ppc",
1727            "powerpc-unknown-netbsd" => "BSD-generic32",
1728            "powerpc64-unknown-freebsd" => "BSD-ppc64",
1729            "powerpc64-unknown-linux-gnu" => "linux-ppc64",
1730            "powerpc64-unknown-linux-musl" => "linux-ppc64",
1731            "powerpc64-chimera-linux-musl" => "linux-ppc64",
1732            "powerpc64le-unknown-freebsd" => "BSD-ppc64le",
1733            "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
1734            "powerpc64le-unknown-linux-musl" => "linux-ppc64le",
1735            "powerpc64le-alpine-linux-musl" => "linux-ppc64le",
1736            "powerpc64le-chimera-linux-musl" => "linux-ppc64le",
1737            "riscv64gc-unknown-freebsd" => "BSD-riscv64",
1738            "riscv64gc-unknown-linux-gnu" => "linux64-riscv64",
1739            "riscv64gc-unknown-linux-musl" => "linux64-riscv64",
1740            "riscv64-alpine-linux-musl" => "linux64-riscv64",
1741            "riscv64-chimera-linux-musl" => "linux64-riscv64",
1742            "riscv64gc-unknown-netbsd" => "BSD-generic64",
1743            "s390x-unknown-linux-gnu" => "linux64-s390x",
1744            "sparc64-unknown-netbsd" => "BSD-generic64",
1745            "s390x-unknown-linux-musl" => "linux64-s390x",
1746            "s390x-alpine-linux-musl" => "linux64-s390x",
1747            "sparcv9-sun-solaris" => "solaris64-sparcv9-gcc",
1748            "thumbv7a-uwp-windows-msvc" => "VC-WIN32-ARM-UWP",
1749            "x86_64-apple-darwin" => "darwin64-x86_64-cc",
1750            "x86_64-linux-android" => "linux-x86_64",
1751            "x86_64-linux" => "linux-x86_64",
1752            "x86_64-pc-windows-gnu" => "mingw64",
1753            "x86_64-pc-windows-gnullvm" => "mingw64",
1754            "x86_64-pc-windows-msvc" => "VC-WIN64A",
1755            "x86_64-win7-windows-msvc" => "VC-WIN64A",
1756            "x86_64-unknown-freebsd" => "BSD-x86_64",
1757            "x86_64-unknown-dragonfly" => "BSD-x86_64",
1758            "x86_64-unknown-haiku" => "haiku-x86_64",
1759            "x86_64-unknown-illumos" => "solaris64-x86_64-gcc",
1760            "x86_64-unknown-linux-gnu" => "linux-x86_64",
1761            "x86_64-unknown-linux-musl" => "linux-x86_64",
1762            "x86_64-alpine-linux-musl" => "linux-x86_64",
1763            "x86_64-chimera-linux-musl" => "linux-x86_64",
1764            "x86_64-unknown-openbsd" => "BSD-x86_64",
1765            "x86_64-unknown-netbsd" => "BSD-x86_64",
1766            "x86_64-uwp-windows-msvc" => "VC-WIN64A-UWP",
1767            "x86_64-pc-solaris" => "solaris64-x86_64-gcc",
1768            "wasm32-unknown-emscripten" => "gcc",
1769            "wasm32-unknown-unknown" => "gcc",
1770            "wasm32-wasi" => "gcc",
1771            "aarch64-apple-ios" => "ios64-cross",
1772            "x86_64-apple-ios" => "iossimulator-xcrun",
1773            "aarch64-apple-ios-sim" => "iossimulator-xcrun",
1774            "aarch64-unknown-linux-ohos" => "linux-aarch64",
1775            "armv7-unknown-linux-ohos" => "linux-generic32",
1776            "x86_64-unknown-linux-ohos" => "linux-x86_64",
1777            _ => {
1778                return Err(format!(
1779                    "don't know how to configure OpenSSL for {}",
1780                    target
1781                ))
1782            }
1783        };
1784
1785        Ok(os)
1786    }
1787}
1788
1789/// Clone samba repository to the given path.
1790fn clone_samba(p: &Path) -> Result<(), String> {
1791    let repo_url = "https://git.samba.org/samba.git";
1792    let repo = git2::Repository::clone(repo_url, p).map_err(|e| format!("cloning samba: {e}"))?;
1793
1794    // checkout tag "samba-4.22.0"
1795    let tag = format!("samba-{}", version());
1796    let obj = repo
1797        .revparse_single(&tag)
1798        .map_err(|e| format!("revparse_single: {e}"))?;
1799
1800    let commit = obj
1801        .peel_to_commit()
1802        .map_err(|e| format!("peel_to_commit: {e}"))?;
1803
1804    repo.checkout_tree(&obj, None)
1805        .map_err(|e| format!("checkout_tree: {e}"))?;
1806
1807    repo.set_head_detached(commit.id())
1808        .map_err(|e| format!("set_head_detached: {e}"))?;
1809
1810    Ok(())
1811}
1812
1813#[cfg(target_os = "macos")]
1814fn add_env_includes(cmd: &mut Command, include_paths: &[PathBuf]) -> Result<(), String> {
1815    let cflags = include_paths
1816        .iter()
1817        .map(|p| format!("-I{}", p.display()))
1818        .collect::<Vec<_>>()
1819        .join(" ");
1820    cmd.env("CFLAGS", cflags);
1821
1822    Ok(())
1823}