summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/SConstruct71
-rw-r--r--source4/auth/SConscript7
-rw-r--r--source4/build/scons/asn1.py23
-rw-r--r--source4/build/scons/et.py18
-rw-r--r--source4/build/scons/pidl.py4
-rw-r--r--source4/build/scons/pkgconfig.py13
-rw-r--r--source4/build/smb_build/makefile.pm6
-rw-r--r--source4/dynconfig.c1
-rw-r--r--source4/heimdal_build/SConscript72
-rw-r--r--source4/lib/SConscript3
-rw-r--r--source4/lib/genrand.c1
-rw-r--r--source4/lib/ldb/SConscript1
-rw-r--r--source4/lib/registry/SConscript9
-rw-r--r--source4/lib/socket_wrapper/SConscript5
-rw-r--r--source4/lib/tls/SConscript4
-rw-r--r--source4/param/loadparm.c5
16 files changed, 137 insertions, 106 deletions
diff --git a/source4/SConstruct b/source4/SConstruct
index fb23cc5066..12d47ba89b 100644
--- a/source4/SConstruct
+++ b/source4/SConstruct
@@ -7,21 +7,48 @@
# Copyright (C) 2005 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU GPL
+opts = Options(None, ARGUMENTS)
+opts.AddOptions(
+ BoolOption('developer','enable developer flags', 0),
+ PathOption('prefix','installation prefix','/usr/local/samba')
+)
+
hostenv = Environment(
toolpath=['build/scons','.'],
- tools=['default','pidl','proto','et'],
+ tools=['default','pidl','proto','et','asn1'],
+ options=opts,
CPPPATH=['#include','#','#lib'],
CPPDEFINES={'_SAMBA_BUILD_': None},
)
+if hostenv['developer']:
+ hostenv.Append(CCFLAGS=' -Wall')
+ hostenv.Append(CCFLAGS=' -Wshadow')
+ hostenv.Append(CCFLAGS=' -Werror-implicit-function-declaration')
+ hostenv.Append(CCFLAGS=' -Wstrict-prototypes')
+ hostenv.Append(CCFLAGS=' -Wpointer-arith')
+ hostenv.Append(CCFLAGS=' -Wcast-qual')
+ hostenv.Append(CCFLAGS=' -Wcast-align')
+ hostenv.Append(CCFLAGS=' -Wwrite-strings')
+ hostenv.Append(CCFLAGS=' -Wmissing-format-attribute')
+ hostenv.Append(CCFLAGS=' -Wformat=2')
+ hostenv.Append(CCFLAGS=' -Wno-format-y2k')
+ hostenv.Append(CCFLAGS=' -Wno-declaration-after-statement')
+
+
+
hostenv.Append(CPPPATH = ['#heimdal_build', '#heimdal/lib/krb5',
'#heimdal/lib/hdb', '#heimdal/lib/gssapi',
'#heimdal/lib/asn1', '#heimdal/lib/des',
'#heimdal/kdc', '#heimdal/lib/roken',
'#heimdal/lib/com_err'])
+Export('hostenv')
+
buildenv = hostenv
+Export('buildenv')
+
cross_compiling = 0
if cross_compiling:
@@ -30,10 +57,8 @@ if cross_compiling:
dynenv = hostenv.Copy()
-bindir = "bindir"
-
paths = {
- 'BINDIR': bindir,
+ 'BINDIR': "bin",
'SBINDIR': "sbin",
'CONFIGFILE': "cfg",
'LOGFILEBASE': "lfb",
@@ -43,23 +68,53 @@ paths = {
'SHLIBEXT': "ext",
'LOCKDIR': "lockdir",
'PIDDIR': "piddir",
- 'SMB_PASSWD_FILE': "smbpasswd",
'PRIVATE_DIR': 'private',
'SWATDIR': 'swat'
}
+Export('paths')
+
+conf = hostenv.Configure()
+for h in ['sys/select.h','fcntl.h','sys/fcntl.h','sys/time.h'] + \
+ ['utime.h','grp.h','sys/id.h','limits.h','memory.h'] + \
+ ['compat.h','math.h','sys/param.h','ctype.h','sys/wait.h'] + \
+ ['sys/resource.h','sys/ioctl.h','sys/ipc.h','sys/mode.h'] + \
+ ['sys/mman.h','sys/filio.h','sys/priv.h','sys/shm.h','string.h'] + \
+ ['strings.h','stdlib.h','sys/vfs.h','sys/fs/s5param.h','sys/filsys.h'] + \
+ ['termios.h','termio.h','fnmatch.h','pwd.h','sys/termio.h'] + \
+ ['sys/time.h','sys/statfs.h','sys/statvfs.h','stdarg.h'] + \
+ ['security/pam_modules.h','security/_pam_macros.h','dlfcn.h'] + \
+ ['sys/syslog.h','syslog.h','stdint.h','inttypes.h','locale.h'] + \
+ ['shadow.h','nss.h','nss_common.h','ns_api.h','sys/security.h'] + \
+ ['security/pam_appl.h','sys/capability.h','syscall.h','sys/syscall.h'] + \
+ ['sys/acl.h']:
+ conf.CheckCHeader(h)
+
+for f in ['dlopen','dlsym','dlerror','waitpid','getcwd','strdup'] + \
+ ['strndup','strnlen','strerror','chroot','bzero','memset','strlcpy'] + \
+ ['strlcat','memmove','vsnprintf','snprintf','asprintf','vasprintf'] + \
+ ['setsid','pipe','crypt16','getauthuid','strftime','sigprocmask'] + \
+ ['sigblock','sigaction','innetgr','setnetgrent','getnetgrent'] + \
+ ['endnetgrent','initgroups','setgroups','sysconf','mktime','rename'] + \
+ ['ftruncate','chsize','getpwanam','setlinebuf','srandom','random'] + \
+ ['srand','rand','setenv','usleep','syslog','vsyslog','timegm'] + \
+ ['backtrace','setbuffer','pread','pwrite']:
+ conf.CheckFunc(f)
+
+conf.Finish()
+
[dynenv.Append(CPPDEFINES = {p: '\\"%s\\"' % paths[p]}) for p in paths]
dynconfig = dynenv.Object('dynconfig.c')
Export('dynconfig')
proto_files = []
+Export('proto_files')
SConscript(
dirs=['param','lib','torture','rpc_server','cldap_server','libcli',
'nbt_server','client','ldap_server','libnet','nsswitch','web_server',
'smbd','dsdb','heimdal_build','ntptr','kdc','smb_server','ntvfs',
- 'winbind','scripting','auth'],
- exports='buildenv hostenv proto_files')
+ 'winbind','scripting','auth'])
-hostenv.CProtoHeader(target='include/proto.h',source = proto_files)
+hostenv.CProtoHeader(target='include/proto.h',source=proto_files)
diff --git a/source4/auth/SConscript b/source4/auth/SConscript
index 298092834b..34cff89bb3 100644
--- a/source4/auth/SConscript
+++ b/source4/auth/SConscript
@@ -6,7 +6,12 @@ hostenv.StaticLibrary('auth_winbind.c')
hostenv.StaticLibrary('auth_domain.c')
hostenv.StaticLibrary('auth_developer.c')
hostenv.StaticLibrary('auth_unix.c')
+
+conf = hostenv.Configure()
+have_pam = conf.CheckLibWithHeader('pam', 'security/pam_appl.h', 'c', 'pam_start')
+conf.Finish()
+
hostenv.StaticLibrary('pam_errors.c')
hostenv.StaticLibrary('auth',['auth.c','auth_util.c','auth_sam_reply.c','ntlm_check.c'])
-SConscript(dirs=['ntlmssp','kerberos','gensec'],exports='hostenv')
+SConscript(dirs=['ntlmssp','kerberos','gensec'])
diff --git a/source4/build/scons/asn1.py b/source4/build/scons/asn1.py
index 078ac74a55..f0068e20dd 100644
--- a/source4/build/scons/asn1.py
+++ b/source4/build/scons/asn1.py
@@ -5,22 +5,29 @@ Tool-specific initialization for ASN1
"""
import SCons.Defaults
-import SCons.Scanner.ASN1
import SCons.Util
+import re
-asn1_scanner = SCons.Scanner.ASN1.ASN1Scan()
+output_re = re.compile(r'^([A-Za-z0-9_-]+)[ \t]*::=', re.M)
+
+def asn1_emitter(target,source,env):
+ targets = []
+ for s in source:
+ node = env.File(s)
+ contents = node.get_contents()
+ for j in output_re.findall(contents):
+ targets.append(str(node.get_dir()) + '/asn1_' + j + '.c')
+ return targets, source
asn1_builder = SCons.Builder.Builder(action='$ASN1COM',
src_suffix = '.asn1',
suffix='.c',
- scanner = asn1_scanner)
+ emitter = asn1_emitter)
def generate(env):
- env['ASN1'] = 'FIXME'
- env['PROTOCOM'] = '$ASN1 $SOURCE'
+ env['ASN1'] = './bin/asn1_compile'
+ env['ASN1COM'] = '$ASN1 $SOURCE'
env['BUILDERS']['ASN1'] = asn1_builder
def exists(env):
- return env.Detect('FIXME')
-
-
+ return env.Detect('asn1_compile')
diff --git a/source4/build/scons/et.py b/source4/build/scons/et.py
index ea251cd142..2864b32957 100644
--- a/source4/build/scons/et.py
+++ b/source4/build/scons/et.py
@@ -13,21 +13,9 @@ et_builder = SCons.Builder.Builder(action='$ETCOM',
suffix='.c')
def generate(env):
- env['ET'] = env.Detect('et_compile')
+ env['ET'] = './bin/compile_et'
env['ETCOM'] = '$ET $SOURCE'
- env['BUILDERS']['ET'] = et_builder
+ env['BUILDERS']['ErrorTable'] = et_builder
def exists(env):
- return env.Detect(['et_compile'])
-
-def generate(env):
- """Add Builders and construction variables for lex to an Environment."""
- c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
-
- c_file.add_action('.l', SCons.Defaults.LexAction)
- cxx_file.add_action('.ll', SCons.Defaults.LexAction)
-
- env['LEX'] = env.Detect('flex') or 'lex'
- env['LEXFLAGS'] = SCons.Util.CLVar('')
- env['LEXCOM'] = '$LEX $LEXFLAGS -t $SOURCES > $TARGET'
-
+ return env.Detect(['./bin/compile_et'])
diff --git a/source4/build/scons/pidl.py b/source4/build/scons/pidl.py
index 6bddea3ee4..68a2c2040e 100644
--- a/source4/build/scons/pidl.py
+++ b/source4/build/scons/pidl.py
@@ -5,10 +5,10 @@ Tool-specific initialization for pidl (Perl-based IDL compiler)
"""
import SCons.Defaults
-import SCons.Scanner.IDL
import SCons.Util
+import SCons.Scanner
-idl_scanner = SCons.Scanner.IDL.IDLScan()
+idl_scanner = SCons.Scanner.ClassicCPP("PIDLScan", '.idl', 'CPPPATH', r'depends\(([^,]+),+\)', SCons.Node.FS.default_fs)
pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
src_suffix = '.idl',
diff --git a/source4/build/scons/pkgconfig.py b/source4/build/scons/pkgconfig.py
new file mode 100644
index 0000000000..6a0c82fd35
--- /dev/null
+++ b/source4/build/scons/pkgconfig.py
@@ -0,0 +1,13 @@
+# Based on the examples from the scons wiki
+
+def CheckPKGConfig(context, version):
+ context.Message('Checking for pkg-config... ')
+ ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
+ context.Result(ret)
+ return ret
+
+def CheckPackage(context, name):
+ context.Message('Checking for %s... ' % name)
+ ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
+ context.Result(ret)
+ return ret
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 36183f210f..fdba441f63 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -62,16 +62,12 @@ INSTALLPERMS = 0755
CONFIGFILE = $(CONFIGDIR)/smb.conf
LMHOSTSFILE = $(CONFIGDIR)/lmhosts
-# This is where smbpasswd et al go
-SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
-
PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" \
-DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
-DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\" \
-DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
-DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
- -DSWATDIR=\"$(SWATDIR)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
- -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
+ -DSWATDIR=\"$(SWATDIR)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
__EOD__
return $output;
diff --git a/source4/dynconfig.c b/source4/dynconfig.c
index 096819f822..20567dcafc 100644
--- a/source4/dynconfig.c
+++ b/source4/dynconfig.c
@@ -70,6 +70,5 @@ const char *dyn_SHLIBEXT = SHLIBEXT;
const char *dyn_LOCKDIR = LOCKDIR;
const char *dyn_PIDDIR = PIDDIR;
-const char *dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE;
const char *dyn_PRIVATE_DIR = PRIVATE_DIR;
const char *dyn_SWATDIR = SWATDIR;
diff --git a/source4/heimdal_build/SConscript b/source4/heimdal_build/SConscript
index 86b571f8c2..9724ae7425 100644
--- a/source4/heimdal_build/SConscript
+++ b/source4/heimdal_build/SConscript
@@ -5,22 +5,14 @@ hostenv.StaticLibrary('heimdal_kdc',
'../kdc/log.c','../kdc/misc.c','../kdc/524.c','../kdc/kerberos4.c',
'../kdc/kaserver.c','../kdc/process.c'])
+hdb_asn1 = hostenv.ASN1('../heimdal/lib/hdb/hdb.asn1')
+gssapi_asn1 = hostenv.ASN1('../heimdal/lib/gssapi/spnego.asn1')
+k5_asn1 = hostenv.ASN1('../heimdal/lib/asn1/k5.asn1')
+
hostenv.StaticLibrary('heimdal_hdb',
['../heimdal/lib/hdb/db.c','../heimdal/lib/hdb/hdb.c','../heimdal/lib/hdb/ext.c','../heimdal/lib/hdb/keys.c',
- '../heimdal/lib/hdb/mkey.c','../heimdal/lib/hdb/ndbm.c','../heimdal/lib/hdb/asn1_Event.c',
- '../heimdal/lib/hdb/asn1_GENERATION.c','../heimdal/lib/hdb/asn1_HDBFlags.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_Aliases.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_Constrained_delegation_acl.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_Lan_Manager_OWF.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_PKINIT_acl.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_PKINIT_certificate.c',
- '../heimdal/lib/hdb/asn1_HDB_Ext_Password.c',
- '../heimdal/lib/hdb/asn1_HDB_extension.c',
- '../heimdal/lib/hdb/asn1_HDB_extensions.c',
- '../heimdal/lib/hdb/asn1_Key.c',
- '../heimdal/lib/hdb/asn1_Salt.c',
- '../heimdal/lib/hdb/asn1_hdb_entry.c',
- '../heimdal/lib/hdb/hdb_err.c'])
+ '../heimdal/lib/hdb/mkey.c','../heimdal/lib/hdb/ndbm.c',hdb_asn1,
+ hostenv.ErrorTable('../heimdal/lib/hdb/hdb_err.et')])
hostenv.StaticLibrary('heimdal_gssapi',
['../heimdal/lib/gssapi/init_sec_context.c','../heimdal/lib/gssapi/inquire_cred.c',
@@ -28,10 +20,8 @@ hostenv.StaticLibrary('heimdal_gssapi',
'../heimdal/lib/gssapi/release_name.c','../heimdal/lib/gssapi/release_oid_set.c',
'../heimdal/lib/gssapi/sequence.c','../heimdal/lib/gssapi/test_oid_set_member.c',
'../heimdal/lib/gssapi/unwrap.c','../heimdal/lib/gssapi/verify_mic.c','../heimdal/lib/gssapi/wrap.c',
- '../heimdal/lib/gssapi/address_to_krb5addr.c','../heimdal/lib/gssapi/asn1_ContextFlags.c',
- '../heimdal/lib/gssapi/asn1_MechType.c','../heimdal/lib/gssapi/asn1_MechTypeList.c',
- '../heimdal/lib/gssapi/asn1_NegotiationToken.c','../heimdal/lib/gssapi/asn1_NegTokenInit.c',
- '../heimdal/lib/gssapi/asn1_NegTokenTarg.c','../heimdal/lib/gssapi/8003.c',
+ '../heimdal/lib/gssapi/address_to_krb5addr.c',
+ gssapi_asn1,'../heimdal/lib/gssapi/8003.c',
'../heimdal/lib/gssapi/accept_sec_context.c','../heimdal/lib/gssapi/acquire_cred.c',
'../heimdal/lib/gssapi/add_oid_set_member.c','../heimdal/lib/gssapi/arcfour.c',
'../heimdal/lib/gssapi/ccache_name.c','../heimdal/lib/gssapi/copy_ccache.c','../heimdal/lib/gssapi/cfx.c',
@@ -72,42 +62,12 @@ hostenv.StaticLibrary('heimdal_krb5',
'../heimdal/lib/krb5/set_default_realm.c','../heimdal/lib/krb5/store.c','../heimdal/lib/krb5/store_emem.c',
'../heimdal/lib/krb5/store_fd.c','../heimdal/lib/krb5/store_mem.c','../heimdal/lib/krb5/ticket.c',
'../heimdal/lib/krb5/time.c','../heimdal/lib/krb5/transited.c','../heimdal/lib/krb5/v4_glue.c',
- '../heimdal/lib/krb5/version.c','../heimdal/lib/krb5/warn.c','../heimdal/lib/krb5/krb5_err.c',
- '../heimdal/lib/krb5/heim_err.c','../heimdal/lib/krb5/k524_err.c'])
+ '../heimdal/lib/krb5/version.c','../heimdal/lib/krb5/warn.c',
+ hostenv.ErrorTable('../heimdal/lib/krb5/krb5_err.et'),
+ hostenv.ErrorTable('../heimdal/lib/krb5/heim_err.et'),
+ hostenv.ErrorTable('../heimdal/lib/krb5/k524_err.et')])
-hostenv.StaticLibrary('heimdal_asn1',
- ['../heimdal/lib/asn1/der_get.c','../heimdal/lib/asn1/der_put.c','../heimdal/lib/asn1/der_free.c',
- '../heimdal/lib/asn1/der_length.c','../heimdal/lib/asn1/der_copy.c','../heimdal/lib/asn1/der_cmp.c',
- '../heimdal/lib/asn1/asn1_AD_IF_RELEVANT.c','../heimdal/lib/asn1/asn1_APOptions.c',
- '../heimdal/lib/asn1/asn1_AP_REP.c','../heimdal/lib/asn1/asn1_AP_REQ.c','../heimdal/lib/asn1/asn1_AS_REP.c',
- '../heimdal/lib/asn1/asn1_AS_REQ.c','../heimdal/lib/asn1/asn1_Authenticator.c',
- '../heimdal/lib/asn1/asn1_AuthorizationData.c','../heimdal/lib/asn1/asn1_CBCParameter.c',
- '../heimdal/lib/asn1/asn1_CKSUMTYPE.c','../heimdal/lib/asn1/asn1_ChangePasswdDataMS.c',
- '../heimdal/lib/asn1/asn1_Checksum.c','../heimdal/lib/asn1/asn1_ENCTYPE.c',
- '../heimdal/lib/asn1/asn1_ETYPE_INFO.c','../heimdal/lib/asn1/asn1_ETYPE_INFO2.c',
- '../heimdal/lib/asn1/asn1_ETYPE_INFO2_ENTRY.c','../heimdal/lib/asn1/asn1_ETYPE_INFO_ENTRY.c',
- '../heimdal/lib/asn1/asn1_EncAPRepPart.c','../heimdal/lib/asn1/asn1_EncASRepPart.c',
- '../heimdal/lib/asn1/asn1_EncKDCRepPart.c','../heimdal/lib/asn1/asn1_EncKrbCredPart.c',
- '../heimdal/lib/asn1/asn1_EncKrbPrivPart.c','../heimdal/lib/asn1/asn1_EncTGSRepPart.c',
- '../heimdal/lib/asn1/asn1_EncTicketPart.c','../heimdal/lib/asn1/asn1_EncryptedData.c',
- '../heimdal/lib/asn1/asn1_EncryptionKey.c','../heimdal/lib/asn1/asn1_EtypeList.c',
- '../heimdal/lib/asn1/asn1_HostAddress.c','../heimdal/lib/asn1/asn1_HostAddresses.c',
- '../heimdal/lib/asn1/asn1_KDCOptions.c','../heimdal/lib/asn1/asn1_KDC_REP.c',
- '../heimdal/lib/asn1/asn1_KDC_REQ.c','../heimdal/lib/asn1/asn1_KDC_REQ_BODY.c',
- '../heimdal/lib/asn1/asn1_KRB_CRED.c','../heimdal/lib/asn1/asn1_KRB_ERROR.c',
- '../heimdal/lib/asn1/asn1_KRB_PRIV.c','../heimdal/lib/asn1/asn1_KerberosString.c',
- '../heimdal/lib/asn1/asn1_KerberosTime.c','../heimdal/lib/asn1/asn1_KrbCredInfo.c',
- '../heimdal/lib/asn1/asn1_LR_TYPE.c','../heimdal/lib/asn1/asn1_LastReq.c',
- '../heimdal/lib/asn1/asn1_MESSAGE_TYPE.c','../heimdal/lib/asn1/asn1_METHOD_DATA.c',
- '../heimdal/lib/asn1/asn1_NAME_TYPE.c','../heimdal/lib/asn1/asn1_PADATA_TYPE.c',
- '../heimdal/lib/asn1/asn1_PA_DATA.c','../heimdal/lib/asn1/asn1_PA_ENC_TS_ENC.c',
- '../heimdal/lib/asn1/asn1_PA_PAC_REQUEST.c','../heimdal/lib/asn1/asn1_Principal.c',
- '../heimdal/lib/asn1/asn1_PrincipalName.c','../heimdal/lib/asn1/asn1_RC2CBCParameter.c',
- '../heimdal/lib/asn1/asn1_Realm.c','../heimdal/lib/asn1/asn1_TGS_REP.c',
- '../heimdal/lib/asn1/asn1_TGS_REQ.c','../heimdal/lib/asn1/asn1_Ticket.c',
- '../heimdal/lib/asn1/asn1_TicketFlags.c','../heimdal/lib/asn1/asn1_TransitedEncoding.c',
- '../heimdal/lib/asn1/asn1_err.c','../heimdal/lib/asn1/asn1_krb5int32.c',
- '../heimdal/lib/asn1/asn1_krb5uint32.c'])
+hostenv.StaticLibrary('heimdal_asn1', k5_asn1)
hostenv.StaticLibrary('heimdal_des',
['../heimdal/lib/des/aes.c','../heimdal/lib/des/des.c','../heimdal/lib/des/md4.c','../heimdal/lib/des/md5.c',
@@ -141,8 +101,8 @@ buildenv.Program('asn1_compile',
'../heimdal/lib/asn1/gen_copy.c','../heimdal/lib/asn1/gen_decode.c',
'../heimdal/lib/asn1/gen_encode.c','../heimdal/lib/asn1/gen_free.c',
'../heimdal/lib/asn1/gen_glue.c','../heimdal/lib/asn1/gen_length.c',
- '../heimdal/lib/asn1/hash.c','../heimdal/lib/asn1/lex.c',
- '../heimdal/lib/asn1/parse.c','../heimdal/lib/roken/emalloc.c',
+ '../heimdal/lib/asn1/hash.c','../heimdal/lib/asn1/lex.l',
+ '../heimdal/lib/asn1/parse.y','../heimdal/lib/roken/emalloc.c',
'../heimdal/lib/roken/getarg.c','../heimdal/lib/roken/setprogname.c',
'../heimdal/lib/roken/strupr.c','../heimdal/lib/roken/getprogname.c',
'../heimdal/lib/roken/get_window_size.c','../heimdal/lib/roken/estrdup.c',
@@ -151,7 +111,7 @@ buildenv.Program('asn1_compile',
'lib/replace/snprintf.c','lib/replace/replace.c'])
buildenv.Program('compile_et',
- ['../heimdal/lib/vers/print_version.c','../heimdal/lib/com_err/lex.c','../heimdal/lib/com_err/parse.c',
+ ['../heimdal/lib/vers/print_version.c','../heimdal/lib/com_err/lex.l','../heimdal/lib/com_err/parse.y',
'../heimdal/lib/com_err/compile_et.c','../heimdal/lib/roken/getarg.c',
'../heimdal/lib/roken/get_window_size.c','../heimdal/lib/roken/getprogname.c',
'../heimdal/lib/roken/strupr.c','../heimdal/lib/roken/setprogname.c','heimdal_build/replace.c',
diff --git a/source4/lib/SConscript b/source4/lib/SConscript
index 8833028dbd..9c56310829 100644
--- a/source4/lib/SConscript
+++ b/source4/lib/SConscript
@@ -21,5 +21,4 @@ hostenv.StaticLibrary('pidfile',['pidfile.c'])
hostenv.StaticLibrary('unix_privs',['unix_privs.c'])
SConscript(dirs=['replace','tdb','popt','cmdline','talloc','registry','charset', 'ldb','tls','samba3','socket','socket_wrapper','messaging','com','events',
- 'appweb'],
- exports='hostenv')
+ 'appweb'])
diff --git a/source4/lib/genrand.c b/source4/lib/genrand.c
index ca79116b6a..1149314d0b 100644
--- a/source4/lib/genrand.c
+++ b/source4/lib/genrand.c
@@ -167,7 +167,6 @@ static int do_reseed(BOOL use_fd, int fd)
/* Add in some secret file contents */
do_filehash("/etc/shadow", &seed_inbuf[0]);
- do_filehash(lp_smb_passwd_file(), &seed_inbuf[16]);
/*
* Add the counter, time of day, and pid.
diff --git a/source4/lib/ldb/SConscript b/source4/lib/ldb/SConscript
index 1ef1c5f9e6..1079a441d8 100644
--- a/source4/lib/ldb/SConscript
+++ b/source4/lib/ldb/SConscript
@@ -9,6 +9,7 @@ hostenv.StaticLibrary('modules/ldb_map.c')
conf = Configure(hostenv)
have_sqlite3 = conf.CheckLibWithHeader("sqlite3","sqlite3.h",'c',"sqlite3_open()")
+have_popt = conf.CheckLibWithHeader("popt","popt.h",'c',"poptGetArgs(NULL);")
conf.Finish()
if have_sqlite3:
diff --git a/source4/lib/registry/SConscript b/source4/lib/registry/SConscript
index 65aeb5b17a..a90557532b 100644
--- a/source4/lib/registry/SConscript
+++ b/source4/lib/registry/SConscript
@@ -1,7 +1,12 @@
-Import('hostenv')
+Import('hostenv paths')
# tastes like -*- python -*-
Import('talloc basic popt_common popt param')
registry = hostenv.StaticLibrary('registry',
[basic,talloc,'common/reg_interface.c','common/reg_util.c'])
-hostenv.Program('regtree', ['tools/regtree.c',registry,talloc,basic,popt_common,popt,param])
+regtree = hostenv.Program('regtree', ['tools/regtree.c',registry,talloc,basic,popt_common,popt,param])
+regshell = hostenv.Program('regshell', ['tools/regshell.c',registry,talloc,basic,popt_common,popt,param])
+regpatch = hostenv.Program('regpatch', ['tools/regpatch.c',registry,talloc,basic,popt_common,popt,param])
+regdiff = hostenv.Program('regdiff', ['tools/regdiff.c',registry,talloc,basic,popt_common,popt,param])
+
+hostenv.Install(paths['BINDIR'], [regtree,regshell,regpatch,regdiff])
diff --git a/source4/lib/socket_wrapper/SConscript b/source4/lib/socket_wrapper/SConscript
index 6ec9c338d3..ac9e0466b2 100644
--- a/source4/lib/socket_wrapper/SConscript
+++ b/source4/lib/socket_wrapper/SConscript
@@ -1,2 +1,7 @@
Import('hostenv')
hostenv.StaticLibrary('socket_wrapper',['socket_wrapper.c'])
+
+opts = Options(None, ARGUMENTS)
+opts.AddOptions(
+ BoolOption('socket-wrapper','enable socket wrapper',0)
+)
diff --git a/source4/lib/tls/SConscript b/source4/lib/tls/SConscript
index 6abcdff821..3b1a1d7d4e 100644
--- a/source4/lib/tls/SConscript
+++ b/source4/lib/tls/SConscript
@@ -1,2 +1,6 @@
Import('hostenv')
hostenv.StaticLibrary('tls', ['tls.c', 'tlscert.c'])
+
+conf = hostenv.Configure()
+conf.CheckLibWithHeader('gnutls', 'gnutls/gnutls.h', 'c', 'gnutls_global_init()')
+conf.Finish()
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 8300f4598d..1ea1ac48cd 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -117,7 +117,6 @@ typedef struct
char *szPasswdChat;
char *szLogFile;
char *szConfigFile;
- char *szSMBPasswdFile;
char *szSAM_URL;
char *szSPOOLSS_URL;
char *szWINS_URL;
@@ -419,12 +418,10 @@ static struct parm_struct parm_table[] = {
{"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"obey pam restrictions", P_BOOL, P_GLOBAL, &Globals.bObeyPamRestrictions, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"password server", P_LIST, P_GLOBAL, &Globals.szPasswordServers, NULL, NULL, FLAG_ADVANCED | FLAG_WIZARD | FLAG_DEVELOPER},
- {"smb passwd file", P_STRING, P_GLOBAL, &Globals.szSMBPasswdFile, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"sam database", P_STRING, P_GLOBAL, &Globals.szSAM_URL, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"spoolss database", P_STRING, P_GLOBAL, &Globals.szSPOOLSS_URL, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"wins database", P_STRING, P_GLOBAL, &Globals.szWINS_URL, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"private dir", P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
-
{"passwd chat", P_STRING, P_GLOBAL, &Globals.szPasswdChat, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"password level", P_INTEGER, P_GLOBAL, &Globals.pwordlevel, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"lanman auth", P_BOOL, P_GLOBAL, &Globals.bLanmanAuth, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
@@ -614,7 +611,6 @@ static void init_globals(void)
do_parameter("server services", "smb rpc nbt ldap cldap web kdc", NULL);
do_parameter("ntptr providor", "simple_ldb", NULL);
do_parameter("auth methods", "anonymous sam_ignoredomain", NULL);
- do_parameter("smb passwd file", dyn_SMB_PASSWD_FILE, NULL);
do_parameter("private dir", dyn_PRIVATE_DIR, NULL);
do_parameter("sam database", "sam.ldb", NULL);
do_parameter("spoolss database", "spoolss.ldb", NULL);
@@ -817,7 +813,6 @@ FN_GLOBAL_STRING(lp_unix_charset, &Globals.unix_charset)
FN_GLOBAL_STRING(lp_display_charset, &Globals.display_charset)
FN_GLOBAL_STRING(lp_logfile, &Globals.szLogFile)
FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile)
-FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile)
FN_GLOBAL_STRING(lp_sam_url, &Globals.szSAM_URL)
FN_GLOBAL_STRING(lp_spoolss_url, &Globals.szSPOOLSS_URL)
FN_GLOBAL_STRING(lp_wins_url, &Globals.szWINS_URL)