summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2011-06-20Use tevent_req_oomVolker Lendecke9-15/+15
This fixes a few Coverity errors
2011-06-20tdb2: create tdb2 versions of various testing TDBs.Rusty Russell1-0/+0
Soon, TDB2 will handle tdb1 files, but until then, we substitute. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20source3/lib/util_tdb.c: operation timeout support for TDB2.Rusty Russell1-0/+96
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>
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell20-34/+34
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>
2011-06-20tdb_compat: use tdb_open_compat.Rusty Russell5-13/+26
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>
2011-06-20tdb2: tdb_parse_record() returns negative errors, not -1.Rusty Russell2-3/+3
Fixup callers to tdb_parse_record() to be compatible with tdb2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.Rusty Russell1-2/+16
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>
2011-06-20tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.Rusty Russell1-2/+10
We don't expose freelist or hash size for TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.Rusty Russell2-1/+10
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>
2011-06-20ldb: replace 'struct TDB_DATA' with 'TDB_DATA'Rusty Russell4-6/+9
The typedef is TDB2 compatible, the struct isn't. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: use tdb_errorstr_compat()Rusty Russell3-14/+14
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>
2011-06-20tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.Rusty Russell3-12/+12
Note that tdb_nextkey_compat frees the old key for us. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell13-16/+16
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>
2011-06-20tdb_chainunlock: ignore return value.Rusty Russell3-10/+5
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>
2011-06-20tdb_chainlock: check returns for 0, not -1.Rusty Russell4-5/+5
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_transaction_cancel: ignore return value.Rusty Russell3-18/+9
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>
2011-06-20tdb_transaction_commit: check returns for 0, not -1.Rusty Russell2-5/+5
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_store: check returns for 0, not -1.Rusty Russell5-13/+13
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_delete: check returns for 0, not -1.Rusty Russell3-6/+6
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 Russell12-46/+46
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 Russell12-52/+53
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-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 Russell4-1/+6
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-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett1-1/+1
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 Bartlett1-2/+1
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-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-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
2011-06-19s3: Remove unused name_queriesVolker Lendecke1-34/+0
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jun 19 15:14:38 CEST 2011 on sn-devel-104
2011-06-19s3: Fix some type-punned warningsVolker Lendecke1-7/+8
2011-06-19s3: Add name_resolve_bcast_send/recvVolker Lendecke2-20/+104
2011-06-19s3: Fix a memleak in name_resolve_bcastVolker Lendecke1-4/+7
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jun 19 12:40:55 CEST 2011 on sn-devel-104
2011-06-19s3: Test nttrans_createVolker Lendecke5-0/+112
This is a test for the share security descriptor exception for nttrans_create
2011-06-19s3: Add incomplete cli_nttrans_createVolker Lendecke2-0/+208
secdesc only at this moment
2011-06-19s3: Correctly align evenVolker Lendecke1-1/+3
2011-06-17s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba shareChristian Ambach1-3/+3
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
2011-06-17errors: reorder error codes for easier s3/s4 comparisonAndrew Bartlett1-11/+11
2011-06-17s3-util: remove the s3 nterr.cAndrew Tridgell4-66/+2
this is now in common code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17libclu/util: Move get_friendly_nt_error_msg() in common.Andrew Bartlett1-20/+0
Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-16s3:wb_lookupsids: add some paranoia checks to wb_lookupsids_recv()Stefan Metzmacher1-0/+18
This hopefully catches future bugs. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jun 16 19:50:16 CEST 2011 on sn-devel-104
2011-06-16s3:wb_lookupsids: don't ignore 'result' and check if we got useable valuesStefan Metzmacher1-4/+48
The wrong fix for bug #8215 discovered this bug, as it caused sam_rids_to_names() to always return NT_STATUS_NONE_MAPPED. metze
2011-06-16Revert "s3-winbind: Fix paranoia checks in winbindd_samr.c."Stefan Metzmacher1-2/+2
This reverts commit 207a84d725b905c2b119d2ef0f4f4d4eb391140d. This is the wrong fix for the problem, see bug #8215. metze
2011-06-16s3:rpc_server/svcctl: fix valgrind bug in _svcctl_QueryServiceObjectSecurity()Stefan Metzmacher1-1/+1
r->out.buffer needs to stay in its size, as it will be marshalled completely. As it's preallocated and initialized with zeros, we just need to copy the payload into it, even if it's smaller than the offered buffer size. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jun 16 14:15:47 CEST 2011 on sn-devel-104
2011-06-16s3:rpc_server/svcctl: fix valgrind bugs in _svcctl_QueryServiceConfig2W()Stefan Metzmacher1-9/+5
r->out.buffer needs to stay in its size, as it will be marshalled completely. As it's preallocated and initialized with zeros, we just need to copy the payload into it. If we always marshall the return buffer, we already have the needed buffer size and don't need to call ndr_size_* functions. metze
2011-06-16s3:rpc_server/svcctl: don't allocate return values on a temporary stackframeStefan Metzmacher1-5/+3
And always initialize the whole return structure. This caused samba3.posix_s3.rpc.svcctl to be flakey. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jun 16 11:34:34 CEST 2011 on sn-devel-104
2011-06-15s3: Add debug level 0 warnings to make_new_server_info_guestVolker Lendecke1-2/+6
I've got a backtrace where this must have failed, but it is not clear why. If this fails, we should really complain because we can't start up. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jun 15 15:20:49 CEST 2011 on sn-devel-104
2011-06-15s3: Fix the return of make_new_server_info_guestVolker Lendecke1-1/+1