rusty/samba.git
12 years agotdb2: tdb2restore tdb2-wip2
Rusty Russell [Wed, 15 Jun 2011 01:34:39 +0000 (11:04 +0930)]
tdb2: tdb2restore

I needed this for converting the example databases in the source tree.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: tie it into build process if --enable-tdb2-breaks-compat
Rusty Russell [Wed, 15 Jun 2011 01:34:37 +0000 (11:04 +0930)]
tdb2: tie it into build process if --enable-tdb2-breaks-compat

This is simplistic.  We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.

Once we have tdb1 compatibility in tdb2, we can rename this option to
--enable-tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: create tdb2 versions of various testing TDBs.
Rusty Russell [Wed, 8 Jun 2011 08:15:41 +0000 (17:45 +0930)]
tdb2: create tdb2 versions of various testing TDBs.

Soon, TDB2 will handle tdb1 files, but until then, we substitute.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: python wrapper
Rusty Russell [Wed, 8 Jun 2011 08:14:41 +0000 (17:44 +0930)]
tdb2: python wrapper

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agosource3/lib/util_tdb.c: operation timeout support for TDB2.
Rusty Russell [Wed, 8 Jun 2011 08:13:41 +0000 (17:43 +0930)]
source3/lib/util_tdb.c: operation timeout support for TDB2.

TDB2 doesn't have (the racy) signal pointer; the new method is to
override the locking callbacks and do the timeout internally.

The technique here is to invalidate the struct flock when the timeout
occurs, so it works even if it happens before we enter the fcntl() call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: minor changes to SAMBIFY it.
Rusty Russell [Wed, 8 Jun 2011 08:12:41 +0000 (17:42 +0930)]
tdb2: minor changes to SAMBIFY it.

This is a bit messy, but it works.  Kept as a separate patch so it's
easier to merge back and forth with CCAN's tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: add lib/tdb2 (from CCAN init-1146-g72dc7d4)
Rusty Russell [Wed, 8 Jun 2011 08:11:41 +0000 (17:41 +0930)]
tdb2: add lib/tdb2 (from CCAN init-1146-g72dc7d4)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: use tdb_open_compat.
Rusty Russell [Wed, 8 Jun 2011 08:10:41 +0000 (17:40 +0930)]
tdb_compat: use tdb_open_compat.

This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: tdb_parse_record() returns negative errors, not -1.
Rusty Russell [Wed, 8 Jun 2011 08:09:41 +0000 (17:39 +0930)]
tdb2: tdb_parse_record() returns negative errors, not -1.

Fixup callers to tdb_parse_record() to be compatible with tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agosource3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.
Rusty Russell [Wed, 8 Jun 2011 08:08:41 +0000 (17:38 +0930)]
source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.

TDB has no idea of endian itself, but it knows whether the TDB is the
same endian as the current machine, so we should use that rather than
implementing TDB_BIGENDIAN in tdb2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_validate: TDB2 support for tdb_validate_child and tdb_backup.
Rusty Russell [Wed, 8 Jun 2011 08:07:41 +0000 (17:37 +0930)]
tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.

We don't expose freelist or hash size for TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
Rusty Russell [Wed, 8 Jun 2011 08:06:41 +0000 (17:36 +0930)]
tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.

These don't exist in tdb2.  The former is used in one weird place in
tdb1, and the latter not at all.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoldb: replace 'struct TDB_DATA' with 'TDB_DATA'
Rusty Russell [Wed, 8 Jun 2011 08:05:41 +0000 (17:35 +0930)]
ldb: replace 'struct TDB_DATA' with 'TDB_DATA'

The typedef is TDB2 compatible, the struct isn't.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: use tdb_errorstr_compat()
Rusty Russell [Wed, 8 Jun 2011 08:04:41 +0000 (17:34 +0930)]
tdb_compat: use tdb_errorstr_compat()

Since TDB2 functions return the error directly, tdb_errorstr() taken an
error code, not the tdb as it does in TDB1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
Rusty Russell [Wed, 8 Jun 2011 08:03:41 +0000 (17:33 +0930)]
tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.

Note that tdb_nextkey_compat frees the old key for us.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_unlockall/tdb_unlockall_read: ignore return value.
Rusty Russell [Wed, 8 Jun 2011 08:02:41 +0000 (17:32 +0930)]
tdb_unlockall/tdb_unlockall_read: ignore return value.

