1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

2651 Commits

Author SHA1 Message Date
Pavel Březina
3502371a34 Talloc doc: talloc_strdup_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:15 +02:00
Pavel Březina
b233173f85 Talloc doc: talloc_strdup_append()
The destination string is reallocated instead of duplicating the result.
2012-04-18 10:27:15 +02:00
Andrew Tridgell
2eb899de6a replace: added ENOATTR define if undefined
this fixes the build of the tdb xattr wrapper code on systems without
xattr headers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-04-18 07:48:05 +02:00
Matthias Dieter Wallnöfer
27bcf7a0b6 LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with different value ordering
This is essential for fixing up wrong ordered "objectClass" attributes.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-04-18 07:48:05 +02:00
Andrew Tridgell
9deb650fa2 ldb: added ldb_msg_element_equal_ordered()
this gives us a order sensitive msg element comparison. We need this
to allow dbcheck to fix the order of objectClass attributes.
2012-04-18 07:48:05 +02:00
Andrew Bartlett
cc86f8e985 lib/util: Move map_nt_error_from_tdb to the top level
This will help with making dbwrap available as a top level library.

Andrew Bartlett
2012-04-18 12:04:59 +10:00
Michael Adam
9fe3544565 tsocket: Fix a couple of typos and spellings in tsocket_guide.txt
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Apr 17 14:41:53 CEST 2012 on sn-devel-104
2012-04-17 14:41:52 +02:00
Volker Lendecke
6235b761f6 tdb-compat: Add tdb_chainlock_nonblock 2012-04-17 10:20:59 +02:00
Andrew Bartlett
db44f35fc3 param: harmonise wins parameters 2012-04-16 14:35:34 +10:00
Andrew Bartlett
2bc8999266 lib/param: swap preferred name for 'lock dir' to match s3 2012-04-16 14:35:34 +10:00
Andrew Bartlett
3bb7cbf798 param: Merge common param elements by adding .flags
This removes the difference between many of the key elements of the global
parameters table, and makes it easier to merge the two tables.

Andrew Bartlett
2012-04-16 14:35:31 +10:00
Andrew Bartlett
acb64471b3 param: harmonsise logfile parameter 2012-04-16 14:32:37 +10:00
Andrew Bartlett
fed2380ac5 param: Merge common param elements by adding .flags
This removes the difference between many of the key elements of the global
parameters table, and makes it easier to merge the two tables.

Andrew Bartlett
2012-04-16 14:32:29 +10:00
Jeremy Allison
81d17493d6 Remove overly complex attemt to define blkcnt_t and blksize_t. AC_CHECK_TYPE should just do it.
Still trying to fix the buildfarm.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 12 04:28:29 CEST 2012 on sn-devel-104
2012-04-12 04:28:29 +02:00
Christian Ambach
2a36408d40 s3:param convert kernel oplocks to share parameter
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-04-11 11:11:39 -07:00
Andrew Bartlett
d271bf8dc2 lib/tdb_compat: Do not define BUILD_TDB2 if we are not building tdb2
The simple fact that this was defined at all, even to false, caused some
of the tdb2 build code to run.

Andrew Bartlett
2012-04-11 16:00:38 +02:00
Matthias Dieter Wallnöfer
55f4275f18 LDB:ldb_msg.c - add another OOM check in "ldb_msg_copy()" 2012-04-11 12:50:16 +10:00
Andrew Bartlett
73818636e0 ccan: Fix failtest on Fedora 16 as stdlib.h does not imply malloc.h
The issue is that there are two different sources of the malloc
prototype, and they both need to be included otherwise the failtest
overrides chokes on the headers.

Andrew Bartlett
2012-04-11 02:30:40 +02:00
Andrew Bartlett
e17d12c23b ldb-tools: Place the whole of an ldif file in a transaction
This ensures that when operating ldbadd and ldbmodify against local
ldb files, either an ldif file succeeds or fails as a whole.

Also tests to verify that this is working correctly, and an ABI bump
due to the extra (private, but exported to ldb* tools) symbol and
behaviour change.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 10 11:14:43 CEST 2012 on sn-devel-104
2012-04-10 11:14:43 +02:00
Andrew Bartlett
501d6d3dd4 ldb: Allow access to the line number while reading ldif from a file 2012-04-10 17:37:31 +10:00
Andrew Bartlett
c484f259c6 ldb: Detect failures in ldb.base again
We need to wrap the ldb tests in the subunit blackbox helpers.

We also needed to change to the right directory, or else the :< file://
syntax check does not work, as samba4.png is not found.

Andrew Bartlett
2012-04-10 16:57:06 +10:00
Andrew Bartlett
57341c0f29 Revert "ldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function"
This reverts commit 40a4aea891.

Autocommit is important, as otherwise an ldb module could error out
during an operation, and leave an corrupt database.

Andrew Bartlett
2012-04-10 16:40:05 +10:00
Jeremy Allison
d425a4cd3d On advice from Jelmer and Andrew, move the blksize_t and blkcnt_t tests into libreplace to make it standalone.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr 10 04:07:11 CEST 2012 on sn-devel-104
2012-04-10 04:07:11 +02:00
Jeremy Allison
5701a4d861 Move blksize_t and blkcnt_t to replace.h from includes.h. Should help with platforms that don't have these.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr  9 21:40:42 CEST 2012 on sn-devel-104
2012-04-09 21:40:40 +02:00
Volker Lendecke
5184f41cd8 libreplace: We have a poll replacement based on select
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr  9 19:39:51 CEST 2012 on sn-devel-104
2012-04-09 19:39:51 +02:00
Volker Lendecke
670e85fde6 tevent: Fix a typo 2012-04-09 18:05:02 +02:00
Andrew Bartlett
d166b79852 build: Remove sys_open wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
473b974a06 build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more 2012-04-05 02:39:08 +02:00
Andrew Bartlett
b4e58111b9 build: Remove configure tests for *64 functions and types
We now use the standard types only.

