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