garming/samba-autobuild/.git
12 years agolib/util Remove samba-util-common!
Andrew Bartlett [Mon, 20 Jun 2011 10:36:46 +0000 (20:36 +1000)]
lib/util Remove samba-util-common!

All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett

12 years agolib/util: allow parmlist.c to compile under s3 includes.h
Andrew Bartlett [Mon, 20 Jun 2011 10:43:42 +0000 (20:43 +1000)]
lib/util: allow parmlist.c to compile under s3 includes.h

12 years agolib/util: Use common d_printf() in the whole codebase
Andrew Bartlett [Mon, 20 Jun 2011 09:56:50 +0000 (19:56 +1000)]
lib/util: Use common d_printf() in the whole codebase

This removes the lang_tdb based varient, the only user of the lang_tdb
code is SWAT, which calls that directly.

'net' and 'pam_winbind' are internationalised using gettext.

Andrew Bartlett

12 years agos3-param Put &Globals in the FN_ macros, rather than in each entry
Andrew Bartlett [Mon, 20 Jun 2011 07:57:24 +0000 (17:57 +1000)]
s3-param Put &Globals in the FN_ macros, rather than in each entry

This global replace allows an easier comparison between the source3
and source4 loadparm systems.

Andrew Bartlett

12 years agos4-param Add my authorship to this script
Andrew Bartlett [Mon, 20 Jun 2011 05:51:18 +0000 (15:51 +1000)]
s4-param Add my authorship to this script

12 years agolib/util Make unused d_vfprintf() static
Andrew Bartlett [Mon, 20 Jun 2011 05:02:46 +0000 (15:02 +1000)]
lib/util Make unused d_vfprintf() static

12 years agos3: Fix a winbind message
Volker Lendecke [Mon, 20 Jun 2011 20:18:48 +0000 (22:18 +0200)]
s3: Fix a winbind message

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 23:28:43 CEST 2011 on sn-devel-104

12 years agos3:idmap_autorid: remove redundant code
Michael Adam [Thu, 9 Jun 2011 22:50:42 +0000 (00:50 +0200)]
s3:idmap_autorid: remove redundant code

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jun 20 14:56:29 CEST 2011 on sn-devel-104

12 years agos3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the succe...
Michael Adam [Thu, 9 Jun 2011 22:49:37 +0000 (00:49 +0200)]
s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the success case

12 years agos3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"
Michael Adam [Thu, 9 Jun 2011 22:46:19 +0000 (00:46 +0200)]
s3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"

12 years agos3:idmap_autorid: fail initialization if the domain is not "*"
Michael Adam [Tue, 7 Jun 2011 13:53:49 +0000 (15:53 +0200)]
s3:idmap_autorid: fail initialization if the domain is not "*"

autorid can only be used as a backend for the default idmap configuration.

12 years agos3: Fix the build, NAME_MAX not universally available
Volker Lendecke [Mon, 20 Jun 2011 10:09:06 +0000 (12:09 +0200)]
s3: Fix the build, NAME_MAX not universally available

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 13:45:21 CEST 2011 on sn-devel-104

12 years agoUse tevent_req_oom
Volker Lendecke [Sun, 19 Jun 2011 19:10:01 +0000 (21:10 +0200)]
Use tevent_req_oom

This fixes a few Coverity errors

12 years agotevent: change version to 0.9.12 tevent-0.9.12
Volker Lendecke [Mon, 20 Jun 2011 09:43:51 +0000 (11:43 +0200)]
tevent: change version to 0.9.12

12 years agotevent: Add tevent_req_oom
Volker Lendecke [Sun, 19 Jun 2011 18:55:46 +0000 (20:55 +0200)]
tevent: Add tevent_req_oom

This is a replacement for tevent_req_nomem(NULL, req)

12 years agotdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
Rusty Russell [Mon, 20 Jun 2011 09:10:34 +0000 (18:40 +0930)]
tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.

I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses
it to speed testing, so we should respect it: handle it in our compat
open wrapper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104

12 years agotdb2: tie it into build process if --enable-tdb2-breaks-compat
Rusty Russell [Mon, 20 Jun 2011 09:10:34 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +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-1161-g661d41f)
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: Higher level API fixes.
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb_compat: Higher level API fixes.

