s3:idmap_ad: add support for ADS_AUTH_SASL_{STARTTLS,LDAPS}
[Samba.git] / source3 / wscript_build
blob8bb7f4e26d98f4ffdcc3bea0bb064f192047d24d
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 deps='CREDENTIALS_CMDLINE',
31 public_deps='''
32 talloc
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='1.0.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 rpc_client/local_np.c
59 librpc/rpc/dcerpc_helpers.c
60 ''',
61 deps='''
62 ndr
63 ndr-standard
64 RPC_NDR_EPMAPPER
65 NTLMSSP_COMMON
66 COMMON_SCHANNEL
67 LIBCLI_AUTH
68 LIBTSOCKET
69 npa_tstream
70 gse
71 dcerpc-binding
72 libsmb
73 ndr-table
74 NETLOGON_CREDS_CLI
75 ''',
76 private_library=True)
78 bld.SAMBA3_SUBSYSTEM('AVAHI',
79 source='''
80 lib/avahi.c
81 smbd/avahi_register.c
82 ''',
83 deps='''
84 avahi-common
85 avahi-client
86 ''',
87 enabled=bld.env.with_avahi)
89 bld.SAMBA3_SUBSYSTEM('GROUPDB',
90 source='''
91 groupdb/mapping.c
92 groupdb/mapping_tdb.c
93 ''',
94 deps='tdb')
96 bld.SAMBA3_SUBSYSTEM('TLDAP',
97 source='''
98 lib/tldap.c
99 lib/tldap_util.c
100 lib/tldap_gensec_bind.c
101 lib/tldap_tls_connect.c
102 ''',
103 deps='''
104 asn1util
105 LIBTSOCKET
106 samba3util
107 LIBTLS
108 ''')
110 bld.SAMBA3_BINARY('test_tldap',
111 source='lib/test_tldap.c',
112 deps='''
113 asn1util
114 LIBTSOCKET
115 samba3util
116 LIBTLS
117 smbconf
118 cmocka
119 ''',
120 for_selftest=True)
122 # libpdb.so should not expose internal symbols that are only usable
123 # to the statically linked modules that are merged into libpdb.
124 # Note that we always filter these symbols out in libpdb, even
125 # when modules are not linked statically. In the latter case
126 # symbols will not be present in the libpdb anyway so no hurt is
127 # done to the version script.
128 private_pdb_match = []
129 private_pdb_match.append('!idmap_init')
130 private_pdb_match.append('!idmap_sids_to_xids')
131 private_pdb_match.append('!idmap_xids_to_sids')
133 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
134 '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
135 '!dominfo_attr_list', '!get_attr_key2string',
136 '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
137 '!get_attr_list']
138 private_pdb_match.append('!pdb_nds_*')
139 private_pdb_match.append('!pdb_ldapsam_init*')
140 private_pdb_match.append('!pdb_*_init')
141 private_pdb_match = private_pdb_match + ldapsam_pdb_match
143 bld.SAMBA3_LIBRARY('samba-passdb',
144 source='',
145 deps='pdb',
146 private_library=False,
147 grouping_library=True,
148 pc_files=[],
149 public_headers_install=True,
150 public_headers='''
151 include/passdb.h
152 passdb/machine_sid.h
153 passdb/lookup_sid.h
154 ''',
155 abi_match=private_pdb_match,
156 abi_directory='passdb/ABI',
157 vnum='0.28.0')
159 bld.SAMBA3_SUBSYSTEM('pdb',
160 source='''
161 passdb/pdb_get_set.c
162 passdb/passdb.c
163 lib/util_wellknown.c
164 lib/util_builtin.c
165 passdb/pdb_compat.c
166 lib/util_sid_passdb.c
167 lib/util_unixsids.c
168 passdb/lookup_sid.c
169 passdb/login_cache.c
170 passdb/account_pol.c
171 lib/privileges.c
172 lib/util_nscd.c
173 lib/winbind_util.c
174 passdb/pdb_util.c
175 passdb/pdb_interface.c
176 passdb/pdb_secrets.c''',
177 deps='''
178 secrets3
179 GROUPDB
180 SERVER_MUTEX
181 wbclient
182 LIBCLI_AUTH
183 flag_mapping
184 samba-credentials
185 samba-modules
186 nscd
187 ''')
189 bld.SAMBA3_LIBRARY('smbldaphelper',
190 source='''
191 passdb/pdb_ldap_schema.c
192 passdb/pdb_ldap_util.c
193 ''',
194 deps='smbldap secrets3',
195 allow_undefined_symbols=True,
196 enabled=bld.CONFIG_SET('HAVE_LDAP'),
197 private_library=True)
199 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
200 source='lib/server_mutex.c',
201 deps='talloc')
203 # this includes only the low level parse code, not stuff
204 # that requires knowledge of security contexts
205 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
206 source='registry/reg_parse_prs.c')
208 bld.SAMBA3_SUBSYSTEM('REGFIO',
209 source='registry/regfio.c',
210 deps='samba-util REG_PARSE_PRS')
212 bld.SAMBA_BINARY('test_registry_regfio',
213 source='registry/tests/test_regfio.c',
214 deps='cmocka samba3-util smbconf REGFIO',
215 local_include=False,
216 for_selftest=True)
218 # Do not link against this use 'smbconf'
219 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
220 source='''
221 registry/reg_api.c
222 registry/reg_dispatcher.c
223 registry/reg_cachehook.c
224 registry/reg_objects.c
225 registry/reg_util_internal.c
226 lib/util_nttoken.c
227 registry/reg_backend_db.c
228 registry/reg_parse_internal.c
229 registry/reg_parse.c
230 lib/srprs.c
231 registry/reg_init_basic.c
232 ''',
233 deps='''
234 smbd_shim
235 tdb-wrap3
236 NDR_SECURITY
237 util_tdb
238 talloc
239 replace
240 util_reg
241 samba-util
242 samba-security
243 errors3
244 dbwrap
245 samba3-util
246 ''')
248 # Do not link against this use 'smbconf'
249 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
250 source='''
251 registry/reg_backend_smbconf.c
252 registry/reg_init_smbconf.c
253 registry/reg_util_token.c
254 registry/reg_api_util.c
255 ''',
256 deps='SMBREGISTRY')
258 bld.SAMBA3_LIBRARY('REG_FULL',private_library=True,
259 source='''
260 registry/reg_backend_printing.c
261 registry/reg_backend_shares.c
262 registry/reg_backend_netlogon_params.c
263 registry/reg_backend_prod_options.c
264 registry/reg_backend_tcpip_params.c
265 registry/reg_backend_hkpt_params.c
266 registry/reg_backend_current_version.c
267 registry/reg_backend_perflib.c
268 registry/reg_init_full.c
269 registry/reg_perfcount.c''',
270 deps='''
271 smbconf
272 tdb-wrap3
273 REG_PARSE_PRS
275 ''')
277 bld.SAMBA3_LIBRARY('cmdline_contexts',
278 source='lib/cmdline_contexts.c',
279 deps='samba3core',
280 private_library=True)
282 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
283 source='libads/kerberos.c libads/ads_status.c',
284 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
286 bld.SAMBA3_SUBSYSTEM('samba3util',
287 source='''
288 lib/system.c
289 lib/sendfile.c
290 lib/recvfile.c
291 lib/time.c
292 lib/util_sid.c
293 lib/util_specialsids.c
294 lib/util_file.c
295 lib/util.c
296 lib/util_path.c
297 lib/util_matching.c
298 lib/util_procid.c
299 lib/util_sock.c
300 lib/util_tsock.c
301 lib/util_transfer_file.c
302 lib/util_macstreams.c
303 ''',
304 deps='''
305 CHARSET3
307 LIBTSOCKET
308 samba-security
309 NDR_SECURITY
310 samba-util
311 util_tdb
312 sys_rw
313 iov_buf
314 ''')
316 if bld.env.with_ctdb:
317 SAMBA_CLUSTER_SUPPORT_SOURCES='''
318 lib/cluster_support.c
319 lib/dbwrap/dbwrap_ctdb.c
320 lib/messages_ctdb.c
321 lib/messages_ctdb_ref.c
322 lib/ctdbd_conn.c
324 SAMBA_CLUSTER_SUPPORT_DEPS='''
325 talloc
326 tevent
329 else:
330 SAMBA_CLUSTER_SUPPORT_SOURCES='''
331 lib/cluster_support.c
332 lib/ctdb_dummy.c
334 SAMBA_CLUSTER_SUPPORT_DEPS='''
335 talloc
336 tevent
339 bld.SAMBA3_LIBRARY('samba-cluster-support',
340 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
341 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
342 allow_undefined_symbols=True,
343 private_library=True)
345 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
346 source='''
347 lib/dbwrap/dbwrap_open.c
348 lib/dbwrap/dbwrap_watch.c
349 lib/g_lock.c
350 ''',
351 deps='''
352 dbwrap
353 samba-cluster-support
354 ''')
356 bld.SAMBA3_LIBRARY('messages_util',
357 source='''lib/messages_util.c''',
358 deps='samba-util',
359 private_library=True)
361 bld.SAMBA3_SUBSYSTEM('samba3core',
362 source='''
363 lib/messages.c
364 lib/util_cluster.c
365 lib/id_cache.c
366 lib/serverid.c
367 lib/server_id_watch.c
368 lib/server_id_db_util.c
369 lib/addrchange.c
370 ../lib/util/debug_s3.c
371 lib/dumpcore.c
372 lib/interface.c
373 lib/username.c
374 lib/smbrun.c
375 lib/wins_srv.c
376 lib/substitute.c
377 lib/substitute_generic.c
378 lib/ms_fnmatch.c
379 lib/tallocmsg.c
380 lib/dmallocmsg.c
381 lib/gencache.c
382 lib/util_event.c
383 lib/global_contexts.c
384 lib/ldap_escape.c
385 lib/system_smbd.c
386 lib/audit.c
387 lib/idmap_cache.c
388 lib/namemap_cache.c
389 lib/util_ea.c
390 lib/background.c
391 ''',
392 deps='''
393 samba3util
394 LIBTSOCKET
395 NDR_MESSAGING
396 LIBASYNC_REQ
397 UTIL_PW
398 SAMBA_VERSION
399 PTHREADPOOL
400 interfaces
401 smbconf
402 dbwrap
403 samba3-util
404 errors3
405 server_id_db
406 messages_util
407 messages_dgm
408 talloc_report_printf
409 access
410 TDB_LIB
412 ''')
414 bld.SAMBA3_LIBRARY('smbd_shim',
415 source='''lib/smbd_shim.c''',
416 deps='talloc',
417 private_library=True)
419 bld.SAMBA3_SUBSYSTEM('auth_generic',
420 source='libsmb/auth_generic.c',
421 deps='gse gensec')
423 bld.SAMBA3_LIBRARY('libsmb',
424 source='''
425 libsmb/clientgen.c
426 libsmb/cliconnect.c
427 libsmb/clifile.c
428 libsmb/clirap.c
429 libsmb/clierror.c
430 libsmb/climessage.c
431 libsmb/clireadwrite.c
432 libsmb/clilist.c
433 libsmb/cliprint.c
434 libsmb/clitrans.c
435 libsmb/clisecdesc.c
436 libsmb/cliquota.c
437 libsmb/clifsinfo.c
438 libsmb/clidfs.c
439 libsmb/clioplock.c
440 libsmb/async_smb.c
441 libsmb/clisymlink.c
442 libsmb/smbsock_connect.c
443 libsmb/cli_smb2_fnum.c
444 ''',
445 deps='''
446 auth_generic
447 CLDAP
448 LIBNMB
449 SPNEGO_PARSE
450 LIBTSOCKET
451 KRBCLIENT
452 NDR_IOCTL
453 NDR_QUOTA
454 cli_smb_common
455 tevent
456 ''',
457 private_library=True)
459 bld.SAMBA3_SUBSYSTEM('CLDAP',
460 source='libads/cldap.c',
461 deps='cli-ldap-common cli_cldap LIBTSOCKET')
463 # NOTE: The secrets3 library is a low level library used by several subsystems.
464 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
465 # doing that your design is wrong and needs changing. -SSS
466 bld.SAMBA3_LIBRARY('secrets3',
467 source='''
468 passdb/secrets.c
469 passdb/machine_account_secrets.c
470 passdb/machine_sid.c
471 passdb/secrets_lsa.c
472 ''',
473 deps='''
474 ndr-samba4
475 smbconf
476 samba3util
477 dbwrap
478 krb5samba
479 LIBCLI_AUTH
480 samba-credentials
481 ''',
482 private_library=True)
484 bld.SAMBA3_LIBRARY('smbldap',
485 source='lib/smbldap.c',
486 deps='ldap lber samba-util smbconf',
487 enabled=bld.CONFIG_SET("HAVE_LDAP"),
488 private_library=False,
489 abi_directory='lib/ABI',
490 abi_match='smbldap_*',
491 pc_files=[],
492 vnum='2.1.0',
493 public_headers='include/smbldap.h include/smb_ldap.h')
495 bld.SAMBA3_LIBRARY('ads',
496 source='''
497 libads/ldap.c
498 libads/sasl.c
499 libads/sasl_wrapping.c
500 libads/tls_wrapping.c
501 libads/krb5_setpw.c
502 libads/kerberos_util.c
503 libads/ldap_user.c
504 libads/ads_struct.c
505 libads/kerberos_keytab.c
506 libads/disp_sec.c
507 libads/ldap_utils.c
508 libads/ldap_schema.c
509 libads/util.c
510 libads/net_ads_setspn.c
511 ''',
512 deps='''
513 cli-ldap-common
514 krb5samba
515 krb5
516 ldap
517 lber
518 KRBCLIENT
519 smbconf
520 LIBNMB
521 libsmb
522 DCUTIL
523 smbldap
524 trusts_util
525 NDR_ADS
526 ''',
527 private_library=True)
529 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
530 source='libads/authdata.c',
531 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
533 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
534 source='libads/ldap_printer.c',
535 deps='samba-util krb5samba')
537 # Only smbconf should link against this subsystem, else we will create
538 # a circular dependency.
539 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
540 source='''
541 param/loadparm.c
542 lib/sharesec.c
543 lib/ldap_debug_handler.c
544 lib/util_names.c
545 ''',
546 deps='''
547 samba-util
548 PARAM_UTIL
549 ldap
550 lber
551 LOADPARM_CTX
552 samba3core
553 param_local.h
554 param_global.h
555 cups
556 ''')
558 bld.SAMBA3_LIBRARY('smbconf',
559 source='''
560 lib/smbconf/smbconf_init.c
561 lib/smbconf/smbconf_reg.c
562 ''',
563 deps='''
564 LIBSMBCONF
565 REG_SMBCONF
566 SAMBA_VERSION
568 charset
569 samba-hostconfig
570 SMBCONF_PARAM
571 samba-util
572 talloc
573 util_reg
574 ''',
575 public_headers='../lib/smbconf/smbconf.h',
576 pc_files=[],
577 vnum='0.0.1')
579 bld.SAMBA3_SUBSYSTEM('sysquotas',
580 source='''
581 lib/sysquotas.c
582 lib/sysquotas_linux.c
583 lib/sysquotas_xfs.c
584 lib/sysquotas_4A.c
585 lib/sysquotas_4B.c
586 lib/sysquotas_jfs2.c
587 lib/sysquotas_nfs.c
588 ''',
589 allow_warnings=True,
590 deps='samba3-util samba-util tirpc')
592 NOTIFY_SOURCES=''
593 NOTIFY_DEPS=''
595 if bld.CONFIG_SET("HAVE_INOTIFY"):
596 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
598 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
599 NOTIFY_SOURCES += ' smbd/notify_fam.c'
600 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
602 if bld.CONFIG_SET('WITH_SMB1SERVER'):
603 SMB1_SOURCES = '''
604 smbd/smb1_message.c
605 smbd/smb1_sesssetup.c
606 smbd/smb1_lanman.c
607 smbd/smb1_utils.c
608 smbd/smb1_aio.c
609 smbd/smb1_ipc.c
610 smbd/smb1_negprot.c
611 smbd/smb1_nttrans.c
612 smbd/smb1_oplock.c
613 smbd/smb1_pipes.c
614 smbd/smb1_reply.c
615 smbd/smb1_service.c
616 smbd/smb1_signing.c
617 smbd/smb1_process.c
618 smbd/smb1_trans2.c
620 else:
621 SMB1_SOURCES = ''
623 bld.SAMBA3_LIBRARY('smbd_base',
624 source='''
625 smbd/server_reload.c
626 smbd/files.c
627 smbd/connection.c
628 smbd/utmp.c
629 smbd/session.c
630 smbd/dfree.c
631 smbd/dir.c
632 smbd/password.c
633 smbd/conn_msg.c
634 smbd/conn_idle.c
635 smbd/share_access.c
636 smbd/fileio.c
637 smbd/smb2_ipc.c
638 smbd/smb2_nttrans.c
639 smbd/smb2_pipes.c
640 smbd/smb2_reply.c
641 smbd/smb2_trans2.c
642 smbd/uid.c
643 smbd/dosmode.c
644 smbd/filename.c
645 smbd/open.c
646 smbd/close.c
647 smbd/blocking.c
648 smbd/sec_ctx.c
649 smbd/srvstr.c
650 smbd/vfs.c
651 smbd/seal.c
652 smbd/posix_acls.c
653 lib/sysacls.c
654 smbd/smb2_process.c
655 smbd/smb2_service.c
656 smbd/error.c
657 printing/printspoolss.c
658 printing/rap_jobid.c
659 printing/load.c
660 printing/printer_list.c
661 lib/sessionid_tdb.c
662 lib/cleanupdb.c
663 smbd/fake_file.c
664 smbd/quotas.c
665 smbd/ntquotas.c
666 smbd/msdfs.c
667 smbd/smb2_aio.c smbd/statvfs.c
668 smbd/dmapi.c
669 smbd/smb2_signing.c
670 smbd/file_access.c
671 smbd/dnsregister.c smbd/globals.c
672 smbd/smb2_server.c
673 smbd/smb2_glue.c
674 smbd/smb2_negprot.c
675 smbd/smb2_sesssetup.c
676 smbd/smb2_tcon.c
677 smbd/smb2_create.c
678 smbd/smb2_close.c
679 smbd/smb2_flush.c
680 smbd/smb2_read.c
681 smbd/smb2_write.c
682 smbd/smb2_lock.c
683 smbd/smb2_ioctl.c
684 smbd/smb2_ioctl_dfs.c
685 smbd/smb2_ioctl_filesys.c
686 smbd/smb2_ioctl_named_pipe.c
687 smbd/smb2_ioctl_network_fs.c
688 smbd/smb2_ioctl_smbtorture.c
689 smbd/smb2_keepalive.c
690 smbd/smb2_query_directory.c
691 smbd/smb2_notify.c
692 smbd/smb2_getinfo.c
693 smbd/smb2_setinfo.c
694 smbd/smb2_break.c
695 smbd/smb2_posix.c
696 smbd/smbXsrv_version.c
697 smbd/smbXsrv_client.c
698 smbd/smbXsrv_session.c
699 smbd/smbXsrv_tcon.c
700 smbd/smbXsrv_open.c
701 smbd/server_exit.c
702 smbd/durable.c
703 smbd/scavenger.c
704 smbd/mangle.c
705 smbd/mangle_hash.c
706 smbd/mangle_hash2.c
707 smbd/smb2_oplock.c
708 smbd/oplock_linux.c
709 smbd/notify.c
710 smbd/notify_msg.c
711 smbd/build_options.c
712 smbd/conn.c
713 rpc_server/srv_pipe_hnd.c
714 rpc_server/rpc_ncacn_np.c
715 ''' + NOTIFY_SOURCES + SMB1_SOURCES,
716 deps='''
717 talloc
718 tevent
720 libsmb
721 msrpc3
723 vfs_default
724 vfs_posixacl
725 inotify
726 samba3core
727 param_service
728 AVAHI
729 PROFILE
730 LOCKING
731 LIBADS_SERVER
732 LIBAFS
733 NDR_SMBXSRV
734 LEASES_DB
735 LEASES_UTIL
736 sysquotas
737 NDR_SMB_ACL
738 netapi
739 NDR_IOCTL
740 notifyd
741 vfs_acl_common
742 NDR_QUOTA
743 GNUTLS_HELPERS
744 fd_handle
745 cli_spoolss
746 ''' +
747 bld.env['dmapi_lib'] +
748 bld.env['legacy_quota_libs'] +
749 NOTIFY_DEPS,
750 private_library=True)
752 bld.SAMBA3_SUBSYSTEM('LOCKING',
753 source='''
754 locking/locking.c
755 locking/brlock.c
756 locking/posix.c
757 locking/share_mode_lock.c
758 ''',
759 deps='''
761 talloc
763 LEASES_DB
764 LEASES_UTIL
765 NDR_OPEN_FILES
766 FNAME_UTIL
767 fd_handle
768 ''')
770 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
771 source='locking/leases_db.c',
772 deps='NDR_LEASES_DB')
774 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
775 source='locking/leases_util.c',
776 deps='NDR_OPEN_FILES')
778 if bld.CONFIG_GET("WITH_PROFILE"):
779 bld.SAMBA_SUBSYSTEM('PROFILE_READ',
780 source='profile/profile_read.c',
781 deps='gnutls talloc tdb')
782 bld.SAMBA3_SUBSYSTEM('PROFILE',
783 source='profile/profile.c',
784 deps='''
785 samba-util
786 PROFILE_READ
787 ''')
788 else:
789 bld.SAMBA3_SUBSYSTEM('PROFILE',
790 source='profile/profile_dummy.c',
791 deps='')
793 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
794 source='''
795 printing/notify.c
796 printing/printing_db.c
797 ''',
798 deps='''
799 samba-util
801 ''')
803 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
804 source='''
805 printing/printing.c
806 printing/nt_printing.c
807 printing/nt_printing_tdb.c
808 printing/nt_printing_migrate_internal.c
809 printing/nt_printing_ads.c
810 printing/queue_process.c
811 ''',
812 deps='''
813 PRINTBASE
814 LIBADS_PRINTER
816 printing_migrate
817 ''')
819 bld.SAMBA3_LIBRARY('printing_migrate',
820 source='''
821 printing/nt_printing_migrate.c
822 rpc_client/cli_winreg_spoolss.c
823 printing/nt_printing_os2.c
824 ''',
825 deps='''
826 NDR_NTPRINTING
827 cli_spoolss
828 RPC_NDR_WINREG
829 LIBCLI_WINREG
830 smbconf
831 ''',
832 private_library=True)
834 bld.SAMBA3_SUBSYSTEM('PRINTING',
835 source='''
836 printing/pcap.c
837 printing/print_svid.c
838 printing/print_aix.c
839 printing/print_cups.c
840 printing/print_generic.c
841 printing/lpq_parse.c
842 printing/print_standard.c
843 printing/print_iprint.c
844 ''',
845 deps='''
846 NDR_PRINTCAP
847 dbwrap
848 tdb-wrap3
849 SMBCONF_PARAM
850 PRINTBASE
851 smbd_base
852 cups
853 ''')
855 bld.SAMBA_BINARY('samba-bgqd',
856 source='printing/samba-bgqd.c',
857 deps='''
858 samba3core
859 CMDLINE_S3
860 AUTH_COMMON
861 RPC_SPOOLSS
862 ''',
863 install_path='${LIBEXECDIR}/samba')
865 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
866 source='lib/filename_util.c',
867 deps='samba-util')
869 bld.SAMBA3_SUBSYSTEM('LIBNET',
870 source='libnet/libnet_join.c libnet/libnet_join_offline.c',
871 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
873 bld.SAMBA3_LIBRARY('net_keytab',
874 source='libnet/libnet_keytab.c',
875 deps='krb5samba ads',
876 private_library=True)
879 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
880 source='''
881 libnet/libnet_dssync.c
882 libnet/libnet_dssync_passdb.c
883 libnet/libnet_dssync_keytab.c
884 ''',
885 deps='''
886 LIBNET
887 RPC_NDR_DRSUAPI
888 ''')
890 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
891 source='lib/eventlog/eventlog.c',
892 deps='NDR_EVENTLOG tdb')
894 bld.SAMBA3_SUBSYSTEM('LIBNMB',
895 source='''
896 libsmb/unexpected.c
897 libsmb/namecache.c
898 libsmb/nmblib.c
899 libsmb/clidgram.c
900 libsmb/namequery.c
901 libsmb/conncache.c
902 libads/sitename_cache.c
903 ''',
904 deps='''
905 LIBTSOCKET
906 LIBCLI_NETLOGON
907 samba3util
908 smbconf
909 addns
910 lmhosts
911 resolv
912 ''')
914 bld.SAMBA3_SUBSYSTEM('SERVICES',
915 source='''
916 services/svc_spoolss.c
917 services/svc_rcinit.c
918 services/svc_winreg_glue.c
919 services/svc_netlogon.c
920 services/svc_winreg.c
921 services/svc_wins.c
922 ''',
923 deps='samba-util')
925 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
926 source='''
927 auth/pampass.c
928 auth/pass_check.c
929 ''',
930 deps='''
931 crypt
933 PAM_ERRORS
934 ''')
936 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
937 source='libsmb/passchange.c',
938 deps='''
939 LIBCLI_SAMR
940 INIT_LSA
941 msrpc3
942 krb5samba
943 ''')
945 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
946 source='lib/version.c')
948 bld.SAMBA3_SUBSYSTEM('SLCACHE',
949 source='libsmb/samlogon_cache.c',
950 deps='''
951 samba-util
953 ''')
955 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
956 source='''
957 libsmb/dsgetdcname.c
958 ''',
959 deps='''
960 CLDAP
961 LIBNMB
962 ''')
964 bld.SAMBA3_SUBSYSTEM('DCUTIL',
965 source='''
966 libsmb/namequery_dc.c
967 ''',
968 deps='''
970 dsgetdcname
971 msrpc3
972 libcli_lsa3
973 ''')
975 bld.SAMBA3_LIBRARY('trusts_util',
976 source='libsmb/trusts_util.c',
977 deps='''
978 libcli_netlogon3
979 msrpc3
980 samba-passdb
981 ''',
982 private_library=True)
984 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
985 source='lib/util_tdb.c',
986 deps='talloc samba3-util')
988 bld.SAMBA3_LIBRARY('samba3-util',
989 source='''
990 lib/util_sec.c
991 lib/util_str.c
992 lib/adt_tree.c
993 lib/util_malloc.c
994 lib/namearray.c
995 lib/file_id.c
996 lib/cbuf.c
997 lib/per_thread_cwd.c
998 ''',
999 deps='''
1000 samba-util
1001 charset
1002 ''',
1003 private_library=True)
1005 bld.SAMBA_LIBRARY('xattr_tdb',
1006 source='lib/xattr_tdb.c',
1007 deps='NDR_XATTR dbwrap samba3-util',
1008 private_library=True)
1010 bld.SAMBA3_LIBRARY('CHARSET3',
1011 source='''
1012 lib/charcnv.c
1013 lib/fstring.c
1014 ''',
1015 public_deps='''
1016 ICONV_WRAPPER
1017 charset
1018 ''',
1019 deps='''
1020 samba-util
1021 samba3-util
1022 ''',
1023 private_library=True)
1025 bld.SAMBA3_SUBSYSTEM('errors3',
1026 source='''
1027 libsmb/errormap.c
1028 libsmb/smberr.c
1029 lib/errmap_unix.c
1030 ''',
1031 deps='samba-errors')
1033 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1034 source='rpc_client/cli_samr.c',
1035 deps='RPC_NDR_SAMR INIT_SAMR')
1037 bld.SAMBA3_LIBRARY('libcli_lsa3',
1038 source='rpc_client/cli_lsarpc.c',
1039 deps='RPC_NDR_LSA INIT_LSA',
1040 private_library=True)
1042 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1043 source='''
1044 rpc_client/cli_netlogon.c
1045 rpc_client/util_netlogon.c
1046 ''',
1047 deps='''
1048 msrpc3
1049 RPC_NDR_NETLOGON
1050 cliauth
1051 smbconf
1052 NETLOGON_CREDS_CLI''',
1053 private_library=True)
1055 bld.SAMBA3_LIBRARY('cli_spoolss',
1056 source='''
1057 rpc_client/cli_spoolss.c
1058 rpc_client/init_spoolss.c
1059 ''',
1060 deps='''
1061 RPC_NDR_SPOOLSS
1062 smbconf
1063 secrets3
1064 gensec
1065 ''',
1066 private_library=True)
1068 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1069 source='rpc_client/cli_winreg.c',
1070 deps='RPC_NDR_WINREG')
1072 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1073 source='rpc_client/cli_winreg_int.c',
1074 deps='LIBCLI_WINREG RPC_SERVER')
1076 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1077 source='rpc_client/cli_pipe_schannel.c',
1078 deps='samba-util krb5samba')
1080 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1081 source='''
1082 rpc_client/cli_mdssvc.c
1083 rpc_client/cli_mdssvc_util.c
1084 ''',
1085 deps='mdssvc RPC_NDR_MDSSVC')
1087 bld.SAMBA3_SUBSYSTEM('RPCCLI_WSP',
1088 source='''
1089 rpc_client/wsp_cli.c
1090 ''',
1091 deps='tevent-util tstream_binding_handle')
1093 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1094 source='rpc_client/init_lsa.c',
1095 deps='samba-util GNUTLS_HELPERS')
1097 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1098 source='rpc_client/init_samr.c',
1099 deps='samba-util GNUTLS_HELPERS')
1101 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1102 source='lib/lsa.c')
1104 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1105 source='lib/tevent_glib_glue.c',
1106 deps='glib-2.0',
1107 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1110 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1111 source='lib/adouble.c',
1112 deps='STRING_REPLACE')
1114 bld.SAMBA3_BINARY('test_adouble',
1115 source='lib/test_adouble.c',
1116 deps='smbd_base STRING_REPLACE cmocka',
1117 for_selftest=True)
1119 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1120 source='lib/string_replace.c')
1122 bld.SAMBA3_SUBSYSTEM('fd_handle',
1123 source='smbd/fd_handle.c')
1125 ########################## BINARIES #################################
1127 bld.SAMBA3_BINARY('smbd/smbd',
1128 source='smbd/server.c smbd/smbd_cleanupd.c',
1129 deps='''
1130 CMDLINE_S3
1131 smbd_base
1132 REG_FULL
1133 ''',
1134 install_path='${SBINDIR}')
1137 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1138 source='lib/tdb_validate.c',
1139 deps='samba-util')
1141 bld.SAMBA3_SUBSYSTEM('util_sd',
1142 deps='smbclient',
1143 source='lib/util_sd.c')
1145 bld.SAMBA3_BINARY('client/smbclient',
1146 source='''
1147 client/client.c
1148 client/clitar.c
1149 client/dnsbrowse.c
1150 ''',
1151 deps='''
1152 talloc
1153 CMDLINE_S3
1154 smbconf
1155 ndr-standard
1156 SMBREADLINE
1157 libsmb
1158 msrpc3
1159 RPC_NDR_SRVSVC
1160 cli_smb_common
1161 archive
1162 ''')
1164 bld.SAMBA3_BINARY('smbspool',
1165 source='client/smbspool.c',
1166 deps='''
1167 talloc
1168 smbconf
1169 libsmb
1170 samba3core
1171 ''')
1173 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1174 source='client/smbspool_krb5_wrapper.c',
1175 deps='''
1176 DYNCONFIG
1177 cups
1178 krb5samba
1179 ''',
1180 install_path='${LIBEXECDIR}/samba',
1181 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1183 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1184 source='script/tests/smbspool_argv_wrapper.c',
1185 for_selftest=True)
1187 bld.SAMBA3_BINARY('smbconftort',
1188 source='lib/smbconf/testsuite.c',
1189 deps='''
1190 talloc
1191 smbconf
1192 CMDLINE_S3
1193 ''',
1194 for_selftest=True)
1196 bld.SAMBA3_BINARY('test_mdsparser_es',
1197 source='''
1198 rpc_server/mdssvc/test_mdsparser_es.c
1199 rpc_server/mdssvc/es_parser.y
1200 rpc_server/mdssvc/es_lexer.l
1201 rpc_server/mdssvc/es_mapping.c
1202 ''',
1203 deps='''
1204 samba3-util
1205 talloc
1206 smbconf
1207 jansson
1208 cmocka
1209 CMDLINE_S3
1210 ''',
1211 enabled=bld.env.spotlight_backend_es,
1212 for_selftest=True)
1214 bld.SAMBA3_BINARY('versiontest',
1215 source='lib/version_test.c',
1216 deps='''
1217 SAMBA_VERSION
1218 smbconf
1219 ''',
1220 install=False)
1222 bld.SAMBA3_BINARY('timelimit',
1223 source='script/tests/timelimit.c',
1224 for_selftest=True)
1226 bld.SAMBA3_BINARY('vlp',
1227 source='printing/tests/vlp.c',
1228 deps='''
1229 talloc
1230 smbconf
1231 ''',
1232 for_selftest=True)
1235 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1236 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1237 bld.SAMBA3_PYTHON('pysmbd',
1238 source='smbd/pysmbd.c',
1239 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1240 realname='samba/samba3/smbd.so'
1243 pycredentials = 'pycredentials'
1244 bld.SAMBA3_PYTHON('pylibsmb',
1245 source='libsmb/pylibsmb.c',
1246 deps='smbclient samba-credentials %s' % pycredentials,
1247 realname='samba/samba3/libsmb_samba_cwrapper.so'
1250 bld.SAMBA3_PYTHON('pymdscli',
1251 source='rpc_client/py_mdscli.c',
1252 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1253 realname='samba/samba3/mdscli.so')
1255 bld.SAMBA3_PYTHON('pys3smbconf',
1256 source='lib/smbconf/pys3smbconf.c',
1257 deps='smbconf',
1258 realname='samba/samba3/smbconf.so')
1260 bld.SAMBA3_BINARY('spotlight2sparql',
1261 source='''
1262 rpc_server/mdssvc/sparql_parser_test.c
1263 rpc_server/mdssvc/sparql_parser.y
1264 rpc_server/mdssvc/sparql_lexer.l
1265 rpc_server/mdssvc/sparql_mapping.c''',
1266 deps='samba3-util talloc ' + bld.env['libtracker'],
1267 enabled=bld.env.spotlight_backend_tracker,
1268 install=False)
1270 bld.SAMBA3_BINARY('spotlight2es',
1271 source='''
1272 rpc_server/mdssvc/es_parser_test.c
1273 rpc_server/mdssvc/es_parser.y
1274 rpc_server/mdssvc/es_lexer.l
1275 rpc_server/mdssvc/es_mapping.c''',
1276 deps='samba3-util talloc jansson smbconf',
1277 enabled=bld.env.spotlight_backend_es,
1278 install=False)
1280 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1281 source='lib/tevent_glib_glue_tests.c',
1282 deps='''
1283 talloc
1284 libsmb
1285 tevent-glib-glue''',
1286 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1287 for_selftest=True)
1289 bld.SAMBA3_BINARY('tevent_glib_tracker',
1290 source='utils/async-tracker.c',
1291 deps='''
1292 talloc
1293 libsmb
1294 CMDLINE_S3
1295 tevent-glib-glue ''' + bld.env['libtracker'],
1296 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1297 install=False)
1299 ########################## INCLUDES #################################
1301 bld.RECURSE('auth')
1302 bld.RECURSE('libgpo/gpext')
1303 bld.RECURSE('librpc')
1304 bld.RECURSE('librpc/idl')
1305 bld.RECURSE('libsmb')
1306 bld.RECURSE('modules')
1307 bld.RECURSE('param')
1308 bld.RECURSE('passdb')
1309 bld.RECURSE('rpc_server')
1310 bld.RECURSE('script')
1311 bld.RECURSE('winbindd')
1312 bld.RECURSE('../examples/libsmbclient')
1313 bld.RECURSE('../examples/pdb')
1314 bld.RECURSE('../examples/VFS')
1315 bld.RECURSE('../examples/fuse')
1316 bld.RECURSE('../examples/winexe')
1317 bld.RECURSE('lib/netapi/tests')
1318 bld.RECURSE('lib/netapi/examples')
1319 bld.RECURSE('smbd/notifyd')
1320 bld.RECURSE('rpcclient')
1321 bld.RECURSE('utils')
1322 bld.RECURSE('nmbd')
1323 bld.RECURSE('lib/util')
1324 bld.RECURSE('torture')
1326 bld.ENFORCE_GROUP_ORDERING()
1327 bld.CHECK_PROJECT_RULES()