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

21 Commits

Author SHA1 Message Date
Michael Adam
cf0cb0add9 dbwrap: add a dbwrap_flags argument to db_open()
This is in preparation to support handing flags to backends,
in particular activating read only record support for ctdb
databases. For a start, this does nothing but adding the
parameter, and all databases use DBWRAP_FLAG_NONE.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:06 +01:00
Gregor Beck
49cd31e39d s3:net registry check: use tdb_data_string()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18 13:15:11 +02:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Volker Lendecke
8f94ecbb90 dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
7f19a5ab52 dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
2fd28dc4cf s3: Simplify tdb_data_is_cstr a bit
The original code contained rawmemchr for performance reasons. I
would expect the very common strlen routine to be not much worse
performance-wise than rawmemchr. On top, for me this patch simplifies
the expression a bit.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 14 16:55:58 CEST 2012 on sn-devel-104
2012-06-14 16:55:58 +02:00
Volker Lendecke
fc77ee5171 s3: Fix Coverity ID 242710 Untrusted pointer read
According to susv3 we have to make sure that we call isupper with
values only in the range of an unsigned char. This is best achieved
by automatic narrowing through assignment.
2012-05-15 21:37:17 +02:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
2012-01-18 14:48:04 +01:00
Michael Adam
891258cd70 s3:net registry check: replace rawmemchr by functionally equivalent portable strchr
rawmemchr is glibc only - not portable. Remarked by Ira Cooper.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  6 12:20:48 CET 2011 on sn-devel-104
2011-12-06 12:20:48 +01:00
Michael Adam
958e4f51d2 Revert "Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable."
This reverts commit 82b1702284.

This is not functionally equivalent, needs to be done differently.
2011-12-06 10:45:43 +01:00
Gregor Beck
d74b3f941f lib/util: factor out tdb_data_is_empty
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Dec  3 05:20:30 CET 2011 on sn-devel-104
2011-12-03 05:20:30 +01:00
Gregor Beck
3ab37a0d0e s3:net registry check: adapt to new semantic of dbwrap_fetch with rbt
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Nov 29 19:53:30 CET 2011 on sn-devel-104
2011-11-29 19:53:30 +01:00
Gregor Beck
bca2677afe s3:net registry check: adapt to new semantic of dbwrap_fetch
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-29 18:20:06 +01:00
Gregor Beck
bba62cdb0c s3:net registry check: handle missing version info
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-29 18:20:06 +01:00
Gregor Beck
2d9b4015d6 s3:net registry check: improve console output
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-25 13:24:34 +01:00
Jeremy Allison
82b1702284 Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov 18 23:50:50 CET 2011 on sn-devel-104
2011-11-18 23:50:50 +01:00
Björn Baumbach
bdc973b5db s3-utils: net - Fix one error/usage message
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:40 +01:00
Gregor Beck
f881d43837 s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Gregor Beck
4fe5e091e1 s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Jeremy Allison
7c663731ba Remove unused function. 2011-10-14 14:01:24 -07:00
Gregor Beck
502f0b8edc s3:net: add command registry check
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00