summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-20tdb_delete: check returns for 0, not -1.Rusty Russell5-8/+8
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>
2011-06-20tdb_fetch_compat: use instead of tdb_fetch.Rusty Russell20-64/+66
This is a noop for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat.h: divert every tdb build and includes to tdb_compatRusty Russell35-82/+94
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>
2011-06-20lib/tdb_compat: header for tdb1 vs tdb2.Rusty Russell4-0/+240
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>
2011-06-20source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.Rusty Russell1-3/+2
Rather than tdb's internal one.
2011-06-20source3/lib/util.c: str_checksum to use Jenkins hash from CCAN.Rusty Russell2-3/+5
Rather than tdb's internal one.
2011-06-20smb_share_modes: don't use tdb_jenkins_hash.Rusty Russell3-5/+4
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>
2011-06-20lib: import ccan modules for tdb2Rusty Russell135-1/+13875
Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20s3: Replace shadow_copy2 with a new implementationVolker Lendecke1-598/+1205
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Jun 20 11:17:47 CEST 2011 on sn-devel-104
2011-06-20pyldb: add unit test for get(myattribute, defVal)Matthieu Patou1-0/+5
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104
2011-06-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett40-142/+142
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
2011-06-20libcli/util Bring samba4 unix -> nt_status code in common.Andrew Bartlett8-19/+12
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
2011-06-20s3-libcli Remove unused error mapping tablesAndrew Bartlett1-549/+0
The functions which uesed these tables have since moved in common. Andrew Bartlett
2011-06-20s3-winbind Move winbind privileged socket dir into state_path()Andrew Bartlett1-1/+1
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
2011-06-20build: Put lockdir and cachedir in FHS-like locations by defaultAndrew Bartlett1-2/+2
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
2011-06-20s4-build Change default paths and --with flags for a 4.0 releaseAndrew Bartlett2-59/+21
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>
2011-06-20s4-upgradeprovision: propose the use of findprovisionranges if no ranges are ↵Matthieu Patou1-0/+14
present Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104
2011-06-19s4: create script to find provision ranges for old provision without this ↵Matthieu Patou1-0/+174
information
2011-06-19s4-sambatool: extract the confirm function in a separte module for reuseMatthieu Patou2-10/+36
2011-06-19s4-samba-tool: remove unused importsMatthieu Patou1-2/+1
2011-06-19s4-samba-tool: use correct object notation ie. obj.method rather than ↵Matthieu Patou1-37/+31
method(obj, ...)
2011-06-19s4-sambatool: use correct way to call class methodsMatthieu Patou1-53/+54
2011-06-19s4-upgradeprovision: improve message outputMatthieu Patou1-1/+1
2011-06-19s4-upgradeprovision: skip versionNumber, it's used by GPOMatthieu Patou1-0/+1
2011-06-19s4-provision: Remove hard coded SD for CN=Sites containerMatthieu Patou2-16/+0
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.
2011-06-19s4-upgradeprovision: deltaattr can be empty or none tooMatthieu Patou1-8/+8
2011-06-19s4-upgradeprovision: handle the fact that oEMInformation might not be presentMatthieu Patou1-2/+5
2011-06-19s4-upgradeprovision: Rework completly how SDs are recalculatedMatthieu Patou1-66/+99
2011-06-19s4-python: make checks of sacl in get_diff_sddls optionnalMatthieu Patou1-2/+6
2011-06-19s4-upgradeprovision: remove useless commentMatthieu Patou1-1/+0
2011-06-19s4-upgradeprovision: ignore objectSidMatthieu Patou1-2/+3
2011-06-19s4-upgradeprovision: add a list of attribute that are not DSDB attribute ↵Matthieu Patou1-0/+4
that we don't want to copy
2011-06-19s4: fix wrong index usage PRIMARY_USER_SID_INDEX when it should have been ↵Matthieu Patou1-1/+1
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.
2011-06-19s4-upgradeprovision: if there is nothing to really modify then skip itMatthieu Patou1-0/+3
2011-06-19s4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove ↵Matthieu Patou1-0/+3
this attribute
2011-06-19s4-upgradeprovision: change hashAttrNotCopied to be an arrayMatthieu Patou1-26/+22
2011-06-19s4-upgradeprovision: fix inverted logic and wrong flags on sd_flags controlMatthieu Patou1-3/+4
2011-06-19s4-upgradeprovision: remove useless codeMatthieu Patou1-3/+0
2011-06-19s4-upgradeprovision: don't print dn in the list of modified attributesMatthieu Patou1-1/+2
2011-06-19s4-upgradeprovision: clean up, reformating and update docsMatthieu Patou1-9/+8
2011-06-19s4-upgradeprovision: introduce invocation id in lastprovisionUSNsMatthieu Patou2-29/+73
2011-06-19s4-upgradeprovision: add function to know if attribute is replicated or notMatthieu Patou1-0/+20
2011-06-19s4-upgradeprovision: split update_present in two functions depending on the ↵Matthieu Patou1-130/+171
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.
2011-06-19s4-upgradeprovision: handle_special_attributes don't really need ranges of ↵Matthieu Patou1-5/+6
USNs, just the information if we are using replPropertyMetadata for attribute selection
2011-06-19s4-python: fix wrong discovery of the site name in find_key_provision_parametersMatthieu Patou1-1/+1
2011-06-19s4-upgradeprovisision: fix bug 8063, old SD can miss some componenent ↵Matthieu Patou1-16/+20
(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
2011-06-19s4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the sameMatthieu Patou1-1/+1
Thanks to Dirk Paulli for pointing it with his bug report.
2011-06-19py-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal)Matthieu Patou1-3/+8
2011-06-19s3: Fix Coverity ID 2582: FORWARD_NULLVolker Lendecke1-0/+5
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jun 19 20:46:43 CEST 2011 on sn-devel-104
2011-06-19s3: Fix Coverity ID 2583: RESOURCE_LEAKVolker Lendecke1-1/+5