tests/krb5: Allow specifying prefix or suffix for test account names
[Samba.git] / source3 / wscript_build
blobd86a9fcadbfca2c4a613acc8e1373d789b0db472
1 #!/usr/bin/env python
3 LIBS='ICONV'
5 config_h = "../include/config.h"
7 bld.SAMBA_BLDOPTIONS('smbd/build_options.c')
9 bld.SETUP_BUILD_GROUPS()
11 ######################## SUBSYSTEMS #################################
13 bld.SAMBA3_LIBRARY('netapi',
14 source='''lib/netapi/netapi.c
15 lib/netapi/cm.c
16 lib/netapi/libnetapi.c
17 lib/netapi/joindomain.c
18 lib/netapi/serverinfo.c
19 lib/netapi/wkstainfo.c
20 lib/netapi/getdc.c
21 lib/netapi/user.c
22 lib/netapi/group.c
23 lib/netapi/localgroup.c
24 lib/netapi/samr.c
25 lib/netapi/sid.c
26 lib/netapi/share.c
27 lib/netapi/file.c
28 lib/netapi/shutdown.c
29 lib/netapi/netlogon.c''',
30 public_deps='''
31 talloc
32 util_cmdline
33 msrpc3
34 ads
35 NDR_LIBNETAPI
36 LIBNET
37 RPC_CLIENT_SCHANNEL
38 libcli_netlogon3
39 LIBCLI_SAMR
40 INIT_SAMR
41 auth
42 ''',
43 public_headers='../source3/lib/netapi/netapi.h',
44 pc_files='libnet/netapi.pc',
45 vnum='0')
47 bld.SAMBA3_LIBRARY('gse',
48 source='librpc/crypto/gse_krb5.c librpc/crypto/gse.c',
49 deps='krb5samba gensec smbconf KRBCLIENT secrets3',
50 private_library=True)
52 bld.SAMBA3_LIBRARY('msrpc3',
53 source='''
54 rpc_client/cli_pipe.c
55 rpc_client/rpc_transport_np.c
56 rpc_client/rpc_transport_sock.c
57 rpc_client/rpc_transport_tstream.c
58 librpc/rpc/dcerpc_helpers.c
59 ''',
60 deps='''
61 ndr
62 ndr-standard
63 RPC_NDR_EPMAPPER
64 NTLMSSP_COMMON
65 COMMON_SCHANNEL
66 LIBCLI_AUTH
67 LIBTSOCKET
68 gse
69 dcerpc-binding
70 libsmb
71 ndr-table
72 NETLOGON_CREDS_CLI
73 ''',
74 private_library=True)
76 bld.SAMBA3_SUBSYSTEM('AVAHI',
77 source='''
78 lib/avahi.c
79 smbd/avahi_register.c
80 ''',
81 deps='''
82 avahi-common
83 avahi-client
84 ''',
85 enabled=bld.env.with_avahi)
87 bld.SAMBA3_SUBSYSTEM('GROUPDB',
88 source='''
89 groupdb/mapping.c
90 groupdb/mapping_tdb.c
91 ''',
92 deps='tdb')
94 bld.SAMBA3_SUBSYSTEM('TLDAP',
95 source='''
96 lib/tldap.c
97 lib/tldap_util.c
98 lib/tldap_gensec_bind.c
99 ''',
100 deps='''
101 asn1util
102 LIBTSOCKET
103 samba3util
104 ''')
106 bld.SAMBA3_BINARY('test_tldap',
107 source='lib/test_tldap.c',
108 deps='''
109 asn1util
110 LIBTSOCKET
111 samba3util
112 smbconf
113 cmocka
114 ''',
115 for_selftest=True)
117 # libpdb.so should not expose internal symbols that are only usable
118 # to the statically linked modules that are merged into libpdb.
119 # Note that we always filter these symbols out in libpdb, even
120 # when modules are not linked statically. In the latter case
121 # symbols will not be present in the libpdb anyway so no hurt is
122 # done to the version script.
123 private_pdb_match = []
124 private_pdb_match.append('!idmap_init')
125 private_pdb_match.append('!idmap_sids_to_xids')
126 private_pdb_match.append('!idmap_xids_to_sids')
128 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
129 '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
130 '!dominfo_attr_list', '!get_attr_key2string',
131 '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
132 '!get_attr_list']
133 private_pdb_match.append('!pdb_nds_*')
134 private_pdb_match.append('!pdb_ldapsam_init*')
135 private_pdb_match.append('!pdb_*_init')
136 private_pdb_match = private_pdb_match + ldapsam_pdb_match
138 bld.SAMBA3_LIBRARY('samba-passdb',
139 source='',
140 deps='pdb',
141 private_library=False,
142 grouping_library=True,
143 pc_files=[],
144 public_headers_install=True,
145 public_headers='''
146 include/passdb.h
147 passdb/machine_sid.h
148 passdb/lookup_sid.h
149 ''',
150 abi_match=private_pdb_match,
151 abi_directory='passdb/ABI',
152 vnum='0.28.0')
154 bld.SAMBA3_SUBSYSTEM('pdb',
155 source='''
156 passdb/pdb_get_set.c
157 passdb/passdb.c
158 lib/util_wellknown.c
159 lib/util_builtin.c
160 passdb/pdb_compat.c
161 lib/util_sid_passdb.c
162 lib/util_unixsids.c
163 passdb/lookup_sid.c
164 passdb/login_cache.c
165 passdb/account_pol.c
166 lib/privileges.c
167 lib/util_nscd.c
168 lib/winbind_util.c
169 passdb/pdb_util.c
170 passdb/pdb_interface.c
171 passdb/pdb_secrets.c''',
172 deps='''
173 secrets3
174 GROUPDB
175 SERVER_MUTEX
176 wbclient
177 LIBCLI_AUTH
178 flag_mapping
179 samba-credentials
180 samba-modules
181 nscd
182 ''')
184 bld.SAMBA3_LIBRARY('smbldaphelper',
185 source='''
186 passdb/pdb_ldap_schema.c
187 passdb/pdb_ldap_util.c
188 ''',
189 deps='smbldap secrets3',
190 allow_undefined_symbols=True,
191 enabled=bld.CONFIG_SET('HAVE_LDAP'),
192 private_library=True)
194 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
195 source='lib/server_mutex.c',
196 deps='talloc')
198 # this includes only the low level parse code, not stuff
199 # that requires knowledge of security contexts
200 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
201 source='registry/reg_parse_prs.c')
203 bld.SAMBA3_SUBSYSTEM('REGFIO',
204 source='registry/regfio.c',
205 deps='samba-util REG_PARSE_PRS')
207 bld.SAMBA_BINARY('test_registry_regfio',
208 source='registry/tests/test_regfio.c',
209 deps='cmocka samba3-util smbconf REGFIO',
210 local_include=False,
211 for_selftest=True)
213 # Do not link against this use 'smbconf'
214 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
215 source='''
216 registry/reg_api.c
217 registry/reg_dispatcher.c
218 registry/reg_cachehook.c
219 registry/reg_objects.c
220 registry/reg_util_internal.c
221 lib/util_nttoken.c
222 registry/reg_backend_db.c
223 registry/reg_parse_internal.c
224 registry/reg_parse.c
225 lib/srprs.c
226 registry/reg_init_basic.c
227 ''',
228 deps='''
229 smbd_shim
230 tdb-wrap3
231 NDR_SECURITY
232 util_tdb
233 talloc
234 replace
235 util_reg
236 samba-util
237 samba-security
238 errors3
239 dbwrap
240 samba3-util
241 ''')
243 # Do not link against this use 'smbconf'
244 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
245 source='''
246 registry/reg_backend_smbconf.c
247 registry/reg_init_smbconf.c
248 registry/reg_util_token.c
249 registry/reg_api_util.c
250 ''',
251 deps='SMBREGISTRY')
253 bld.SAMBA3_SUBSYSTEM('REG_FULL',
254 source='''
255 registry/reg_backend_printing.c
256 registry/reg_backend_shares.c
257 registry/reg_backend_netlogon_params.c
258 registry/reg_backend_prod_options.c
259 registry/reg_backend_tcpip_params.c
260 registry/reg_backend_hkpt_params.c
261 registry/reg_backend_current_version.c
262 registry/reg_backend_perflib.c
263 registry/reg_init_full.c
264 registry/reg_perfcount.c''',
265 deps='''
266 smbconf
267 tdb-wrap3
268 ''')
270 bld.SAMBA3_LIBRARY('popt_samba3',
271 source='lib/popt_common.c',
272 deps='popt samba-util smbconf',
273 private_library=True)
275 bld.SAMBA3_LIBRARY('popt_samba3_cmdline',
276 source='lib/popt_common_cmdline.c',
277 deps='popt_samba3 util_cmdline cmdline_contexts',
278 private_library=True)
280 bld.SAMBA3_LIBRARY('util_cmdline',
281 source='lib/util_cmdline.c',
282 deps='secrets3 samba-credentials',
283 private_library=True)
285 bld.SAMBA3_LIBRARY('cmdline_contexts',
286 source='lib/cmdline_contexts.c',
287 deps='samba3core',
288 private_library=True)
290 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
291 source='libads/kerberos.c libads/ads_status.c',
292 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
294 bld.SAMBA3_SUBSYSTEM('samba3util',
295 source='''
296 lib/system.c
297 lib/sendfile.c
298 lib/recvfile.c
299 lib/time.c
300 lib/util_sid.c
301 lib/util_specialsids.c
302 lib/util_file.c
303 lib/util.c
304 lib/util_path.c
305 lib/util_procid.c
306 lib/util_sock.c
307 lib/util_tsock.c
308 lib/util_transfer_file.c
309 lib/util_macstreams.c
310 ''',
311 deps='''
312 CHARSET3
314 LIBTSOCKET
315 samba-security
316 NDR_SECURITY
317 samba-util
318 util_tdb
319 sys_rw
320 iov_buf
321 ''')
323 if bld.env.with_ctdb:
324 SAMBA_CLUSTER_SUPPORT_SOURCES='''
325 lib/cluster_support.c
326 lib/dbwrap/dbwrap_ctdb.c
327 lib/messages_ctdb.c
328 lib/messages_ctdb_ref.c
329 lib/ctdbd_conn.c
331 SAMBA_CLUSTER_SUPPORT_DEPS='''
332 talloc
333 tevent
336 else:
337 SAMBA_CLUSTER_SUPPORT_SOURCES='''
338 lib/cluster_support.c
339 lib/ctdb_dummy.c
341 SAMBA_CLUSTER_SUPPORT_DEPS='''
342 talloc
343 tevent
346 bld.SAMBA3_LIBRARY('samba-cluster-support',
347 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
348 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
349 allow_undefined_symbols=True,
350 private_library=True)
352 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
353 source='''
354 lib/dbwrap/dbwrap_open.c
355 lib/dbwrap/dbwrap_watch.c
356 lib/g_lock.c
357 ''',
358 deps='''
359 dbwrap
360 samba-cluster-support
361 ''')
363 bld.SAMBA3_LIBRARY('messages_util',
364 source='''lib/messages_util.c''',
365 deps='samba-util',
366 private_library=True)
368 bld.SAMBA3_SUBSYSTEM('samba3core',
369 source='''
370 lib/messages.c
371 lib/util_cluster.c
372 lib/id_cache.c
373 lib/serverid.c
374 lib/server_id_watch.c
375 lib/server_id_db_util.c
376 lib/addrchange.c
377 ../lib/util/debug_s3.c
378 lib/dumpcore.c
379 lib/interface.c
380 lib/username.c
381 lib/smbrun.c
382 lib/wins_srv.c
383 lib/substitute.c
384 lib/substitute_generic.c
385 lib/ms_fnmatch.c
386 lib/tallocmsg.c
387 lib/dmallocmsg.c
388 lib/gencache.c
389 lib/util_event.c
390 lib/global_contexts.c
391 lib/server_prefork.c
392 lib/server_prefork_util.c
393 lib/ldap_escape.c
394 lib/system_smbd.c
395 lib/audit.c
396 lib/idmap_cache.c
397 lib/namemap_cache.c
398 lib/util_ea.c
399 lib/background.c
400 ''',
401 deps='''
402 samba3util
403 LIBTSOCKET
404 NDR_MESSAGING
405 LIBASYNC_REQ
406 UTIL_PW
407 SAMBA_VERSION
408 PTHREADPOOL
409 interfaces
410 smbconf
411 dbwrap
412 samba3-util
413 errors3
414 server_id_db
415 messages_util
416 messages_dgm
417 talloc_report_printf
418 access
419 TDB_LIB
421 ''')
423 bld.SAMBA3_LIBRARY('smbd_shim',
424 source='''lib/smbd_shim.c''',
425 deps='talloc',
426 private_library=True)
428 bld.SAMBA3_SUBSYSTEM('auth_generic',
429 source='libsmb/auth_generic.c',
430 deps='gse gensec')
432 bld.SAMBA3_LIBRARY('libsmb',
433 source='''
434 libsmb/clientgen.c
435 libsmb/cliconnect.c
436 libsmb/clifile.c
437 libsmb/clispnego.c
438 libsmb/clirap.c
439 libsmb/clierror.c
440 libsmb/climessage.c
441 libsmb/clireadwrite.c
442 libsmb/clilist.c
443 libsmb/cliprint.c
444 libsmb/clitrans.c
445 libsmb/clisecdesc.c
446 libsmb/clistr.c
447 libsmb/cliquota.c
448 libsmb/clifsinfo.c
449 libsmb/clidfs.c
450 libsmb/clioplock.c
451 libsmb/async_smb.c
452 libsmb/reparse_symlink.c
453 libsmb/clisymlink.c
454 libsmb/smbsock_connect.c
455 libsmb/cli_smb2_fnum.c
456 ''',
457 deps='''
458 auth_generic
459 CLDAP
460 LIBNMB
461 SPNEGO_PARSE
462 LIBTSOCKET
463 KRBCLIENT
464 NDR_IOCTL
465 NDR_QUOTA
466 cli_smb_common
467 util_cmdline
468 tevent
469 ''',
470 private_library=True)
472 bld.SAMBA3_SUBSYSTEM('CLDAP',
473 source='libads/cldap.c',
474 deps='cli-ldap-common cli_cldap LIBTSOCKET')
476 # NOTE: The secrets3 library is a low level library used by several subsystems.
477 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
478 # doing that your design is wrong and needs changing. -SSS
479 bld.SAMBA3_LIBRARY('secrets3',
480 source='''
481 passdb/secrets.c
482 passdb/machine_account_secrets.c
483 passdb/machine_sid.c
484 passdb/secrets_lsa.c
485 ''',
486 deps='''
487 NDR_SECRETS
488 smbconf
489 samba3util
490 dbwrap
491 krb5samba
492 LIBCLI_AUTH
493 ''',
494 private_library=True)
496 bld.SAMBA3_LIBRARY('smbldap',
497 source='lib/smbldap.c',
498 deps='ldap lber samba-util smbconf',
499 enabled=bld.CONFIG_SET("HAVE_LDAP"),
500 private_library=False,
501 abi_directory='lib/ABI',
502 abi_match='smbldap_*',
503 pc_files=[],
504 vnum='2',
505 public_headers='include/smbldap.h include/smb_ldap.h')
507 bld.SAMBA3_LIBRARY('ads',
508 source='''
509 libads/ldap.c
510 libads/sasl.c
511 libads/sasl_wrapping.c
512 libads/krb5_setpw.c
513 libads/kerberos_util.c
514 libads/ldap_user.c
515 libads/ads_struct.c
516 libads/kerberos_keytab.c
517 libads/disp_sec.c
518 libads/ldap_utils.c
519 libads/ldap_schema.c
520 libads/util.c
521 libads/ndr.c
522 libads/net_ads_setspn.c
523 ''',
524 deps='''
525 cli-ldap-common
526 krb5samba
527 ldap
528 lber
529 KRBCLIENT
530 smbconf
531 LIBNMB
532 libsmb
533 DCUTIL
534 smbldap
535 trusts_util
536 ''',
537 private_library=True)
539 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
540 source='libads/authdata.c',
541 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
543 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
544 source='libads/ldap_printer.c',
545 deps='samba-util krb5samba')
547 # Only smbconf should link against this subsystem, else we will create
548 # a circular dependency.
549 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
550 source='''
551 param/loadparm.c
552 lib/sharesec.c
553 lib/ldap_debug_handler.c
554 lib/util_names.c
555 ''',
556 deps='''
557 samba-util
558 PARAM_UTIL
559 ldap
560 lber
561 LOADPARM_CTX
562 samba3core
563 param_local.h
564 param_global.h
565 cups
566 ''')
568 bld.SAMBA3_LIBRARY('smbconf',
569 source='''
570 lib/smbconf/smbconf_init.c
571 lib/smbconf/smbconf_reg.c
572 ''',
573 deps='''
574 LIBSMBCONF
575 REG_SMBCONF
576 SAMBA_VERSION
578 charset
579 samba-hostconfig
580 errors3
581 SMBCONF_PARAM
582 samba-util
583 talloc
584 util_reg
585 ''',
586 public_headers='../lib/smbconf/smbconf.h',
587 pc_files=[],
588 vnum='0')
590 bld.SAMBA3_SUBSYSTEM('sysquotas',
591 source='''
592 lib/sysquotas.c
593 lib/sysquotas_linux.c
594 lib/sysquotas_xfs.c
595 lib/sysquotas_4A.c
596 lib/sysquotas_4B.c
597 lib/sysquotas_jfs2.c
598 lib/sysquotas_nfs.c
599 ''',
600 allow_warnings=True,
601 deps='samba3-util samba-util tirpc')
603 NOTIFY_SOURCES=''
604 NOTIFY_DEPS=''
606 if bld.CONFIG_SET("HAVE_INOTIFY"):
607 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
609 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
610 NOTIFY_SOURCES += ' smbd/notify_fam.c'
611 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
613 bld.SAMBA3_LIBRARY('smbd_base',
614 source='''
615 smbd/server_reload.c
616 smbd/files.c
617 smbd/connection.c
618 smbd/utmp.c
619 smbd/session.c
620 smbd/dfree.c
621 smbd/dir.c
622 smbd/password.c
623 smbd/conn_msg.c
624 smbd/conn_idle.c
625 smbd/share_access.c
626 smbd/fileio.c
627 smbd/ipc.c
628 smbd/lanman.c
629 smbd/negprot.c
630 smbd/message.c
631 smbd/nttrans.c
632 smbd/pipes.c
633 smbd/reply.c
634 smbd/sesssetup.c
635 smbd/trans2.c
636 smbd/uid.c
637 smbd/dosmode.c
638 smbd/filename.c
639 smbd/open.c
640 smbd/close.c
641 smbd/blocking.c
642 smbd/sec_ctx.c
643 smbd/srvstr.c
644 smbd/vfs.c
645 smbd/perfcount.c
646 smbd/statcache.c
647 smbd/seal.c
648 smbd/posix_acls.c
649 lib/sysacls.c
650 smbd/process.c
651 smbd/service.c
652 smbd/error.c
653 printing/printspoolss.c
654 lib/sessionid_tdb.c
655 lib/cleanupdb.c
656 smbd/fake_file.c
657 smbd/quotas.c
658 smbd/ntquotas.c
659 smbd/msdfs.c
660 smbd/aio.c smbd/statvfs.c
661 smbd/dmapi.c
662 smbd/signing.c
663 smbd/file_access.c
664 smbd/dnsregister.c smbd/globals.c
665 smbd/smb2_server.c
666 smbd/smb2_glue.c
667 smbd/smb2_negprot.c
668 smbd/smb2_sesssetup.c
669 smbd/smb2_tcon.c
670 smbd/smb2_create.c
671 smbd/smb2_close.c
672 smbd/smb2_flush.c
673 smbd/smb2_read.c
674 smbd/smb2_write.c
675 smbd/smb2_lock.c
676 smbd/smb2_ioctl.c
677 smbd/smb2_ioctl_dfs.c
678 smbd/smb2_ioctl_filesys.c
679 smbd/smb2_ioctl_named_pipe.c
680 smbd/smb2_ioctl_network_fs.c
681 smbd/smb2_keepalive.c
682 smbd/smb2_query_directory.c
683 smbd/smb2_notify.c
684 smbd/smb2_getinfo.c
685 smbd/smb2_setinfo.c
686 smbd/smb2_break.c
687 smbd/smbXsrv_version.c
688 smbd/smbXsrv_client.c
689 smbd/smbXsrv_session.c
690 smbd/smbXsrv_tcon.c
691 smbd/smbXsrv_open.c
692 smbd/server_exit.c
693 smbd/durable.c
694 smbd/scavenger.c
695 smbd/mangle.c
696 smbd/mangle_hash.c
697 smbd/mangle_hash2.c
698 smbd/oplock.c
699 smbd/oplock_linux.c
700 smbd/notify.c
701 smbd/notify_msg.c
702 smbd/build_options.c
703 smbd/smb1_utils.c
704 smbd/conn.c
705 ''' + NOTIFY_SOURCES,
706 deps='''
707 talloc
708 tevent
710 libsmb
711 msrpc3
713 vfs_default
714 vfs_posixacl
715 inotify
716 samba3core
717 param_service
718 AVAHI
719 PRINTBASE
720 PROFILE
721 LOCKING
722 LIBADS_SERVER
723 LIBAFS
724 RPC_SERVICE
725 NDR_SMBXSRV
726 LEASES_DB
727 LEASES_UTIL
728 sysquotas
729 NDR_SMB_ACL
730 netapi
731 NDR_IOCTL
732 notifyd
733 vfs_acl_common
734 NDR_QUOTA
735 GNUTLS_HELPERS
736 ''' +
737 bld.env['dmapi_lib'] +
738 bld.env['legacy_quota_libs'] +
739 NOTIFY_DEPS,
740 private_library=True)
742 bld.SAMBA3_SUBSYSTEM('LOCKING',
743 source='''
744 locking/locking.c
745 locking/brlock.c
746 locking/posix.c
747 locking/share_mode_lock.c
748 ''',
749 deps='''
751 talloc
752 LEASES_DB
753 LEASES_UTIL
754 NDR_OPEN_FILES
755 FNAME_UTIL
756 ''')
758 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
759 source='locking/leases_db.c',
760 deps='NDR_LEASES_DB')
762 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
763 source='locking/leases_util.c',
764 deps='NDR_OPEN_FILES')
766 if bld.CONFIG_GET("WITH_PROFILE"):
767 bld.SAMBA3_SUBSYSTEM('PROFILE',
768 source='profile/profile.c',
769 deps='''
770 samba-util
771 gnutls
772 ''')
773 else:
774 bld.SAMBA3_SUBSYSTEM('PROFILE',
775 source='profile/profile_dummy.c',
776 deps='')
778 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
779 source='''
780 printing/notify.c
781 printing/printing_db.c
782 ''',
783 deps='''
784 samba-util
786 ''')
788 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
789 source='''
790 printing/printing.c
791 printing/nt_printing.c
792 printing/nt_printing_tdb.c
793 printing/nt_printing_migrate_internal.c
794 printing/nt_printing_ads.c
795 printing/queue_process.c
796 ''',
797 deps='''
798 PRINTBASE
799 LIBADS_PRINTER
801 printing_migrate
802 SPOOLSSD
803 ''')
805 bld.SAMBA3_LIBRARY('printing_migrate',
806 source='''
807 printing/nt_printing_migrate.c
808 rpc_client/cli_winreg_spoolss.c
809 printing/nt_printing_os2.c
810 ''',
811 deps='''
812 NDR_NTPRINTING
813 cli_spoolss
814 RPC_NDR_WINREG
815 LIBCLI_WINREG
816 smbconf
817 ''',
818 private_library=True)
820 bld.SAMBA3_SUBSYSTEM('PRINTING',
821 source='''
822 printing/pcap.c
823 printing/print_svid.c
824 printing/print_aix.c
825 printing/print_cups.c
826 printing/print_generic.c
827 printing/lpq_parse.c
828 printing/load.c
829 printing/print_standard.c
830 printing/print_iprint.c
831 printing/printer_list.c
832 ''',
833 deps='''
834 NDR_PRINTCAP
836 cups
837 ''')
839 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
840 source='lib/filename_util.c',
841 deps='samba-util')
843 bld.SAMBA3_SUBSYSTEM('LIBNET',
844 source='libnet/libnet_join.c',
845 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
847 bld.SAMBA3_LIBRARY('net_keytab',
848 source='libnet/libnet_keytab.c',
849 deps='krb5samba ads',
850 private_library=True)
853 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
854 source='''
855 libnet/libnet_dssync.c
856 libnet/libnet_dssync_passdb.c
857 libnet/libnet_dssync_keytab.c
858 ''',
859 deps='''
860 LIBNET
861 RPC_NDR_DRSUAPI
862 ''')
864 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
865 source='lib/eventlog/eventlog.c',
866 deps='NDR_EVENTLOG tdb')
868 bld.SAMBA3_SUBSYSTEM('LIBNMB',
869 source='''
870 libsmb/unexpected.c
871 libsmb/namecache.c
872 libsmb/nmblib.c
873 libsmb/clidgram.c
874 libsmb/namequery.c
875 libsmb/conncache.c
876 libads/sitename_cache.c
877 ''',
878 deps='''
879 LIBTSOCKET
880 LIBCLI_NETLOGON
881 samba3util
882 addns
883 lmhosts
884 resolv
885 ''')
887 bld.SAMBA3_SUBSYSTEM('SERVICES',
888 source='''
889 services/svc_spoolss.c
890 services/svc_rcinit.c
891 services/svc_winreg_glue.c
892 services/svc_netlogon.c
893 services/svc_winreg.c
894 services/svc_wins.c
895 ''',
896 deps='samba-util')
898 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
899 source='''
900 auth/pampass.c
901 auth/pass_check.c
902 ''',
903 deps='''
904 crypt
906 PAM_ERRORS
907 ''')
909 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
910 source='libsmb/passchange.c',
911 deps='''
912 LIBCLI_SAMR
913 INIT_LSA
914 msrpc3
915 krb5samba
916 ''')
918 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
919 source='lib/version.c',
920 deps='samba-util')
922 bld.SAMBA3_SUBSYSTEM('SLCACHE',
923 source='libsmb/samlogon_cache.c',
924 deps='''
925 samba-util
927 ''')
929 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
930 source='''
931 libsmb/dsgetdcname.c
932 ''',
933 deps='''
934 CLDAP
935 LIBNMB
936 ''')
938 bld.SAMBA3_SUBSYSTEM('DCUTIL',
939 source='''
940 libsmb/namequery_dc.c
941 ''',
942 deps='''
944 dsgetdcname
945 msrpc3
946 libcli_lsa3
947 ''')
949 bld.SAMBA3_LIBRARY('trusts_util',
950 source='libsmb/trusts_util.c',
951 deps='''
952 libcli_netlogon3
953 msrpc3
954 samba-passdb
955 ''',
956 private_library=True)
958 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
959 source='lib/util_tdb.c',
960 deps='talloc samba3-util')
962 bld.SAMBA3_LIBRARY('samba3-util',
963 source='''
964 lib/util_sec.c
965 lib/util_str.c
966 lib/adt_tree.c
967 lib/util_malloc.c
968 lib/namearray.c
969 lib/file_id.c
970 lib/cbuf.c
971 lib/per_thread_cwd.c
972 ''',
973 deps='''
974 samba-util
975 charset
976 ''',
977 private_library=True)
979 bld.SAMBA_LIBRARY('xattr_tdb',
980 source='lib/xattr_tdb.c',
981 deps='NDR_XATTR dbwrap samba3-util',
982 private_library=True)
984 bld.SAMBA3_LIBRARY('CHARSET3',
985 source='''
986 lib/charcnv.c
987 lib/fstring.c
988 ''',
989 public_deps='''
990 ICONV_WRAPPER
991 charset
992 ''',
993 deps='''
994 samba-util
995 samba3-util
996 ''',
997 private_library=True)
999 bld.SAMBA3_SUBSYSTEM('errors3',
1000 source='''
1001 libsmb/errormap.c
1002 libsmb/smberr.c
1003 lib/errmap_unix.c
1004 ''',
1005 deps='samba-errors')
1007 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1008 source='rpc_client/cli_samr.c',
1009 deps='RPC_NDR_SAMR INIT_SAMR')
1011 bld.SAMBA3_LIBRARY('libcli_lsa3',
1012 source='rpc_client/cli_lsarpc.c',
1013 deps='RPC_NDR_LSA INIT_LSA',
1014 private_library=True)
1016 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1017 source='''
1018 rpc_client/cli_netlogon.c
1019 rpc_client/util_netlogon.c
1020 ''',
1021 deps='''
1022 msrpc3
1023 RPC_NDR_NETLOGON
1024 cliauth
1025 smbconf
1026 NETLOGON_CREDS_CLI''',
1027 private_library=True)
1029 bld.SAMBA3_LIBRARY('cli_spoolss',
1030 source='''
1031 rpc_client/cli_spoolss.c
1032 rpc_client/init_spoolss.c
1033 ''',
1034 deps='''
1035 RPC_NDR_SPOOLSS
1036 smbconf
1037 secrets3''',
1038 private_library=True)
1040 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1041 source='rpc_client/cli_winreg.c',
1042 deps='RPC_NDR_WINREG')
1044 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1045 source='rpc_client/cli_winreg_int.c',
1046 deps='LIBCLI_WINREG RPC_SERVER')
1048 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1049 source='rpc_client/cli_pipe_schannel.c',
1050 deps='samba-util krb5samba')
1052 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1053 source='''
1054 rpc_client/cli_mdssvc.c
1055 rpc_client/cli_mdssvc_util.c
1056 ''',
1057 deps='mdssvc RPC_NDR_MDSSVC')
1059 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1060 source='rpc_client/init_lsa.c',
1061 deps='samba-util')
1063 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1064 source='rpc_client/init_samr.c',
1065 deps='samba-util GNUTLS_HELPERS')
1067 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1068 source='lib/lsa.c')
1070 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1071 source='printing/spoolssd.c',
1072 deps='''
1073 samba-util
1074 RPC_SOCK_HELPER
1075 ''')
1077 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1078 source='lib/tevent_glib_glue.c',
1079 deps='glib-2.0',
1080 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1083 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1084 source='lib/adouble.c',
1085 deps='STRING_REPLACE')
1087 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1088 source='lib/string_replace.c')
1090 ########################## BINARIES #################################
1092 bld.SAMBA3_BINARY('smbd/smbd',
1093 source='smbd/server.c smbd/smbd_cleanupd.c',
1094 deps='''
1095 popt_samba3
1096 smbd_base
1097 EPMD
1098 LSASD
1099 FSSD
1100 MDSSD
1101 SPOOLSSD
1102 ''',
1103 install_path='${SBINDIR}')
1106 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1107 source='lib/tdb_validate.c',
1108 deps='samba-util')
1111 bld.SAMBA3_BINARY('client/smbclient',
1112 source='''
1113 client/client.c
1114 client/clitar.c
1115 client/dnsbrowse.c
1116 ''',
1117 deps='''
1118 talloc
1119 popt_samba3_cmdline
1120 smbconf
1121 ndr-standard
1122 SMBREADLINE
1123 libsmb
1124 msrpc3
1125 RPC_NDR_SRVSVC
1126 cli_smb_common
1127 archive
1128 ''')
1130 bld.SAMBA3_BINARY('smbspool',
1131 source='client/smbspool.c',
1132 deps='''
1133 talloc
1134 popt_samba3
1135 smbconf
1136 libsmb
1137 samba3core
1138 ''')
1140 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1141 source='client/smbspool_krb5_wrapper.c',
1142 deps='''
1143 DYNCONFIG
1144 cups
1145 krb5samba
1146 ''',
1147 install_path='${LIBEXECDIR}/samba',
1148 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1150 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1151 source='script/tests/smbspool_argv_wrapper.c',
1152 for_selftest=True)
1154 bld.SAMBA3_BINARY('locktest2',
1155 source='torture/locktest2.c',
1156 deps='''
1157 talloc
1158 smbconf
1159 libsmb
1160 LOCKING
1161 ''',
1162 for_selftest=True)
1164 TORTURE3_ADDITIONAL_SOURCE=""
1166 if bld.env.with_ctdb:
1167 TORTURE3_ADDITIONAL_SOURCE += ' torture/test_ctdbd_conn.c'
1169 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1170 source='''
1171 torture/torture.c
1172 torture/nbio.c
1173 torture/scanner.c
1174 torture/utable.c
1175 torture/denytest.c
1176 torture/mangle_test.c
1177 torture/nbench.c
1178 torture/test_async_echo.c
1179 torture/test_addrchange.c
1180 torture/test_posix_append.c
1181 torture/test_nttrans_create.c
1182 torture/test_nttrans_fsctl.c
1183 torture/test_case_insensitive.c
1184 torture/test_notify_online.c
1185 torture/test_chain3.c
1186 torture/test_smb2.c
1187 torture/test_authinfo_structs.c
1188 torture/test_smbsock_any_connect.c
1189 torture/test_cleanup.c
1190 torture/test_notify.c
1191 lib/tevent_barrier.c
1192 torture/test_dbwrap_watch.c
1193 torture/test_dbwrap_do_locked.c
1194 torture/test_idmap_tdb_common.c
1195 torture/test_dbwrap_ctdb.c
1196 torture/test_buffersize.c
1197 torture/test_messaging_read.c
1198 torture/test_messaging_fd_passing.c
1199 torture/test_messaging_send_all.c
1200 torture/test_oplock_cancel.c
1201 torture/test_pthreadpool_tevent.c
1202 torture/bench_pthreadpool.c
1203 torture/wbc_async.c
1204 torture/test_g_lock.c
1205 torture/test_namemap_cache.c
1206 torture/test_idmap_cache.c
1207 torture/test_hidenewfiles.c
1208 torture/test_readdir_timestamp.c
1209 ''' + TORTURE3_ADDITIONAL_SOURCE,
1210 deps='''
1211 talloc
1212 smbconf
1213 libsmb
1214 msrpc3
1215 TLDAP
1216 RPC_NDR_ECHO
1217 WB_REQTRANS
1218 LOCKING
1219 NDR_OPEN_FILES
1220 idmap
1221 IDMAP_TDB_COMMON
1222 samba-cluster-support
1223 ''',
1224 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
1225 for_selftest=True)
1227 bld.SAMBA3_BINARY('smbconftort',
1228 source='lib/smbconf/testsuite.c',
1229 deps='''
1230 talloc
1231 smbconf
1232 popt_samba3
1233 ''',
1234 for_selftest=True)
1236 bld.SAMBA3_BINARY('msgtest',
1237 source='torture/msgtest.c',
1238 deps='''
1239 talloc
1240 smbconf
1241 ''',
1242 install=False)
1244 bld.SAMBA3_BINARY('msg_sink',
1245 source='torture/msg_sink.c',
1246 deps='''
1247 talloc
1248 smbconf
1249 ''',
1250 install=False)
1252 bld.SAMBA3_BINARY('msg_source',
1253 source='torture/msg_source.c',
1254 deps='''
1255 talloc
1256 smbconf
1257 ''',
1258 install=False)
1260 bld.SAMBA3_BINARY('test_mdsparser_es',
1261 source='''
1262 rpc_server/mdssvc/test_mdsparser_es.c
1263 rpc_server/mdssvc/es_parser.y
1264 rpc_server/mdssvc/es_lexer.gcov.lex.c
1265 rpc_server/mdssvc/es_mapping.c
1266 ''',
1267 deps='''
1268 samba3-util
1269 talloc
1270 smbconf
1271 jansson
1272 cmocka
1273 popt_samba3_cmdline
1274 ''',
1275 enabled=bld.env.spotlight_backend_es,
1276 for_selftest=True)
1278 bld.SAMBA3_BINARY('pdbtest',
1279 source='torture/pdbtest.c',
1280 deps='''
1281 talloc
1283 popt_samba3
1284 AUTH_COMMON
1285 auth
1286 ''',
1287 for_selftest=True)
1289 bld.SAMBA3_BINARY('vfstest',
1290 source='''
1291 torture/cmd_vfs.c
1292 torture/vfstest.c
1293 torture/vfstest_chain.c
1294 ''',
1295 deps='''
1297 popt_samba3
1298 smbconf
1299 SMBREADLINE
1300 ''',
1301 for_selftest=True)
1303 bld.SAMBA3_BINARY('versiontest',
1304 source='lib/version_test.c',
1305 deps='''
1306 SAMBA_VERSION
1307 smbconf
1308 ''',
1309 install=False)
1311 bld.SAMBA3_BINARY('timelimit',
1312 source='script/tests/timelimit.c',
1313 for_selftest=True)
1315 bld.SAMBA3_BINARY('rpc_open_tcp',
1316 source='torture/rpc_open_tcp.c',
1317 deps='''
1318 talloc
1319 msrpc3
1320 ''',
1321 for_selftest=True)
1323 bld.SAMBA3_BINARY('vlp',
1324 source='printing/tests/vlp.c',
1325 deps='''
1326 talloc
1327 smbconf
1328 ''',
1329 for_selftest=True)
1332 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1333 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1334 bld.SAMBA3_PYTHON('pysmbd',
1335 source='smbd/pysmbd.c',
1336 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1337 realname='samba/samba3/smbd.so'
1340 pycredentials = 'pycredentials'
1341 bld.SAMBA3_PYTHON('pylibsmb',
1342 source='libsmb/pylibsmb.c',
1343 deps='smbclient samba-credentials %s' % pycredentials,
1344 realname='samba/samba3/libsmb_samba_internal.so'
1347 bld.SAMBA3_PYTHON('pymdscli',
1348 source='rpc_client/py_mdscli.c',
1349 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1350 realname='samba/samba3/mdscli.so')
1352 bld.SAMBA3_BINARY('spotlight2sparql',
1353 source='''
1354 rpc_server/mdssvc/sparql_parser_test.c
1355 rpc_server/mdssvc/sparql_parser.y
1356 rpc_server/mdssvc/sparql_lexer.gcov.lex.c
1357 rpc_server/mdssvc/sparql_mapping.c''',
1358 deps='samba3-util talloc ' + bld.env['libtracker'],
1359 enabled=bld.env.spotlight_backend_tracker,
1360 install=False)
1362 bld.SAMBA3_BINARY('spotlight2es',
1363 source='''
1364 rpc_server/mdssvc/es_parser_test.c
1365 rpc_server/mdssvc/es_parser.y
1366 rpc_server/mdssvc/es_lexer.gcov.lex.c
1367 rpc_server/mdssvc/es_mapping.c''',
1368 deps='samba3-util talloc jansson smbconf',
1369 enabled=bld.env.spotlight_backend_es,
1370 install=False)
1372 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1373 source='lib/tevent_glib_glue_tests.c',
1374 deps='''
1375 talloc
1376 libsmb
1377 popt_samba3
1378 tevent-glib-glue''',
1379 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1380 for_selftest=True)
1382 bld.SAMBA3_BINARY('tevent_glib_tracker',
1383 source='utils/async-tracker.c',
1384 deps='''
1385 talloc
1386 libsmb
1387 popt_samba3
1388 tevent-glib-glue ''' + bld.env['libtracker'],
1389 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1390 install=False)
1392 ########################## INCLUDES #################################
1394 bld.RECURSE('auth')
1395 bld.RECURSE('libgpo/gpext')
1396 bld.RECURSE('librpc')
1397 bld.RECURSE('librpc/idl')
1398 bld.RECURSE('libsmb')
1399 bld.RECURSE('modules')
1400 bld.RECURSE('param')
1401 bld.RECURSE('passdb')
1402 bld.RECURSE('rpc_server')
1403 bld.RECURSE('script')
1404 bld.RECURSE('winbindd')
1405 bld.RECURSE('../examples/auth')
1406 bld.RECURSE('../examples/libsmbclient')
1407 bld.RECURSE('../examples/pdb')
1408 bld.RECURSE('../examples/VFS')
1409 bld.RECURSE('../examples/fuse')
1410 bld.RECURSE('../examples/winexe')
1411 bld.RECURSE('lib/netapi/tests')
1412 bld.RECURSE('lib/netapi/examples')
1413 bld.RECURSE('smbd/notifyd')
1414 bld.RECURSE('rpcclient')
1415 bld.RECURSE('utils')
1416 bld.RECURSE('nmbd')
1417 bld.RECURSE('lib/util')
1419 bld.ENFORCE_GROUP_ORDERING()
1420 bld.CHECK_PROJECT_RULES()