TDB2 returns void here.  tdb_unlockall will *always* return with the
database unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_traverse/tdb_traverse_read: check returns for negative, not -1.
Rusty Russell [Wed, 8 Jun 2011 08:01:41 +0000 (17:31 +0930)]
tdb_traverse/tdb_traverse_read: check returns for negative, not -1.

TDB2 returns a negative error number on failure.  This is compatible
if we always check for < 0 instead of == -1.

Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_chainunlock: ignore return value.
Rusty Russell [Wed, 8 Jun 2011 08:00:41 +0000 (17:30 +0930)]
tdb_chainunlock: ignore return value.

TDB2 returns void here.  tdb_chainunlock will *always* return with the
chain unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_chainlock: check returns for 0, not -1.
Rusty Russell [Wed, 8 Jun 2011 07:59:41 +0000 (17:29 +0930)]
tdb_chainlock: check returns for 0, not -1.

TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_transaction_cancel: ignore return value.
Rusty Russell [Wed, 8 Jun 2011 07:58:41 +0000 (17:28 +0930)]
tdb_transaction_cancel: ignore return value.

TDB2 returns void here.  tdb_transaction_cancel will *always* return
with the transaction cancelled, but it will complain via the log
function if a transaction wasn't in progress.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_transaction_commit: check returns for 0, not -1.
Rusty Russell [Wed, 8 Jun 2011 07:57:41 +0000 (17:27 +0930)]
tdb_transaction_commit: check returns for 0, not -1.

TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_store: check returns for 0, not -1.
Rusty Russell [Wed, 8 Jun 2011 07:56:41 +0000 (17:26 +0930)]
tdb_store: check returns for 0, not -1.

TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_delete: check returns for 0, not -1.
Rusty Russell [Wed, 8 Jun 2011 07:55:41 +0000 (17:25 +0930)]
tdb_delete: check returns for 0, not -1.

TDB2 returns a negative error number on failure.  This is compatible
if we always check for != 0 instead of == -1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_fetch_compat: use instead of tdb_fetch.
Rusty Russell [Wed, 8 Jun 2011 07:54:41 +0000 (17:24 +0930)]
tdb_fetch_compat: use instead of tdb_fetch.

This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat.h: divert every tdb build and includes to tdb_compat
Rusty Russell [Wed, 8 Jun 2011 07:53:41 +0000 (17:23 +0930)]
tdb_compat.h: divert every tdb build and includes to tdb_compat

We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agolib/tdb_compat: header for tdb1 vs tdb2.
Rusty Russell [Wed, 8 Jun 2011 07:52:41 +0000 (17:22 +0930)]
lib/tdb_compat: header for tdb1 vs tdb2.

TDB2's API is slightly different from TDB1.  In particular, all functions
return 0 (TDB_SUCCESS) or a negative error number, rather than -1 or tdb_null
and storing the error in tdb_error() (though TDB2 does that as well).

The simplest fix is to replace all the different functions with a wrapper,
and that is done here.

Compatibility functions:

tdb_null: not used as an error return, so not defined by tdb2.
tdb_fetch_compat: TDB1-style data-returning tdb_fetch.
tdb_firstkey_compat: TDB1-style data-returning tdb_firstkey
tdb_nextkey_compat: TDB1-style data-returning tdb_nextkey, with
TDB2-style free of old key.
tdb_errorstr_compat: TDB1-style tdb_errorstr() which takes TDB instead of ecode.
TDB_CONTEXT: TDB1-style typedef for struct tdb_context.
tdb_open_compat: Simplified open routine which takes log function, sets
TDB_ALLOW_NESTING as Samba expects, and adds TDB_CLEAR_IF_FIRST support.

Things defined away in TDB2 wrappers:

tdb_traverse_read: TDB2's tdb_traverse only uses read-locks anyway.
tdb_reopen/tdb_reopen_all: TDB2 detects this error itself.
TDB_INCOMPATIBLE_HASH: TDB2 uses the Jenkins hash already.
TDB_VOLATILE: TDB2 shouldn't have freelist scaling issues.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agosource3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.
Rusty Russell [Wed, 8 Jun 2011 07:51:41 +0000 (17:21 +0930)]
source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.

