summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/SConstruct6
-rw-r--r--source4/cldap_server/SConscript3
-rw-r--r--source4/client/SConscript3
-rw-r--r--source4/dsdb/SConscript6
-rw-r--r--source4/ldap_server/SConscript5
-rw-r--r--source4/lib/SConscript4
-rw-r--r--source4/lib/ldb/SConscript32
-rw-r--r--source4/lib/messaging/SConscript3
-rw-r--r--source4/lib/replace/SConscript11
-rw-r--r--source4/lib/samba3/SConscript5
-rw-r--r--source4/lib/socket/SConscript6
-rw-r--r--source4/lib/socket_wrapper/SConscript3
-rw-r--r--source4/lib/tdb/SConscript1
-rw-r--r--source4/lib/tls/SConscript3
-rw-r--r--source4/libcli/SConscript40
-rw-r--r--source4/libnet/SConscript7
-rw-r--r--source4/librpc/SConscript634
-rw-r--r--source4/nbt_server/SConscript7
-rw-r--r--source4/nsswitch/SConscript3
-rw-r--r--source4/rpc_server/SConscript21
-rw-r--r--source4/smbd/SConscript5
-rw-r--r--source4/torture/SConscript57
-rw-r--r--source4/web_server/SConscript3
23 files changed, 852 insertions, 16 deletions
diff --git a/source4/SConstruct b/source4/SConstruct
index 458969acaa..ad63a292f4 100644
--- a/source4/SConstruct
+++ b/source4/SConstruct
@@ -47,4 +47,8 @@ paths = {
dynconfig = dynenv.Object('dynconfig.c')
Export('dynconfig')
-SConscript(dirs=['param','lib'],exports='hostenv')
+SConscript(
+ dirs=['param','lib','torture','rpc_server','cldap_server','libcli',
+ 'nbt_server','client','ldap_server','libnet','nsswitch','web_server',
+ 'smbd','dsdb'],
+ exports='hostenv')
diff --git a/source4/cldap_server/SConscript b/source4/cldap_server/SConscript
new file mode 100644
index 0000000000..cf31cbb1df
--- /dev/null
+++ b/source4/cldap_server/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('cldap_server',['cldap_server.c','netlogon.c'])
diff --git a/source4/client/SConscript b/source4/client/SConscript
new file mode 100644
index 0000000000..1e07a53ec6
--- /dev/null
+++ b/source4/client/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.Program('smbclient', ['client.c'])
diff --git a/source4/dsdb/SConscript b/source4/dsdb/SConscript
new file mode 100644
index 0000000000..f71d901709
--- /dev/null
+++ b/source4/dsdb/SConscript
@@ -0,0 +1,6 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('ldb_objectguid',['samdb/ldb_modules/objectguid.c'])
+hostenv.StaticLibrary('ldb_samldb',['samdb/ldb_modules/samldb.c'])
+hostenv.StaticLibrary('ldb_samba3sam',['samdb/ldb_modules/samba3sam.c'])
+hostenv.StaticLibrary('samdb',['samdb/samdb.c','samdb/samdb_privilege.c','common/flag_mapping.c'])
diff --git a/source4/ldap_server/SConscript b/source4/ldap_server/SConscript
new file mode 100644
index 0000000000..d6b021c3ae
--- /dev/null
+++ b/source4/ldap_server/SConscript
@@ -0,0 +1,5 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('ldap_server',
+ ['ldap_server.c','ldap_backend.c','ldap_bind.c','ldap_rootdse.c',
+ 'ldap_simple_ldb.c','ldap_hacked_ldb.c'])
diff --git a/source4/lib/SConscript b/source4/lib/SConscript
index a4a1f92361..516537cac0 100644
--- a/source4/lib/SConscript
+++ b/source4/lib/SConscript
@@ -20,6 +20,6 @@ hostenv.StaticLibrary('gencache',['gencache.c'])
hostenv.StaticLibrary('pidfile',['pidfile.c'])
hostenv.StaticLibrary('unix_privs',['unix_privs.c'])
-SConscript(dirs=['tdb','popt','cmdline','talloc','registry','charset',
- 'ldb'],
+SConscript(dirs=['replace','tdb','popt','cmdline','talloc','registry','charset',
+ 'ldb','tls','samba3','socket','socket_wrapper','messaging'],
exports='hostenv')
diff --git a/source4/lib/ldb/SConscript b/source4/lib/ldb/SConscript
index 1698a7cff3..1ef1c5f9e6 100644
--- a/source4/lib/ldb/SConscript
+++ b/source4/lib/ldb/SConscript
@@ -1,29 +1,37 @@
Import('hostenv')
-
+Import('talloc')
hostenv.StaticLibrary('modules/timestamps.c')
hostenv.StaticLibrary('modules/rdn_name.c')
hostenv.StaticLibrary('modules/schema.c')
hostenv.StaticLibrary('ldb_ildap/ldb_ildap.c')
hostenv.StaticLibrary('modules/ldb_map.c')
-hostenv.StaticLibrary('ldb_sqlite3/ldb_sqlite3.c')
+
+conf = Configure(hostenv)
+have_sqlite3 = conf.CheckLibWithHeader("sqlite3","sqlite3.h",'c',"sqlite3_open()")
+conf.Finish()
+
+if have_sqlite3:
+ hostenv.StaticLibrary('ldb_sqlite3/ldb_sqlite3.c')
+
hostenv.StaticLibrary('ldb_tdb',
['ldb_tdb/ldb_tdb.c','ldb_tdb/ldb_search.c','ldb_tdb/ldb_pack.c',
'ldb_tdb/ldb_index.c','ldb_tdb/ldb_cache.c','ldb_tdb/ldb_tdb_wrap.c'])
-hostenv.StaticLibrary('ldb',
- ['common/ldb.c','common/ldb_ldif.c','common/ldb_parse.c',
+ldb = hostenv.StaticLibrary('ldb',
+ [talloc,'common/ldb.c','common/ldb_ldif.c','common/ldb_parse.c',
'common/ldb_parse.c','common/ldb_msg.c','common/ldb_utf8.c',
'common/ldb_debug.c','common/ldb_modules.c','common/ldb_match.c',
'common/attrib_handlers.c','common/ldb_dn.c'])
+Export('ldb')
hostenv.StaticLibrary('samba/ldif_handlers.c')
-hostenv.StaticLibrary('ldb_cmdline', 'tools/cmdline.c')
+ldb_cmdline = hostenv.StaticLibrary('ldb_cmdline', 'tools/cmdline.c')
-hostenv.Program('ldbadd',['tools/ldbadd.c'])
-hostenv.Program('ldbdel',['tools/ldbdel.c'])
-hostenv.Program('ldbmodify',['tools/ldbmodify.c'])
-hostenv.Program('ldbsearch',['tools/ldbsearch.c'])
-hostenv.Program('ldbrename',['tools/ldbrename.c'])
-hostenv.Program('ldbtest',['tools/ldbtest.c'])
-hostenv.Program('oLschema2ldif',['tools/oLschema2ldif.c'])
+hostenv.Program('ldbadd',['tools/ldbadd.c',ldb,talloc,ldb_cmdline])
+hostenv.Program('ldbdel',['tools/ldbdel.c',ldb,ldb_cmdline])
+hostenv.Program('ldbmodify',['tools/ldbmodify.c',ldb,ldb_cmdline])
+hostenv.Program('ldbsearch',['tools/ldbsearch.c',ldb,ldb_cmdline])
+hostenv.Program('ldbrename',['tools/ldbrename.c',ldb,ldb_cmdline])
+hostenv.Program('ldbtest',['tools/ldbtest.c',ldb,ldb_cmdline])
+hostenv.Program('oLschema2ldif',['tools/oLschema2ldif.c',ldb])
diff --git a/source4/lib/messaging/SConscript b/source4/lib/messaging/SConscript
new file mode 100644
index 0000000000..4c62ffb82e
--- /dev/null
+++ b/source4/lib/messaging/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('messaging','messaging.c')
diff --git a/source4/lib/replace/SConscript b/source4/lib/replace/SConscript
new file mode 100644
index 0000000000..f8efcc55b9
--- /dev/null
+++ b/source4/lib/replace/SConscript
@@ -0,0 +1,11 @@
+Import('hostenv')
+
+conf = Configure(hostenv)
+#FIXME: conf.CheckBrokenInetNtoa()
+for f in ['strtoull','__strtoull','strtouq','strtoll','__strtoll','strtoq',
+ 'seteuid','setresuid','setegid','setresgid']:
+ conf.CheckFunc(f,'c')
+conf.Finish()
+
+hostenv.StaticLibrary('repdir', ['repdir/repdir.c'])
+hostenv.StaticLibrary('replace', ['replace.c', 'snprintf.c'])
diff --git a/source4/lib/samba3/SConscript b/source4/lib/samba3/SConscript
new file mode 100644
index 0000000000..7fc6e7ce37
--- /dev/null
+++ b/source4/lib/samba3/SConscript
@@ -0,0 +1,5 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('samba3',
+ ['smbpasswd.c','tdbsam.c','policy.c','idmap.c','winsdb.c','samba3.c',
+ 'group.c','registry.c','secrets.c','share_info.c'])
diff --git a/source4/lib/socket/SConscript b/source4/lib/socket/SConscript
new file mode 100644
index 0000000000..4d81cd5696
--- /dev/null
+++ b/source4/lib/socket/SConscript
@@ -0,0 +1,6 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('socket_ipv4.c')
+hostenv.StaticLibrary('socket_ipv6.c')
+hostenv.StaticLibrary('socket_unix.c')
+hostenv.StaticLibrary('socket', ['socket.c','access.c','connect.c'])
diff --git a/source4/lib/socket_wrapper/SConscript b/source4/lib/socket_wrapper/SConscript
new file mode 100644
index 0000000000..fe5844d6da
--- /dev/null
+++ b/source4/lib/socket_wrapper/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('socket_wrapper',['socket_wrapper.c'])
diff --git a/source4/lib/tdb/SConscript b/source4/lib/tdb/SConscript
index a8696ec367..01f5bbe7c7 100644
--- a/source4/lib/tdb/SConscript
+++ b/source4/lib/tdb/SConscript
@@ -11,4 +11,3 @@ tdbtorture = tdbenv.Program('bin/tdbtorture', ['tools/tdbtorture.c',tdb])
tdbdump = tdbenv.Program('bin/tdbdump', ['tools/tdbdump.c',tdb])
tdbbackup = tdbenv.Program('bin/tdbbackup', ['tools/tdbbackup.c',tdb])
-Default(tdbtool,tdbtorture,tdbdump,tdbbackup)
diff --git a/source4/lib/tls/SConscript b/source4/lib/tls/SConscript
new file mode 100644
index 0000000000..88f150b9cf
--- /dev/null
+++ b/source4/lib/tls/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('tls', ['tls.c', 'tlscert.c'])
diff --git a/source4/libcli/SConscript b/source4/libcli/SConscript
new file mode 100644
index 0000000000..4992197166
--- /dev/null
+++ b/source4/libcli/SConscript
@@ -0,0 +1,40 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('cli_utils',
+ ['util/asn1.c', 'util/doserr.c','util/errormap.c','util/clierror.c',
+ 'util/nterr.c','util/smbdes.c'])
+
+hostenv.StaticLibrary('cli_lsa', ['util/clilsa.c'])
+hostenv.StaticLibrary('cli_composite_base', ['composite/composite.c'])
+hostenv.StaticLibrary('cli_composite',
+ ['composite/loadfile.c','composite/savefile.c','composite/connect.c',
+ 'composite/sesssetup.c','composite/fetchfile.c','composite/appendacl.c',
+ 'composite/fsinfo.c'])
+
+hostenv.StaticLibrary('cli_nbt',
+ ['nbt/nbtname.c','nbt/nbtsocket.c','nbt/namequery.c','nbt/nameregister.c',
+ 'nbt/namerefresh.c','nbt/namerelease.c'])
+
+hostenv.StaticLibrary('cli_dgram',
+ [ 'dgram/dgramsocket.c','dgram/mailslot.c','dgram/netlogon.c',
+ 'dgram/ntlogon.c','dgram/browse.c'])
+
+hostenv.StaticLibrary('cli_cldap', ['cldap/cldap.c'])
+hostenv.StaticLibrary('cli_wrepl', ['wrepl/winsrepl.c'])
+hostenv.StaticLibrary('cli_resolve',
+ ['resolve/resolve.c','resolve/nbtlist.c','resolve/bcast.c','resolve/wins.c',
+ 'resolve/host.c'])
+
+
+hostenv.StaticLibrary('smb',
+ ['clireadwrite.c', 'cliconnect.c','clifile.c','clilist.c','clitrans2.c',
+ 'climessage.c','clideltree.c'])
+
+hostenv.StaticLibrary('cli_raw',
+ ['raw/rawfile.c','raw/smb_signing.c','raw/clisocket.c',
+ 'raw/clitransport.c','raw/clisession.c','raw/clitree.c',
+ 'raw/rawrequest.c','raw/rawreadwrite.c','raw/rawsearch.c',
+ 'raw/rawsetfileinfo.c','raw/raweas.c','raw/rawtrans.c',
+ 'raw/clioplock.c','raw/rawnegotiate.c','raw/rawfsinfo.c',
+ 'raw/rawfileinfo.c','raw/rawnotify.c','raw/rawioctl.c',
+ 'raw/rawacl.c','raw/rawdate.c','raw/rawlpq.c'])
diff --git a/source4/libnet/SConscript b/source4/libnet/SConscript
new file mode 100644
index 0000000000..5c898ccab8
--- /dev/null
+++ b/source4/libnet/SConscript
@@ -0,0 +1,7 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('net',
+ ['libnet.c','libnet_passwd.c','libnet_time.c','libnet_rpc.c',
+ 'libnet_join.c','libnet_vampire.c','libnet_samdump.c',
+ 'libnet_samsync_ldb.c','libnet_user.c','libnet_share.c',
+ 'libnet_lookup.c','userinfo.c','userman.c','domain.c'])
diff --git a/source4/librpc/SConscript b/source4/librpc/SConscript
new file mode 100644
index 0000000000..da3f4af4c4
--- /dev/null
+++ b/source4/librpc/SConscript
@@ -0,0 +1,634 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('ndr_base',
+ ['ndr/ndr.c','ndr/ndr_basic.c','ndr/ndr_string.c','ndr/ndr_obfuscate.c',
+ 'ndr/ndr_misc.c'])
+
+hostenv.StaticLibrary('ndr_compression',
+ ['ndr/ndr_compression.c'])
+
+hostenv.StaticLibrary('rpc_base',
+ [ 'rpc/dcerpc.c','rpc/dcerpc_auth.c','rpc/dcerpc_schannel.c',
+ 'rpc/dcerpc_util.c','rpc/dcerpc_error.c','rpc/dcerpc_smb.c',
+ 'rpc/dcerpc_sock.c'])
+
+
+
+[SUBSYSTEM::NDR_AUDIOSRV]
+INIT_FUNCTION = dcerpc_audiosrv_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_audiosrv.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DCERPC]
+INIT_FUNCTION = dcerpc_dcerpc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dcerpc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_ECHO]
+INIT_FUNCTION = dcerpc_echo_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_echo.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_IRPC]
+INIT_FUNCTION = dcerpc_irpc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_irpc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_EXCHANGE]
+INIT_FUNCTION = dcerpc_exchange_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_exchange.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DSBACKUP]
+INIT_FUNCTION = dcerpc_dsbackup_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dsbackup.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_EFS]
+INIT_FUNCTION = dcerpc_efs_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_efs.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_MISC]
+INIT_FUNCTION = dcerpc_misc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_misc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_ROT]
+INIT_FUNCTION = dcerpc_rot_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_rot.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_LSA]
+INIT_FUNCTION = dcerpc_lsa_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_lsa.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DFS]
+INIT_FUNCTION = dcerpc_dfs_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dfs.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DRSUAPI]
+INIT_FUNCTION = dcerpc_drsuapi_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_drsuapi.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_DRSUAPI_PRINT NDR_COMPRESSION
+
+[SUBSYSTEM::NDR_DRSUAPI_PRINT]
+INIT_OBJ_FILES = librpc/ndr/ndr_drsuapi.o
+
+[SUBSYSTEM::NDR_DRSBLOBS]
+INIT_FUNCTION = dcerpc_drsblobs_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_drsblobs.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_POLICYAGENT]
+INIT_FUNCTION = dcerpc_policyagent_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_policyagent.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_UNIXINFO]
+INIT_FUNCTION = dcerpc_unixinfo_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_unixinfo.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_SAMR]
+INIT_FUNCTION = dcerpc_samr_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_samr.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_SPOOLSS]
+INIT_FUNCTION = dcerpc_spoolss_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_spoolss.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_SPOOLSS_BUF
+
+[SUBSYSTEM::NDR_SPOOLSS_BUF]
+INIT_OBJ_FILES = librpc/ndr/ndr_spoolss_buf.o
+
+[SUBSYSTEM::NDR_WKSSVC]
+INIT_FUNCTION = dcerpc_wkssvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_wkssvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_SRVSVC]
+INIT_FUNCTION = dcerpc_srvsvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_srvsvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_SVCCTL
+
+[SUBSYSTEM::NDR_SVCCTL]
+INIT_FUNCTION = dcerpc_svcctl_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_svcctl.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_ATSVC]
+INIT_FUNCTION = dcerpc_atsvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_atsvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_EVENTLOG]
+INIT_FUNCTION = dcerpc_eventlog_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_eventlog.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_EPMAPPER]
+INIT_FUNCTION = dcerpc_epmapper_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_epmapper.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DBGIDL]
+INIT_FUNCTION = dcerpc_dbgidl_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dbgidl.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DSSETUP]
+INIT_FUNCTION = dcerpc_dssetup_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dssetup.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_MSGSVC]
+INIT_FUNCTION = dcerpc_msgsvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_msgsvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_WINS]
+INIT_FUNCTION = dcerpc_wins_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_wins.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_WINREG]
+INIT_FUNCTION = dcerpc_winreg_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_winreg.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_INITSHUTDOWN
+
+[SUBSYSTEM::NDR_INITSHUTDOWN]
+INIT_FUNCTION = dcerpc_initshutdown_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_initshutdown.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_MGMT]
+INIT_FUNCTION = dcerpc_mgmt_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_mgmt.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_PROTECTED_STORAGE]
+INIT_FUNCTION = dcerpc_protected_storage_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_protected_storage.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_DCOM]
+INIT_FUNCTION = dcerpc_dcom_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_dcom.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_ORPC
+
+[SUBSYSTEM::NDR_ORPC_MANUAL]
+INIT_OBJ_FILES = librpc/ndr/ndr_orpc.o
+
+[SUBSYSTEM::NDR_ORPC]
+INIT_FUNCTION = dcerpc_orpc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_orpc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_ORPC_MANUAL
+
+[SUBSYSTEM::NDR_OXIDRESOLVER]
+INIT_FUNCTION = dcerpc_oxidresolver_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_oxidresolver.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_ORPC
+
+[SUBSYSTEM::NDR_REMACT]
+INIT_FUNCTION = dcerpc_remact_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_remact.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_ORPC
+
+[SUBSYSTEM::NDR_WZCSVC]
+INIT_FUNCTION = dcerpc_wzcsvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_wzcsvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_BROWSER]
+INIT_FUNCTION = dcerpc_browser_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_browser.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_W32TIME]
+INIT_FUNCTION = dcerpc_w32time_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_w32time.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_SCERPC]
+INIT_FUNCTION = dcerpc_scerpc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_scerpc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_NTSVCS]
+INIT_FUNCTION = dcerpc_ntsvcs_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_ntsvcs.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_NETLOGON]
+INIT_FUNCTION = dcerpc_netlogon_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_netlogon.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_SAMR
+
+[SUBSYSTEM::NDR_TRKWKS]
+INIT_FUNCTION = dcerpc_trkwks_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_trkwks.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_KEYSVC]
+INIT_FUNCTION = dcerpc_keysvc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_keysvc.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_KRB5PAC]
+INIT_FUNCTION = dcerpc_krb5pac_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_krb5pac.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_KRB5PAC_UTIL
+
+[SUBSYSTEM::NDR_KRB5PAC_UTIL]
+INIT_OBJ_FILES = librpc/ndr/ndr_krb5pac.o
+
+[SUBSYSTEM::NDR_XATTR]
+INIT_FUNCTION = dcerpc_xattr_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_xattr.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_SCHANNEL]
+INIT_FUNCTION = dcerpc_schannel_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_schannel.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW
+
+[SUBSYSTEM::NDR_NBT]
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_nbt.o
+INIT_FUNCTION = dcerpc_nbt_init
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_MISC
+
+[SUBSYSTEM::NDR_WINSREPL]
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_winsrepl.o
+INIT_FUNCTION = dcerpc_winsrepl_init
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = NDR_RAW NDR_NBT
+
+
+[SUBSYSTEM::NDR_ALL]
+REQUIRED_SUBSYSTEMS = NDR_AUDIOSRV NDR_ECHO NDR_DCERPC NDR_EXCHANGE \
+ NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
+ NDR_POLICYAGENT NDR_UNIXINFO NDR_SAMR NDR_SPOOLSS NDR_WKSSVC NDR_SRVSVC NDR_ATSVC \
+ NDR_EVENTLOG NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \
+ NDR_WINREG NDR_MGMT NDR_PROTECTED_STORAGE NDR_OXIDRESOLVER \
+ NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_NTSVCS \
+ NDR_NETLOGON NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL \
+ NDR_ROT NDR_DRSBLOBS NDR_SVCCTL NDR_NBT NDR_WINSREPL LIB_SECURITY_NDR \
+ NDR_INITSHUTDOWN
+
+[SUBSYSTEM::RPC_NDR_ROT]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_rot_c.o
+REQUIRED_SUBSYSTEMS = NDR_ROT RPC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_AUDIOSRV]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_audiosrv_c.o
+REQUIRED_SUBSYSTEMS = NDR_AUDIOSRV RPC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_ECHO]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_echo_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_ECHO
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_EXCHANGE]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_exchange_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_EXCHANGE
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DSBACKUP]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_dsbackup_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DSBACKUP
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_EFS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_efs_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_EFS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_LSA]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_lsa_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_LSA
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DFS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_dfs_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DFS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DRSUAPI]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_drsuapi_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DRSUAPI
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DRSBLOBS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_drsblobs_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DRSBLOBS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_POLICYAGENT]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_policyagent_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_POLICYAGENT
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_UNIXINFO]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_unixinfo_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_UNIXINFO
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_SAMR]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_samr_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SAMR
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_SPOOLSS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_spoolss_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SPOOLSS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_WKSSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_wkssvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WKSSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_SRVSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_srvsvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SRVSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_SVCCTL]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_svcctl_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SVCCTL
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_ATSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_atsvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_ATSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_EVENTLOG]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_eventlog_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_EVENTLOG
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_EPMAPPER]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_epmapper_c.o
+REQUIRED_SUBSYSTEMS = NDR_EPMAPPER
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DBGIDL]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_dbgidl_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DBGIDL
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_DSSETUP]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_dssetup_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DSSETUP
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_MSGSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_msgsvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_MSGSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_WINS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_wins_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WINS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_WINREG]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_winreg_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WINREG
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_INITSHUTDOWN]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_initshutdown_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_INITSHUTDOWN
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_MGMT]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_mgmt_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_MGMT
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_PROTECTED_STORAGE]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_protected_storage_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_PROTECTED_STORAGE
+NOPROTO = YES
+
+[SUBSYSTEM::DCOM_PROXY_DCOM]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_dcom_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DCOM
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_OXIDRESOLVER]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_oxidresolver_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_OXIDRESOLVER
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_REMACT]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_remact_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_REMACT
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_WZCSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_wzcsvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WZCSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_BROWSER]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_browser_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_BROWSER
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_W32TIME]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_w32time_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_W32TIME
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_SCERPC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_scerpc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SCERPC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_NTSVCS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_ntsvcs_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_NTSVCS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_NETLOGON]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_netlogon_c.o
+REQUIRED_SUBSYSTEMS = NDR_NETLOGON
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_TRKWKS]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_trkwks_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_TRKWKS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_NDR_KEYSVC]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_keysvc_c.o
+REQUIRED_SUBSYSTEMS = RPC NDR_KEYSVC
+NOPROTO = YES
+
+################################################
+# Start SUBSYSTEM RPC
+[SUBSYSTEM::RPC]
+REQUIRED_SUBSYSTEMS = NDR_RAW RPC_RAW LIBSMB NDR_MISC NDR_DCERPC NDR_SCHANNEL NDR_LSA NDR_NETLOGON NDR_SAMR NDR_UNIXINFO RPC_NDR_NETLOGON RPC_NDR_EPMAPPER
+# End SUBSYSTEM RPC
+################################################
+
+[SUBSYSTEM::RPC_EJS_ECHO]
+INIT_FUNCTION = ejs_init_rpcecho
+OBJ_FILES = librpc/gen_ndr/ndr_echo_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_ECHO
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_MISC]
+INIT_FUNCTION = ejs_init_misc
+OBJ_FILES = librpc/gen_ndr/ndr_misc_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_MISC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_SAMR]
+INIT_FUNCTION = ejs_init_samr
+OBJ_FILES = librpc/gen_ndr/ndr_samr_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SAMR
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_SECURITY]
+INIT_FUNCTION = ejs_init_security
+OBJ_FILES = librpc/gen_ndr/ndr_security_ejs.o
+REQUIRED_SUBSYSTEMS = RPC LIB_SECURITY_NDR
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_LSA]
+INIT_FUNCTION = ejs_init_lsarpc
+OBJ_FILES = librpc/gen_ndr/ndr_lsa_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_LSA
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_DFS]
+INIT_FUNCTION = ejs_init_dfs
+OBJ_FILES = librpc/gen_ndr/ndr_dfs_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DFS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_DRSUAPI]
+INIT_FUNCTION = ejs_init_drsuapi
+OBJ_FILES = librpc/gen_ndr/ndr_drsuapi_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_DRSUAPI
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_SPOOLSS]
+INIT_FUNCTION = ejs_init_spoolss
+OBJ_FILES = librpc/gen_ndr/ndr_spoolss_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SPOOLSS
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_WKSSVC]
+INIT_FUNCTION = ejs_init_wkssvc
+OBJ_FILES = librpc/gen_ndr/ndr_wkssvc_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WKSSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_SRVSVC]
+INIT_FUNCTION = ejs_init_srvsvc
+OBJ_FILES = librpc/gen_ndr/ndr_srvsvc_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SRVSVC
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_EVENTLOG]
+INIT_FUNCTION = ejs_init_eventlog
+OBJ_FILES = librpc/gen_ndr/ndr_eventlog_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_EVENTLOG
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_WINREG]
+INIT_FUNCTION = ejs_init_winreg
+OBJ_FILES = librpc/gen_ndr/ndr_winreg_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_WINREG
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_INITSHUTDOWN]
+INIT_FUNCTION = ejs_init_initshutdown
+OBJ_FILES = librpc/gen_ndr/ndr_initshutdown_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_INITSHUTDOWN
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_NETLOGON]
+INIT_FUNCTION = ejs_init_netlogon
+OBJ_FILES = librpc/gen_ndr/ndr_netlogon_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_NETLOGON
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_SVCCTL]
+INIT_FUNCTION = ejs_init_svcctl
+OBJ_FILES = librpc/gen_ndr/ndr_svcctl_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_SVCCTL
+NOPROTO = YES
+
+[SUBSYSTEM::RPC_EJS_IRPC]
+INIT_FUNCTION = ejs_init_irpc
+OBJ_FILES = librpc/gen_ndr/ndr_irpc_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_IRPC
+NOPROTO = YES
+
+################################################
+# Start SUBSYSTEM RPC_EJS
+[SUBSYSTEM::RPC_EJS]
+REQUIRED_SUBSYSTEMS = RPC_EJS_ECHO RPC_EJS_MISC RPC_EJS_SAMR RPC_EJS_SECURITY \
+ RPC_EJS_LSA RPC_EJS_SRVSVC RPC_EJS_SVCCTL RPC_EJS_IRPC RPC_EJS_WINREG \
+ RPC_EJS_INITSHUTDOWN
+# End SUBSYSTEM RPC_EJS
+################################################
diff --git a/source4/nbt_server/SConscript b/source4/nbt_server/SConscript
new file mode 100644
index 0000000000..153b223dae
--- /dev/null
+++ b/source4/nbt_server/SConscript
@@ -0,0 +1,7 @@
+Import('hostenv')
+
+
+hostenv.StaticLibrary('winsdb',['wins/winsdb.c'])
+hostenv.StaticLibrary('nbtd_wins',['wins/winsserver.c','wins/winsclient.c','wins/winswack.c'])
+hostenv.StaticLibrary('nbtd_dgram',['dgram/request.c','dgram/netlogon.c','dgram/ntlogon.c','dgram/browse.c'])
+hostenv.StaticLibrary('nbtd',['nbt_server.c','interfaces.c','register.c','query.c','nodestatus.c','defense.c','packet.c'])
diff --git a/source4/nsswitch/SConscript b/source4/nsswitch/SConscript
new file mode 100644
index 0000000000..5cf29c036e
--- /dev/null
+++ b/source4/nsswitch/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('cli_winbind',['wb_common.c'])
diff --git a/source4/rpc_server/SConscript b/source4/rpc_server/SConscript
new file mode 100644
index 0000000000..74caa8fd9e
--- /dev/null
+++ b/source4/rpc_server/SConscript
@@ -0,0 +1,21 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('rpcserver_common',
+ [ 'common/server_info.c', 'common/share_info.c'])
+
+#hostenv.StaticLibrary('rpcserver_dcom', [ 'dcom/oxidresolver.c','dcom/rot.c','dcom/rodb.c','dcom/remact.c', '../librpc/gen_ndr/ndr_dcom_d.c'])
+
+hostenv.StaticLibrary('rpcserver_echo', ['echo/rpc_echo.c'])
+hostenv.StaticLibrary('rpcserver_epmapper', ['epmapper/rpc_epmapper.c'])
+hostenv.StaticLibrary('rpcserver_remote', ['remote/dcesrv_remote.c'])
+hostenv.StaticLibrary('rpcserver_srvsvc', ['srvsvc/dcesrv_srvsvc.c'])
+hostenv.StaticLibrary('rpcserver_wkssvc', ['wkssvc/dcesrv_wkssvc.c'])
+hostenv.StaticLibrary('rpcserver_unixinfo', ['unixinfo/dcesrv_unixinfo.c'])
+hostenv.StaticLibrary('rpcserver_samr', ['samr/dcesrv_samr.c','samr/samr_password.c'])
+hostenv.StaticLibrary('rpcserver_winreg', [ 'winreg/rpc_winreg.c'])
+hostenv.StaticLibrary('rpcserver_netlogon', [ 'netlogon/dcerpc_netlogon.c'])
+hostenv.StaticLibrary('rpcserver_lsa', ['lsa/dcesrv_lsa.c'])
+hostenv.StaticLibrary('rpcserver_spoolss', ['spoolss/dcesrv_spoolss.c'])
+hostenv.StaticLibrary('rpcserver_drsuapi', ['drsuapi/dcesrv_drsuapi.c','drsuapi/drsuapi_cracknames.c'])
+hostenv.StaticLibrary('rpcserver_dssetup', ['dssetup/dcesrv_dssetup.c'])
+hostenv.StaticLibrary('rpcserver', ['dcerpc_server.c', 'dcerpc_sock.c', 'dcesrv_auth.c', 'handles.c'])
diff --git a/source4/smbd/SConscript b/source4/smbd/SConscript
new file mode 100644
index 0000000000..e084ce474e
--- /dev/null
+++ b/source4/smbd/SConscript
@@ -0,0 +1,5 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('server_service',
+ ['service.c','service_stream.c','service_task.c'])
+hostenv.Program('smbd',['server.c'])
diff --git a/source4/torture/SConscript b/source4/torture/SConscript
new file mode 100644
index 0000000000..1e11365e3f
--- /dev/null
+++ b/source4/torture/SConscript
@@ -0,0 +1,57 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('torture_basic',
+ ['basic/scanner.c','basic/utable.c','basic/charset.c',
+ 'basic/mangle_test.c','basic/denytest.c','basic/aliases.c',
+ 'basic/locking.c','basic/secleak.c','basic/rename.c','basic/dir.c',
+ 'basic/delete.c','basic/unlink.c','basic/disconnect.c',
+ 'basic/delaywrite.c','basic/attr.c','basic/properties.c'])
+
+hostenv.StaticLibrary('torture_raw',
+ [ 'raw/qfsinfo.c', 'raw/qfileinfo.c', 'raw/setfileinfo.c', 'raw/search.c',
+ 'raw/close.c', 'raw/open.c', 'raw/mkdir.c', 'raw/oplock.c', 'raw/notify.c',
+ 'raw/mux.c', 'raw/ioctl.c', 'raw/chkpath.c', 'raw/unlink.c', 'raw/read.c',
+ 'raw/context.c', 'raw/write.c', 'raw/lock.c', 'raw/rename.c', 'raw/eas.c',
+ 'raw/streams.c', 'raw/acls.c', 'raw/seek.c', 'raw/composite.c'])
+
+hostenv.StaticLibrary('torture_com',
+ [ 'com/simple.c'])
+
+hostenv.StaticLibrary('torture_rpc',
+ [ 'rpc/lsa.c', 'rpc/session_key.c', 'rpc/echo.c', 'rpc/dcom.c',
+ 'rpc/dfs.c', 'rpc/drsuapi.c', 'rpc/spoolss.c', 'rpc/unixinfo.c',
+ 'rpc/samr.c', 'rpc/wkssvc.c', 'rpc/srvsvc.c', 'rpc/svcctl.c', 'rpc/atsvc.c',
+ 'rpc/eventlog.c', 'rpc/epmapper.c', 'rpc/winreg.c', 'rpc/initshutdown.c',
+ 'rpc/oxidresolve.c', 'rpc/remact.c', 'rpc/mgmt.c', 'rpc/scanner.c',
+ 'rpc/autoidl.c', 'rpc/countcalls.c', 'rpc/testjoin.c', 'rpc/xplogin.c',
+ 'rpc/schannel.c', 'rpc/netlogon.c', 'rpc/samlogon.c', 'rpc/samsync.c',
+ 'rpc/rot.c', 'rpc/bind.c', 'rpc/dssetup.c', 'rpc/alter_context.c',
+ 'rpc/bench.c'])
+
+hostenv.StaticLibrary('torture_rap', [ 'rap/rap.c'] )
+
+hostenv.StaticLibrary('torture_auth', [ 'auth/ntlmssp.c', 'auth/pac.c' ])
+
+hostenv.StaticLibrary('torture_local',
+ ['local/iconv.c', 'lib/talloc/testsuite.c', 'local/messaging.c',
+ 'local/binding_string.c', 'local/idtree.c', 'local/socket.c',
+ 'local/irpc.c', 'local/resolve.c'])
+
+hostenv.StaticLibrary('torture_nbench', [ 'nbench/nbio.c', 'nbench/nbench.c' ])
+
+hostenv.StaticLibrary('torture_ldap',
+ [ 'ldap/common.c', 'ldap/basic.c', 'ldap/cldap.c', 'ldap/cldapbench.c' ])
+
+hostenv.StaticLibrary('torture_nbt',
+ [ 'nbt/query.c', 'nbt/register.c', 'nbt/wins.c', 'nbt/winsbench.c',
+ 'nbt/winsreplication.c', 'nbt/dgram.c'])
+
+hostenv.StaticLibrary('torture_net',
+ [ 'libnet/userinfo.c', 'libnet/userman.c', 'libnet/domain.c',
+ 'libnet/libnet_lookup.c', 'libnet/libnet_user.c', 'libnet/libnet_share.c',
+ 'libnet/libnet_rpc.c'])
+
+hostenv.Program('torture', [ 'torture.c', 'torture_util.c'])
+hostenv.Program('gentest', ['gentest.c','torture_util.c'])
+hostenv.Program('masktest.c')
+hostenv.Program('locktest', ['locktest.c','torture_util.c'])
diff --git a/source4/web_server/SConscript b/source4/web_server/SConscript
new file mode 100644
index 0000000000..b3fa30e267
--- /dev/null
+++ b/source4/web_server/SConscript
@@ -0,0 +1,3 @@
+Import('hostenv')
+
+hostenv.StaticLibrary('web_server',['web_server.c','http.c'])