1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

99 Commits

Author SHA1 Message Date
Richard Sharpe
12df833563 Convert the few instances of int32 there were to int32_t.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat May 16 03:09:12 CEST 2015 on sn-devel-104
2015-05-16 03:09:12 +02:00
Richard Sharpe
57303c30b2 Change all uint32/16/8 to 32_t/16_t/8_t in winbindd.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-29 23:42:20 +02:00
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
Rusty Russell
1acf548eb7 dbwrap: remove get_flags().
The flags returned were TDB-specific: this was only used for detecting
the endianness of obsolete databases (the conversion code was put in in
2003, with reference to Samba 2.3).

It's easier to remove it than to translate the NTDB flags to TDB flags,
and it's a really weird thing to ask for anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-22 07:35:17 +02:00
Rusty Russell
6244f668a3 TDB2: make SAMBA use tdb1 again for the moment.
Otherwise the following surgery will break the SAMBA build and testsuite.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19 05:38:05 +02: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
749314fcf9 dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Volker Lendecke
737c0a5473 dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Christian Ambach
0e06d944bc s3:winbindd/idmap_tdb: use idmap_tdb_common code 2012-05-01 09:32:11 +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
6760011761 s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
for consistency and better error propagation

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11 15:51:00 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
ba88e4e0d8 s3:idmap_tdb: fix hwm-handling to use uint32 consistently
The initialization code user int32, later writes used uint32...
2011-10-11 14:17:58 +02:00
Michael Adam
3d52de343a s3:idmap: convert idmap_tdb to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Rusty Russell
42506c4a3e 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>
2011-06-20 11:18:35 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Volker Lendecke
8cd262240e s3: Fix Coverity ID 2296: UNUSED_VALUE
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 12:12:35 CEST 2011 on sn-devel-104
2011-03-27 12:12:35 +02:00
Michael Adam
82853a613b s3:idmap: remove the params argument from the init function 2011-03-22 22:49:56 +01:00
Volker Lendecke
233c8bca3b s3: Remove close_fn from idmap_methods
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 13:37:13 CET 2011 on sn-devel-104
2011-03-06 13:37:13 +01:00
Volker Lendecke
6e5726310f s3-idmap-tdb: private_data is a talloc child of dom 2011-03-06 12:51:02 +01:00
Volker Lendecke
32731db56f s3: Fix some nonempty blank lines 2011-02-27 19:27:44 +01:00
Volker Lendecke
4622f2e926 s3: Fix a typo in a DEBUG msg
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  2 13:13:39 UTC 2010 on sn-devel-104
2010-11-02 13:13:39 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
28ba023b4c s3-idmap: fix uninitialized variable in idmap_tdb_sids_to_unixids_action().
Michael, please check.

Guenther
2010-08-19 14:08:06 +02:00
Michael Adam
6659ac11de s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
5a82cffb8b s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db 2010-08-14 02:10:57 +02:00
Michael Adam
5bb5b69b0f s3:idmap_tdb: add my (C) 2010-08-14 02:10:52 +02:00
Michael Adam
78979c6420 s3:idmap_tdb: properly initialize the idmap_tdb context with zero 2010-08-14 02:10:52 +02:00
Michael Adam
9c3d4dff82 s3:idmap_tdb: prevent opening the idmap db more than once. 2010-08-14 02:10:52 +02:00
Michael Adam
66a38d8612 s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids. 2010-08-14 02:10:52 +02:00
Michael Adam
4f2bb1a259 s3:idmap_tdb: add a idmap_tdb_new_mapping().
High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend. To be called inside a transaction to guarantee
atomicity of the operation.
2010-08-14 02:10:51 +02:00
Michael Adam
47387b3ebb s3:idmap_tdb: move the set_mapping code up 2010-08-14 02:10:51 +02:00
Michael Adam
2b2a8f9b3b s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping(). 2010-08-14 02:10:51 +02:00
Michael Adam
b0615e4757 s3:idmap_tdb: remove unused struct idmap_tdb_state. 2010-08-14 02:10:51 +02:00
Michael Adam
28535349bd s3:idmap_tdb: remove unused idmap_alloc_db 2010-08-14 02:10:51 +02:00
Michael Adam
9010194972 s3:idmap_tdb: remove unused idmap_tdb_alloc_close(). 2010-08-14 02:10:51 +02:00
Michael Adam
2e4a0382f5 s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
instead of alloc_db
2010-08-14 02:10:50 +02:00
Michael Adam
4301a81c99 s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db(). 2010-08-14 02:10:50 +02:00
Michael Adam
1039506493 s3:idmap_tdb: move idmap_tdb_init_hwm up. 2010-08-14 02:10:50 +02:00
Michael Adam
f739ccb1b9 s3:idmap_tdb: remove unused idmap_tdb_load_ranges()
The idmap_tdb_state (which should actually be called idmap_tdb_alloc_context)
is being removed since the alloc part is combined with the id mapping part.
2010-08-14 02:10:50 +02:00
Michael Adam
b1285a5cb3 s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
the other arguments are not needed any more and are removed.
2010-08-14 02:10:49 +02:00