My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: use tdb_open_compat.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18: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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:31 +0000 (18:40 +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 [Mon, 20 Jun 2011 09:10:25 +0000 (18:40 +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 [Mon, 20 Jun 2011 07:28:15 +0000 (16:58 +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 [Mon, 20 Jun 2011 07:27:15 +0000 (16:57 +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 [Mon, 20 Jun 2011 07:26:15 +0000 (16:56 +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 [Mon, 20 Jun 2011 07:25:15 +0000 (16:55 +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 [Mon, 20 Jun 2011 07:24:15 +0000 (16:54 +0930)]
lib: import ccan modules for tdb2

Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agos3: Replace shadow_copy2 with a new implementation
Volker Lendecke [Mon, 20 Jun 2011 07:52:21 +0000 (09:52 +0200)]
s3: Replace shadow_copy2 with a new implementation

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 11:17:47 CEST 2011 on sn-devel-104

12 years agopyldb: add unit test for get(myattribute, defVal)
Matthieu Patou [Sat, 11 Jun 2011 14:09:40 +0000 (18:09 +0400)]
pyldb: add unit test for get(myattribute, defVal)

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104

12 years agolibcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
Andrew Bartlett [Mon, 20 Jun 2011 04:55:32 +0000 (14:55 +1000)]
libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol

The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104

12 years agolibcli/util Bring samba4 unix -> nt_status code in common.
Andrew Bartlett [Mon, 20 Jun 2011 04:03:26 +0000 (14:03 +1000)]
libcli/util Bring samba4 unix -> nt_status code in common.

Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett

12 years agos3-libcli Remove unused error mapping tables
Andrew Bartlett [Mon, 20 Jun 2011 03:24:38 +0000 (13:24 +1000)]
s3-libcli Remove unused error mapping tables

The functions which uesed these tables have since moved in common.

Andrew Bartlett

12 years agos3-winbind Move winbind privileged socket dir into state_path()
Andrew Bartlett [Mon, 20 Jun 2011 00:13:09 +0000 (10:13 +1000)]
s3-winbind Move winbind privileged socket dir into state_path()

On default installs, this will be the same as the old lock_path(), but
lock_path() is now a directory that can safely be mapped to /var/locks
and removed by the OS on reboot.  It is important that the directory
permissions of this directory be preserved, as they may be customised.

Andrew Bartlett

12 years agobuild: Put lockdir and cachedir in FHS-like locations by default
Andrew Bartlett [Wed, 15 Jun 2011 04:40:51 +0000 (14:40 +1000)]
build: Put lockdir and cachedir in FHS-like locations by default

This does not move statedir, leaving it in PREFIX/var/locks because
state files such as idmap are dangerous to move, as they might
re-create, causing chaos.

This isn't ideal, but I don't have a better solution right now.

Andrew Bartlett

12 years agos4-build Change default paths and --with flags for a 4.0 release
Andrew Bartlett [Tue, 14 Jun 2011 07:01:02 +0000 (17:01 +1000)]
s4-build Change default paths and --with flags for a 4.0 release

The following changes are made since Samba 3.6:

* --with-ncalrpcdir and --with-nmbdsocketdir are replaced with --with-socket-dir
  (with ntp_signd, winbindd, nmbd subdirs)

* This moves the winbind socket out of /tmp.  Distributions have moved
  this out of /tmp for quite some time now, and /var/run in the FHS
  blessed location these days.  --with-socketdir should point to
  /var/run in a distribution package.

* Configuration files are expected in PREFIX/etc instead of PREFIX/lib
  (they need to be moved manually)

* SWAT data files have moved to PREFIX/share/swat (alongside
  PREFIX/share/setup containing samba4 provision templates).

* The --with-fhs option is no longer available (it was never very
  useful, and major distributions (Debian, OpenSuSE, Fedora) either
  specified every option (overriding the effect) or didn't specify it
  at all.

* PID files are now in PREFIX/var/run, moved from PREFIX/var/locks

* The ncalrpc and nmbd sockets are now in PREFIX/var/run by default

The following changes are made for users of Samba3 binaries built with the top level build in master

* 'state' files are now expected to be in their Samba 3.6 location
  PREFIX/var/locks (and will need to be moved manually)

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-upgradeprovision: propose the use of findprovisionranges if no ranges are present
Matthieu Patou [Sun, 19 Jun 2011 21:05:04 +0000 (01:05 +0400)]
s4-upgradeprovision: propose the use of findprovisionranges if no ranges are present

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104

12 years agos4: create script to find provision ranges for old provision without this information
Matthieu Patou [Sun, 19 Jun 2011 21:00:48 +0000 (01:00 +0400)]
s4: create script to find provision ranges for old provision without this information

12 years agos4-sambatool: extract the confirm function in a separte module for reuse
Matthieu Patou [Sun, 19 Jun 2011 19:09:59 +0000 (23:09 +0400)]
s4-sambatool: extract the confirm function in a separte module for reuse

12 years agos4-samba-tool: remove unused imports
Matthieu Patou [Sun, 19 Jun 2011 17:27:32 +0000 (21:27 +0400)]
s4-samba-tool: remove unused imports

12 years agos4-samba-tool: use correct object notation ie. obj.method rather than method(obj...
Matthieu Patou [Sun, 19 Jun 2011 17:26:48 +0000 (21:26 +0400)]
s4-samba-tool: use correct object notation ie. obj.method rather than method(obj, ...)

12 years agos4-sambatool: use correct way to call class methods
Matthieu Patou [Sun, 19 Jun 2011 16:43:11 +0000 (20:43 +0400)]
s4-sambatool: use correct way to call class methods

12 years agos4-upgradeprovision: improve message output
Matthieu Patou [Sat, 18 Jun 2011 21:17:44 +0000 (01:17 +0400)]
s4-upgradeprovision: improve message output

12 years agos4-upgradeprovision: skip versionNumber, it's used by GPO
Matthieu Patou [Sat, 18 Jun 2011 21:17:27 +0000 (01:17 +0400)]
s4-upgradeprovision: skip versionNumber, it's used by GPO

12 years agos4-provision: Remove hard coded SD for CN=Sites container
Matthieu Patou [Sat, 18 Jun 2011 20:16:54 +0000 (00:16 +0400)]
s4-provision: Remove hard coded SD for CN=Sites container

With the fix introduced by Nadya in changeset
622ef6aed82a2f2f7748c2a88535486af77487de we are now able to generate
correct SD (at least the same as W2k3R2 with a Forest Level of 2003), so
there is no need for this fix anymore as it makes SDs for Forest Level
2003 and lower incorrect.

12 years agos4-upgradeprovision: deltaattr can be empty or none too
Matthieu Patou [Wed, 15 Jun 2011 11:20:46 +0000 (15:20 +0400)]
s4-upgradeprovision: deltaattr can be empty or none too

12 years agos4-upgradeprovision: handle the fact that oEMInformation might not be present
Matthieu Patou [Wed, 15 Jun 2011 11:20:06 +0000 (15:20 +0400)]
s4-upgradeprovision: handle the fact that oEMInformation might not be present

12 years agos4-upgradeprovision: Rework completly how SDs are recalculated
Matthieu Patou [Mon, 13 Jun 2011 21:42:59 +0000 (01:42 +0400)]
s4-upgradeprovision: Rework completly how SDs are recalculated

12 years agos4-python: make checks of sacl in get_diff_sddls optionnal
Matthieu Patou [Sat, 18 Jun 2011 19:21:18 +0000 (23:21 +0400)]
s4-python: make checks of sacl in get_diff_sddls optionnal

12 years agos4-upgradeprovision: remove useless comment
Matthieu Patou [Mon, 13 Jun 2011 21:42:28 +0000 (01:42 +0400)]
s4-upgradeprovision: remove useless comment

12 years agos4-upgradeprovision: ignore objectSid
Matthieu Patou [Mon, 13 Jun 2011 21:41:56 +0000 (01:41 +0400)]
s4-upgradeprovision: ignore objectSid

12 years agos4-upgradeprovision: add a list of attribute that are not DSDB attribute that we...
Matthieu Patou [Mon, 13 Jun 2011 21:39:41 +0000 (01:39 +0400)]
s4-upgradeprovision: add a list of attribute that are not DSDB attribute that we don't want to copy

12 years agos4: fix wrong index usage PRIMARY_USER_SID_INDEX when it should have been PRIMARY_GRO...
Matthieu Patou [Mon, 13 Jun 2011 20:27:07 +0000 (00:27 +0400)]
s4: fix wrong index usage PRIMARY_USER_SID_INDEX when it should have been PRIMARY_GROUP_SID_INDEX

The system account was instanciated with wrong user an group SIDs, group
sid resulted being just the domain SID.
Bug seems to date from fbe6d155bf177c610ee549cc534650b0f0700e8a.

Andrew (B.) please check.

12 years agos4-upgradeprovision: if there is nothing to really modify then skip it
Matthieu Patou [Mon, 13 Jun 2011 19:23:05 +0000 (23:23 +0400)]
s4-upgradeprovision: if there is nothing to really modify then skip it

12 years agos4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove this...
Matthieu Patou [Mon, 13 Jun 2011 18:59:35 +0000 (22:59 +0400)]
s4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove this attribute

12 years agos4-upgradeprovision: change hashAttrNotCopied to be an array
Matthieu Patou [Mon, 13 Jun 2011 14:49:23 +0000 (18:49 +0400)]
s4-upgradeprovision: change hashAttrNotCopied to be an array

12 years agos4-upgradeprovision: fix inverted logic and wrong flags on sd_flags control
Matthieu Patou [Sat, 18 Jun 2011 20:02:03 +0000 (00:02 +0400)]
s4-upgradeprovision: fix inverted logic and wrong flags on sd_flags control

12 years agos4-upgradeprovision: remove useless code
Matthieu Patou [Mon, 13 Jun 2011 14:37:51 +0000 (18:37 +0400)]
s4-upgradeprovision: remove useless code

12 years agos4-upgradeprovision: don't print dn in the list of modified attributes
Matthieu Patou [Mon, 13 Jun 2011 13:15:37 +0000 (17:15 +0400)]
s4-upgradeprovision: don't print dn in the list of modified attributes

12 years agos4-upgradeprovision: clean up, reformating and update docs
Matthieu Patou [Mon, 13 Jun 2011 13:56:17 +0000 (17:56 +0400)]
s4-upgradeprovision: clean up, reformating and update docs

12 years agos4-upgradeprovision: introduce invocation id in lastprovisionUSNs
Matthieu Patou [Mon, 13 Jun 2011 13:39:06 +0000 (17:39 +0400)]
s4-upgradeprovision: introduce invocation id in lastprovisionUSNs

12 years agos4-upgradeprovision: add function to know if attribute is replicated or not
Matthieu Patou [Mon, 13 Jun 2011 14:34:49 +0000 (18:34 +0400)]
s4-upgradeprovision: add function to know if attribute is replicated or not

12 years agos4-upgradeprovision: split update_present in two functions depending on the method...
Matthieu Patou [Mon, 13 Jun 2011 13:50:00 +0000 (17:50 +0400)]
s4-upgradeprovision: split update_present in two functions depending on the method used

In order to make the function a bit more clearer and with less depth,
the selection of attribute that are not updated is split in two
functions depending on the fact that we are using mainly
replPropertyMetadata to make our choice or if we are using the list of
attributes that should, could or shouldn't be updated/created/deleted.

12 years agos4-upgradeprovision: handle_special_attributes don't really need ranges of USNs,...
Matthieu Patou [Mon, 13 Jun 2011 13:13:26 +0000 (17:13 +0400)]
s4-upgradeprovision: handle_special_attributes don't really need ranges of USNs, just the information if we are using replPropertyMetadata for attribute selection

12 years agos4-python: fix wrong discovery of the site name in find_key_provision_parameters
Matthieu Patou [Mon, 13 Jun 2011 12:09:14 +0000 (16:09 +0400)]
s4-python: fix wrong discovery of the site name in find_key_provision_parameters

12 years agos4-upgradeprovisision: fix bug 8063, old SD can miss some componenent (group, owner...
Matthieu Patou [Sun, 5 Jun 2011 13:39:32 +0000 (17:39 +0400)]
s4-upgradeprovisision: fix bug 8063, old SD can miss some componenent (group, owner, ...)

Don't make the assumption that SD are correct, they can be wrong and
misformed.

Fix this bug: https://bugzilla.samba.org/show_bug.cgi?id=8063

12 years agos4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the same
Matthieu Patou [Sun, 5 Jun 2011 13:26:07 +0000 (17:26 +0400)]
s4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the same

Thanks to Dirk Paulli for pointing it with his bug report.

12 years agopy-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal)
Matthieu Patou [Sat, 11 Jun 2011 12:57:02 +0000 (16:57 +0400)]
py-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal)

12 years agos3: Fix Coverity ID 2582: FORWARD_NULL
Volker Lendecke [Sun, 19 Jun 2011 17:23:47 +0000 (19:23 +0200)]
s3: Fix Coverity ID 2582: FORWARD_NULL

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 20:46:43 CEST 2011 on sn-devel-104

12 years agos3: Fix Coverity ID 2583: RESOURCE_LEAK
Volker Lendecke [Sun, 19 Jun 2011 17:23:47 +0000 (19:23 +0200)]
s3: Fix Coverity ID 2583: RESOURCE_LEAK

12 years agos3: Remove unused name_queries
Volker Lendecke [Sun, 19 Jun 2011 11:06:11 +0000 (13:06 +0200)]
s3: Remove unused name_queries

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 15:14:38 CEST 2011 on sn-devel-104

12 years agos3: Fix some type-punned warnings
Volker Lendecke [Sun, 19 Jun 2011 11:06:00 +0000 (13:06 +0200)]
s3: Fix some type-punned warnings

12 years agos3: Add name_resolve_bcast_send/recv
Volker Lendecke [Sun, 19 Jun 2011 11:05:29 +0000 (13:05 +0200)]
s3: Add name_resolve_bcast_send/recv

12 years agos3: Fix a memleak in name_resolve_bcast
Volker Lendecke [Sun, 19 Jun 2011 09:26:55 +0000 (11:26 +0200)]
s3: Fix a memleak in name_resolve_bcast

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 12:40:55 CEST 2011 on sn-devel-104

12 years agos3: Test nttrans_create
Volker Lendecke [Sat, 18 Jun 2011 07:56:12 +0000 (09:56 +0200)]
s3: Test nttrans_create

This is a test for the share security descriptor exception for nttrans_create

12 years agos3: Add incomplete cli_nttrans_create
Volker Lendecke [Sat, 18 Jun 2011 07:10:30 +0000 (09:10 +0200)]
s3: Add incomplete cli_nttrans_create

secdesc only at this moment

12 years agos3: Correctly align even
Volker Lendecke [Sat, 18 Jun 2011 17:30:52 +0000 (19:30 +0200)]
s3: Correctly align even

12 years agos3: Allow NULL sd_size in make_sec_desc
Volker Lendecke [Sat, 18 Jun 2011 07:55:05 +0000 (09:55 +0200)]
s3: Allow NULL sd_size in make_sec_desc

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Jun 18 22:26:15 CEST 2011 on sn-devel-104

12 years agos3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share
Christian Ambach [Fri, 17 Jun 2011 19:54:30 +0000 (21:54 +0200)]
s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share

the time_audit module uses int instead of uint64 as return value
in get_alloc_size so that sizes of files larger than 2 GB are
cut of leading to wrong replies to NtCreateAndX and Windows
clients giving up

While checking the types of all functions, I found two more wrong
return value types that needed correction

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Jun 17 23:11:10 CEST 2011 on sn-devel-104

12 years agos4-errors: Import error maps from the source3/ unix -> ntstatus mapping
Andrew Bartlett [Fri, 17 Jun 2011 07:07:26 +0000 (17:07 +1000)]
s4-errors: Import error maps from the source3/ unix -> ntstatus mapping

We need to syncronise these mappings, as the duplication of this
symobol in the build means that either may be called based only on
library link orders.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Jun 17 10:22:07 CEST 2011 on sn-devel-104

12 years agoerrors: reorder error codes for easier s3/s4 comparison
Andrew Bartlett [Fri, 17 Jun 2011 06:06:34 +0000 (16:06 +1000)]
errors: reorder error codes for easier s3/s4 comparison

12 years agos4-util: removed the s4 nterr.c
Andrew Tridgell [Fri, 17 Jun 2011 04:40:26 +0000 (14:40 +1000)]
s4-util: removed the s4 nterr.c

this is now in common code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>