Andrew Bartlett
2012-04-05 02:39:08 +02:00
Andrew Bartlett
813d31183d lib/replace: Add getconf LFS_CFLAGS support to autoconf build 2012-04-05 02:39:08 +02:00
Andrew Bartlett
b66b5f9e3f lib/util: charset modules do not exist any more
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr  3 08:07:42 CEST 2012 on sn-devel-104
2012-04-03 08:07:41 +02:00
Andrew Bartlett
4d53e7c2ba lib/util: Add smb_load_module that returns DEBUG(0) errors on failure
These errors are very important when trying to work out why a module
does not load, and this rework allows them to be shown when loading
vfs modules.

Andrew Bartlett
2012-04-03 14:25:12 +10:00
Jeremy Allison
786cb132e8 Fix an IPv6 breakage I introduced by adding an strlcpy truncation check. Found by Matthieu Patou <mat@samba.org>.
The truncate of the strlcpy() here was a *desired* side effect.
strlcpy()/strlcat() should never be used like that. Be more
explicit about the truncation and don't use strlcpy here.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 31 07:59:16 CEST 2012 on sn-devel-104
2012-03-31 07:59:15 +02:00
Matthieu Patou
40a4aea891 ldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Mar 30 11:59:09 CEST 2012 on sn-devel-104
2012-03-30 11:59:09 +02:00
Jeremy Allison
5df1c11539 Start to add truncate checks on all uses of strlcpy(). Reading lwn
has it's uses :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104
2012-03-29 20:48:15 +02:00
Amitay Isaacs
593e731097 lib/tdb: Update ABI
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar 29 13:12:46 CEST 2012 on sn-devel-104
2012-03-29 13:12:46 +02:00
Amitay Isaacs
3fdeaa3992 lib/tdb: Add/expose lock functions to support CTDB
This patch adds two lock functions used by CTDB to perform asynchronous
locking. These functions do not actually perform any fcntl operations,
but only increment internal counters.

 - tdb_transaction_write_lock_mark()
 - tdb_transaction_write_lock_unmark()

It also exposes two internal functions
 - tdb_lock_nonblock()
 - tdb_unlock()

These functions are NOT exposed in include/tdb.h to prevent any further
uses of these functions. If you ever need to use these functions, consider
using tdb2.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2012-03-29 20:07:03 +10:30
Rusty Russell
f74ae3257a cast: make sure suncc sees a constant.
cast_const() et. al. are supposed to be a constant expression, so you can do things like:
	static char *p = cast_const(char *, (const char *)"hello");

Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as
a constant expression.  We need the cast, because (1) the expression could be
a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual
without it.

So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 74859ab18b10aaf990848e49d7789ff5c6cf96c6)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar 29 08:18:57 CEST 2012 on sn-devel-104
2012-03-29 08:18:57 +02:00
Rusty Russell
be25ab9c8d cast: test/compile_fail-cast_static.c should fail without COMPOUND_LITERALS.
It still gave a warning on gcc, because casting a char to a char* gives a warning.  Not so on sun CC.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 6569a707d169a629e25e10710c760c8dc84525c7)
2012-03-29 15:14:30 +10:30
Rusty Russell
3acce707a3 tdb2: fix prototype in tdb1 code.
We were handing an int-returning function where we should hand an enum TDB_ERROR
returning function.  Worse, it was returning 0/-1 instead of 0/TDB_ERR_*.

Fortunately, it's only compared against success, but the Solaris compiler
warns about it, and it's not correct anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-29 15:14:30 +10:30
Kai Blin
06dd4d8ee1 s4 dns: Check smb.conf if we should allow recursion 2012-03-27 16:03:16 +02:00
Matthias Dieter Wallnöfer
d6fde2d4c2 LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD mode
Achieve this by introducing a "disallowDNFilter" flag.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-26 00:57:29 +02:00
Jelmer Vernooij
3c9b32b5eb replace: Avoid DEBUG(), which is not available in libreplace.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar 25 00:13:59 CET 2012 on sn-devel-104
2012-03-25 00:13:59 +01:00
Jelmer Vernooij
49eca290d3 libreplace: Add usleep implementation. 2012-03-24 22:41:05 +01:00
Jelmer Vernooij
c0288e0612 lib/util: Remove obsolete sys_getpid() and sys_fork().
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-24 21:55:40 +01:00
Jelmer Vernooij
55bd27935f lib/util: Allow calloc use in util.c, too.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 18:50:32 CET 2012 on sn-devel-104
2012-03-24 18:50:32 +01:00
Jelmer Vernooij
456abea894 replace: Work around socket wrapper.
It's fine to ignore socket wrapper here, as it doesn't deal with unix domain sockets.
2012-03-24 17:05:29 +01:00
Jelmer Vernooij
10dd5f186f replace: Add system/network.h for ucred struct. 2012-03-24 16:50:37 +01:00
Jelmer Vernooij
71d41a015a libreplace: Add getpeereid implementation. 2012-03-24 16:00:36 +01:00
Jelmer Vernooij
32fd6d639a lib/util: Remove dummy wrapper for getgrgid(). 2012-03-24 15:26:36 +01:00