Rather than tdb's internal one.

12 years agosource3/lib/util.c: str_checksum to use Jenkins hash from CCAN.
Rusty Russell [Wed, 8 Jun 2011 07:50:41 +0000 (17:20 +0930)]
source3/lib/util.c: str_checksum to use Jenkins hash from CCAN.

Rather than tdb's internal one.

12 years agosmb_share_modes: don't use tdb_jenkins_hash.
Rusty Russell [Wed, 8 Jun 2011 07:49:41 +0000 (17:19 +0930)]
smb_share_modes: don't use tdb_jenkins_hash.

It's a nice hash, but this usage has nothing to do with TDB.  So use the
Jenkins hash directly from CCAN instead (it's the same one).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agolib: import ccan modules for tdb2
Rusty Russell [Wed, 8 Jun 2011 07:48:41 +0000 (17:18 +0930)]
lib: import ccan modules for tdb2

Imported from git://git.ozlabs.org/~ccan/ccan init-1146-g72dc7d4

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agos4-cldap: fixed the CLDAP response for IPv6 clients
Andrew Tridgell [Tue, 7 Jun 2011 05:46:17 +0000 (15:46 +1000)]
s4-cldap: fixed the CLDAP response for IPv6 clients

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Jun  7 08:57:48 CEST 2011 on sn-devel-104

12 years agos4-ipv6: fixed a crash in the IPv6 DNS code
Andrew Tridgell [Tue, 7 Jun 2011 04:10:38 +0000 (14:10 +1000)]
s4-ipv6: fixed a crash in the IPv6 DNS code

12 years agos4-dns: fixed samba_tool -> samba-tool
Andrew Tridgell [Tue, 7 Jun 2011 03:46:24 +0000 (13:46 +1000)]
s4-dns: fixed samba_tool -> samba-tool

12 years agos4-build: install a build link bin/provision
Andrew Tridgell [Tue, 7 Jun 2011 03:15:15 +0000 (13:15 +1000)]
s4-build: install a build link bin/provision

12 years agoselftest: Fix 'make quicktest' on systems without LDAP development support
Andrew Bartlett [Tue, 7 Jun 2011 03:22:58 +0000 (13:22 +1000)]
selftest: Fix 'make quicktest' on systems without LDAP development support

This should ensure that we don't run the Samba3/Samba4 integration
tests on machines without ADS support.

(Some samba3 tests in the full 'make test' may still fail however)

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jun  7 07:17:32 CEST 2011 on sn-devel-104

12 years agos4-provision: fixed detection of V4/V6 addresses
Andrew Tridgell [Tue, 7 Jun 2011 02:55:31 +0000 (12:55 +1000)]
s4-provision: fixed detection of V4/V6 addresses

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Jun  7 06:07:24 CEST 2011 on sn-devel-104

12 years agos4-ipv6: fixed iface_list_same_net() for IPv6
Andrew Tridgell [Tue, 7 Jun 2011 02:55:09 +0000 (12:55 +1000)]
s4-ipv6: fixed iface_list_same_net() for IPv6

12 years agos4-ipv6: fixed DNS handling with new IPv6 code
Andrew Tridgell [Tue, 7 Jun 2011 02:35:10 +0000 (12:35 +1000)]
s4-ipv6: fixed DNS handling with new IPv6 code

12 years agos4-dsdb: cope with missing backlinks in rpmd handling
Andrew Tridgell [Tue, 7 Jun 2011 00:44:48 +0000 (10:44 +1000)]
s4-dsdb: cope with missing backlinks in rpmd handling

if backlinks have not propogated correctly in a previous replication
this allows us to recover

12 years agos4-netlogon: force an IPv4 address
Andrew Tridgell [Mon, 6 Jun 2011 05:19:16 +0000 (15:19 +1000)]
s4-netlogon: force an IPv4 address

this interface is currently V4 only, don't try and return a V6 address
in a V4 structure

12 years agos4-ipv6: fix iface_list_best_ip() for IPv6
Andrew Tridgell [Mon, 6 Jun 2011 05:18:12 +0000 (15:18 +1000)]
s4-ipv6: fix iface_list_best_ip() for IPv6

return an interface with the same address family as the target

12 years agos3-docs Add documentation for ncalrpc dir
Andrew Bartlett [Mon, 6 Jun 2011 23:47:26 +0000 (09:47 +1000)]
s3-docs Add documentation for ncalrpc dir

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jun  7 02:57:33 CEST 2011 on sn-devel-104

12 years agos3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4
Andrew Bartlett [Mon, 6 Jun 2011 23:09:16 +0000 (09:09 +1000)]
s3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4

This avoids loading the smb.conf twice.

Andrew Bartlett

12 years agos4-auth Move default auth methods back into auth.c
Andrew Bartlett [Mon, 6 Jun 2011 23:07:52 +0000 (09:07 +1000)]
s4-auth Move default auth methods back into auth.c

This changes auth_methods_from_lp to no longer use the parametric
options, and to cope with ROLE_DOMAIN_BDC and ROLE_DOMAIN_PDC.  This
will assist in calling the source4 auth subsystem with a source3
derived lp_ctx.

Andrew Bartlett

12 years agos3: Remove unused variables
Volker Lendecke [Mon, 6 Jun 2011 20:31:33 +0000 (22:31 +0200)]
s3: Remove unused variables

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun  7 00:42:51 CEST 2011 on sn-devel-104

12 years agos3-waf: Fix pthreadpool build which needs librt now.
Andreas Schneider [Mon, 6 Jun 2011 20:22:34 +0000 (22:22 +0200)]
s3-waf: Fix pthreadpool build which needs librt now.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Jun  6 23:31:09 CEST 2011 on sn-devel-104

12 years agoFix bug #8197 - winbind does not properly detect when a DC connection is dead.
Jeremy Allison [Fri, 3 Jun 2011 17:22:44 +0000 (10:22 -0700)]
Fix bug #8197 - winbind does not properly detect when a DC connection is dead.

Only waiting for writability doesn't get fd errors back with poll.
So always begin by selecting for readability, and if we get it then
see if bytes were available to read or it really is an error condition.

If bytes were available, remove the select on read as we know we
will retrieve the error when we've finished writing and start
reading the reply (or the write will timeout or fail).

Metze and Volker please check.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Jun  6 21:53:16 CEST 2011 on sn-devel-104

12 years agos3: Remove a pointless if-statement
Volker Lendecke [Mon, 6 Jun 2011 15:03:06 +0000 (17:03 +0200)]
s3: Remove a pointless if-statement

We are here only if we have more than one num_pending

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun  6 18:21:17 CEST 2011 on sn-devel-104

12 years agos3: Fix two debug messages
Volker Lendecke [Mon, 6 Jun 2011 10:41:26 +0000 (12:41 +0200)]
s3: Fix two debug messages

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun  6 14:11:06 CEST 2011 on sn-devel-104

12 years agos4/server: simplify and replace bad portable gettimeofday by time
Björn Jacke [Sun, 5 Jun 2011 19:32:11 +0000 (21:32 +0200)]
s4/server: simplify and replace bad portable gettimeofday by time

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Mon Jun  6 12:58:26 CEST 2011 on sn-devel-104

12 years agos3/pthreadpool: replace bad portable gettimeofday by clock_gettime
Björn Jacke [Sun, 5 Jun 2011 19:30:16 +0000 (21:30 +0200)]
s3/pthreadpool: replace bad portable gettimeofday by clock_gettime

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-s4-param: Add hooks for parametric options in the s3/s4 glue layer
Andrew Bartlett [Mon, 6 Jun 2011 06:47:32 +0000 (16:47 +1000)]
s3-s4-param: Add hooks for parametric options in the s3/s4 glue layer

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun  6 10:48:53 CEST 2011 on sn-devel-104

12 years agos3-passdb use new loadparm_init_s3 rather than reloading the smb.conf
Andrew Bartlett [Mon, 6 Jun 2011 01:16:19 +0000 (11:16 +1000)]
s3-passdb use new loadparm_init_s3 rather than reloading the smb.conf

12 years agos4-modules Remove lp_ctx from init functions that no longer need it
Andrew Bartlett [Mon, 6 Jun 2011 04:58:28 +0000 (14:58 +1000)]
s4-modules Remove lp_ctx from init functions that no longer need it

Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett

12 years agos4-param Remove 'modules dir'
Andrew Bartlett [Mon, 6 Jun 2011 04:39:19 +0000 (14:39 +1000)]
s4-param Remove 'modules dir'

The Samba waf build ensures that dyn_MODULESDIR is always correct
(even for in-tree binaries), so we don't need to allow the user to
configure this at run time.

Andrew Bartlett

12 years agolib/util use modules_path(), data_path() and shlib_ext() from source3
Andrew Bartlett [Mon, 6 Jun 2011 04:37:06 +0000 (14:37 +1000)]
lib/util use modules_path(), data_path() and shlib_ext() from source3

This brings these helpful utility functions in common, as they are not
based on either loadparm system.

(The 'modules dir' parameter from Samba4 will shortly be removed, so
there is no loss in functionality)

Andrew Bartlett

12 years agos3-lib Remove unused lib_path()
Andrew Bartlett [Mon, 6 Jun 2011 04:22:12 +0000 (14:22 +1000)]
s3-lib Remove unused lib_path()

12 years agos4-param Add hook between Samba3 and Samba4 loadparm systems.
Andrew Bartlett [Wed, 1 Jun 2011 13:22:24 +0000 (23:22 +1000)]
s4-param Add hook between Samba3 and Samba4 loadparm systems.

In the top level build, this allows calls to code that requires a
lpcfg_ style loadparm_context, while using the global parameters
loaded from the source3 loadparm code.

Andrew Bartlett

12 years agos4-param make lpcfg_sam_name() cope with PDC and BDC roles
Andrew Bartlett [Mon, 6 Jun 2011 01:38:04 +0000 (11:38 +1000)]
s4-param make lpcfg_sam_name() cope with PDC and BDC roles

These roles (ROLE_DOMAIN_CONTROLLER is ROLE_DOMAIN_BDC) will come in
from the s3 loadparm.

Andrew Bartlett

12 years agos3-param always allow the realm parameter
Andrew Bartlett [Mon, 6 Jun 2011 00:56:19 +0000 (10:56 +1000)]
s3-param always allow the realm parameter

12 years agos4-param Remove 'sid generator'
Andrew Bartlett [Thu, 2 Jun 2011 08:56:10 +0000 (18:56 +1000)]
s4-param Remove 'sid generator'

This was only used by the Fedora DS backend for Samba4.  We agreed to
no longer support external LDAP backends.

Andrew Bartlett

12 years agos4-param Remove 'idmap database'
Andrew Bartlett [Thu, 2 Jun 2011 05:49:36 +0000 (15:49 +1000)]
s4-param Remove 'idmap database'

This is now just idmap.ldb in the private dir, which remains.

12 years agos4-param Remove 'secrets database' parameter
Andrew Bartlett [Thu, 2 Jun 2011 05:47:44 +0000 (15:47 +1000)]
s4-param Remove 'secrets database' parameter

This is now just secrets.ldb in the private dir, which remains.

12 years agos4-param Remove 'sam database' parameter
Andrew Bartlett [Thu, 2 Jun 2011 05:43:40 +0000 (15:43 +1000)]
s4-param Remove 'sam database' parameter

This now just relies on the private dir parameter, which remains.

Andrew Bartlett

12 years agolibcli/util Remove prototype for ntstatus_dos_equal()
Andrew Bartlett [Wed, 1 Jun 2011 12:16:08 +0000 (22:16 +1000)]
libcli/util Remove prototype for ntstatus_dos_equal()

This was removed recently.

12 years agos4-ipv6: fill in family when initialising from sockaddr
Andrew Tridgell [Mon, 6 Jun 2011 01:31:23 +0000 (11:31 +1000)]
s4-ipv6: fill in family when initialising from sockaddr

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jun  6 05:35:36 CEST 2011 on sn-devel-104

12 years agos4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c
Andrew Tridgell [Mon, 6 Jun 2011 00:43:05 +0000 (10:43 +1000)]
s4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c

the code is now generic to both V4 and V6

12 years agos4-ipv6: fix the address family for IPv6 string addresses
Andrew Tridgell [Mon, 6 Jun 2011 00:42:28 +0000 (10:42 +1000)]
s4-ipv6: fix the address family for IPv6 string addresses

12 years agos4-ipv6: allow for IPv6 in dcerpc socket calls
Andrew Tridgell [Mon, 6 Jun 2011 00:13:41 +0000 (10:13 +1000)]
s4-ipv6: allow for IPv6 in dcerpc socket calls

12 years agos4-ipv6: allow for IPv6 in resolver top level calls
Andrew Tridgell [Mon, 6 Jun 2011 00:13:20 +0000 (10:13 +1000)]
s4-ipv6: allow for IPv6 in resolver top level calls

12 years agos4-ipv6: use the server address family
Andrew Tridgell [Mon, 6 Jun 2011 00:11:53 +0000 (10:11 +1000)]
s4-ipv6: use the server address family

don't force v4 in connect_multi

12 years agoutil-net: added is_ipaddress_v6()
Andrew Tridgell [Mon, 6 Jun 2011 00:11:13 +0000 (10:11 +1000)]
util-net: added is_ipaddress_v6()

12 years agos4-ipv6: cope with IPv6 in our async DNS client code
Andrew Tridgell [Sun, 5 Jun 2011 22:09:02 +0000 (08:09 +1000)]
s4-ipv6: cope with IPv6 in our async DNS client code

12 years agos4-script: install some of the samba scripts in bin/ during build
Andrew Tridgell [Fri, 3 Jun 2011 22:22:30 +0000 (08:22 +1000)]
s4-script: install some of the samba scripts in bin/ during build

12 years agos4-testparm: testparm is now part of samba_tool
Andrew Tridgell [Fri, 3 Jun 2011 22:20:54 +0000 (08:20 +1000)]
s4-testparm: testparm is now part of samba_tool

12 years agos4-ipv6: enable IPv6 by default
Andrew Tridgell [Fri, 3 Jun 2011 21:59:54 +0000 (07:59 +1000)]
s4-ipv6: enable IPv6 by default

it now passes all tests

12 years agos4-ipv6: fixed binding to ipv4 addresses
Andrew Tridgell [Fri, 3 Jun 2011 07:57:57 +0000 (17:57 +1000)]
s4-ipv6: fixed binding to ipv4 addresses

12 years agos4-ipv6: removed an old comment
Andrew Tridgell [Fri, 3 Jun 2011 01:43:38 +0000 (11:43 +1000)]
s4-ipv6: removed an old comment

the comment is not correct any more

12 years agos4-ipv6: don't add link local addresses to DNS
Andrew Tridgell [Fri, 3 Jun 2011 01:43:09 +0000 (11:43 +1000)]
s4-ipv6: don't add link local addresses to DNS

these make no sense as DNS addresses

12 years agos4-ipv6: ensure wrepl server does not use ipv6
Andrew Tridgell [Thu, 2 Jun 2011 08:20:13 +0000 (18:20 +1000)]
s4-ipv6: ensure wrepl server does not use ipv6

WINS only does IPv4

12 years agoipv6: always try to convert as a numeric address first
Andrew Tridgell [Thu, 2 Jun 2011 07:10:17 +0000 (17:10 +1000)]
ipv6: always try to convert as a numeric address first

This avoids unnecessary name lookups, plus it fixes a problem with
using interpret_string_addr*() with the wildcard IPv6 address

12 years agos4-ipv6: added IPv6 support to samba_dnsupdate
Andrew Tridgell [Thu, 2 Jun 2011 07:09:17 +0000 (17:09 +1000)]
s4-ipv6: added IPv6 support to samba_dnsupdate

12 years agos4-ipv6: update callers to load_interface_list()
Andrew Tridgell [Thu, 2 Jun 2011 05:40:28 +0000 (15:40 +1000)]
s4-ipv6: update callers to load_interface_list()

12 years agos4-ipv6: allow ipv6 to be enabled/disabled in smb.conf
Andrew Tridgell [Thu, 2 Jun 2011 05:39:54 +0000 (15:39 +1000)]
s4-ipv6: allow ipv6 to be enabled/disabled in smb.conf

this adds the parametric option ipv6:enable=true/false

It defaults to false for now, until the remaining issues with testing
of ipv6 are resolved

12 years agos4-gpo: fixed display of GPO version numbers
Andrew Tridgell [Thu, 12 May 2011 20:53:26 +0000 (22:53 +0200)]
s4-gpo: fixed display of GPO version numbers

12 years agos4-ipv6: the wins replication server can only handle IPv4
Andrew Tridgell [Thu, 12 May 2011 11:08:45 +0000 (13:08 +0200)]
s4-ipv6: the wins replication server can only handle IPv4

12 years agos4-webserver: fixed a talloc reference error on startup failure
Andrew Tridgell [Thu, 12 May 2011 10:38:03 +0000 (12:38 +0200)]
s4-webserver: fixed a talloc reference error on startup failure

12 years agos4-ipv6: only listen on V4 addresses in the NBT server
Andrew Tridgell [Thu, 12 May 2011 10:37:34 +0000 (12:37 +0200)]
s4-ipv6: only listen on V4 addresses in the NBT server

NBT doesn't do IPv6

12 years agos4-ipv6: use "ip" instead of "ipv4" for servers
Andrew Tridgell [Thu, 12 May 2011 10:36:33 +0000 (12:36 +0200)]
s4-ipv6: use "ip" instead of "ipv4" for servers

this allows stream_setup_socket() to work with both v4 and v6
addresses

12 years agos4-ipv6: use iface_list_wildcard() to listen on IPv6
Andrew Tridgell [Thu, 12 May 2011 10:35:02 +0000 (12:35 +0200)]
s4-ipv6: use iface_list_wildcard() to listen on IPv6

when we need to listen on a wildcard address, we now listen on a list
of sockets, usually 0.0.0.0 and ::

12 years agos4-ipv6: fixed stream_setup_socket() to handle IPv6
Andrew Tridgell [Thu, 12 May 2011 10:33:01 +0000 (12:33 +0200)]
s4-ipv6: fixed stream_setup_socket() to handle IPv6

for IP we now detect the address family from the address, rather than
requiring the caller to specify it.

12 years agos4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLY
Andrew Tridgell [Thu, 12 May 2011 10:30:16 +0000 (12:30 +0200)]
s4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLY

this changes ipv6_listen() to use IPV6_V6ONLY, and to setup the right
scope id for link local IPv6 addresses

12 years agos4-ipv6: added socket_address_from_sockaddr_storage()
Andrew Tridgell [Thu, 12 May 2011 10:29:21 +0000 (12:29 +0200)]
s4-ipv6: added socket_address_from_sockaddr_storage()

this converts a struct sockaddr_storage to a struct socket_address

12 years agos4-ipv6: added ipv4 functions to interface code
Andrew Tridgell [Thu, 12 May 2011 10:27:37 +0000 (12:27 +0200)]
s4-ipv6: added ipv4 functions to interface code

this adds iface_list_first_v4() and iface_list_n_is_v4(). The NBT
server will use these to allow it to listen only for IPv4 addresses.

12 years agos4-ipv6: fixed a warning
Andrew Tridgell [Thu, 12 May 2011 10:27:01 +0000 (12:27 +0200)]
s4-ipv6: fixed a warning

12 years agos4-ipv6: allow IPv6 addresses in our interfaces list
Andrew Tridgell [Thu, 12 May 2011 10:26:18 +0000 (12:26 +0200)]
s4-ipv6: allow IPv6 addresses in our interfaces list

12 years agos4-ipv6: changed the default "socket address"
Andrew Tridgell [Thu, 12 May 2011 10:25:51 +0000 (12:25 +0200)]
s4-ipv6: changed the default "socket address"

this changes the default socket address to the empty string. This
allows uses to specify 0.0.0.0 meaning to listen only on the IPv4
wildcard address.

12 years agos4-ipv6: added iface_list_wildcard()
Andrew Tridgell [Thu, 12 May 2011 10:23:35 +0000 (12:23 +0200)]
s4-ipv6: added iface_list_wildcard()

this returns a list of wildcard address to listen on, when we don't
have 'bind interfaces only' set. It is a list, not a single address,
we need to listen separately for the IPv6 "::" address from the IPv4
0.0.0.0 address.

This also takes account of the loadparm "socket address" option

12 years agonss_wins: Add a stackframe to lookup_byname_backend()
Volker Lendecke [Mon, 16 May 2011 12:48:39 +0000 (14:48 +0200)]
nss_wins: Add a stackframe to lookup_byname_backend()

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun  5 15:17:42 CEST 2011 on sn-devel-104

12 years agos3: Make use of name_resolve_bcast in nmblookup
Volker Lendecke [Mon, 2 May 2011 21:39:09 +0000 (23:39 +0200)]
s3: Make use of name_resolve_bcast in nmblookup