1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

201 Commits

Author SHA1 Message Date
Stefan Metzmacher
b313acdd31 groupdb: make mapping_tdb compatible to mapping_ldb
mapping_ldb replaces the record if it already exists.
I'm not sure if that a good thing, but for now
both backends should provide the same behavior.

metze
2008-04-12 10:01:42 +02:00
Stefan Metzmacher
5f5d90ef76 groupdb: readd groupdb:backend parametric option
This reverts c5adb92c020e38644baf1afc8fc570a518cd6307.

The reason is that ldb doesn't work for cluster setups yet.

metze
2008-04-12 09:21:04 +02:00
Michael Adam
2be2188a97 mapping_tdb: fix enumeration of mappings.
db->traverse_read returns the number of traversed object on success.

Michael
2008-04-04 17:05:00 +02:00
Michael Adam
872a3d3d38 mapping.tdb: fix creation of entries with GROUP_PREFIX
Macro is no expanded inside literal string.

Michael
2008-04-04 16:47:51 +02:00
Volker Lendecke
dead193f46 Convert dbwrap_trans_delete to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Volker Lendecke
5f4de856af Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
0d221a3f0a mapping_tdb: use the correct sid for the key creation
metze
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
16d18df0d0 mapping_tdb: use db_open_trans()
metze
2008-04-01 14:04:21 +02:00
Volker Lendecke
d702ed73c1 Protect group_mapping.tdb ops with transactions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
235c056a0e mapping_ldb: fix memory leak in group enumeration
metze
2008-03-28 19:48:42 +01:00
Volker Lendecke
40d1d64c6a Fix a segfault 2008-03-28 14:12:34 +01:00
Michael Adam
cdde2e4eac util_tdb: remove trivial and unused tdb_wipe().
It has been replaced by tdb_wipe_all().

Michael
2008-03-26 11:15:03 +01:00
Michael Adam
d4be4e30cd util_tdb: add a wrapper tdb_wipe() for traverse with tdb_traverse_delete_fn().
Replace all callers of traverse with this tdb_traverse_delete_fn() and
don't export tdb_traverse_delete_fn() anymore.

Michael
2008-03-25 15:55:34 +01:00
Volker Lendecke
8e0fa453a3 Convert mapping_tdb.c to dbwrap
I know, this is not used anymore, but until ldb knows about ctdb which is
blocked by the lack of transactions in ctdb, a tiny patch reactivating
mapping_tdb.c might be needed for cluster setups.
2008-03-11 17:21:28 +01:00
Volker Lendecke
38bb69cb31 Clean up add_mapping_entry slightly 2008-03-11 17:09:20 +01:00
Volker Lendecke
66d2a9c874 Cleanup after pstring removal 2008-03-11 17:09:19 +01:00
Jeremy Allison
e57856fff2 Fix "status used uninitialized" warnings.
Jeremy.
2008-01-15 15:09:13 -08:00
Michael Adam
6b2b9a60ef Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
Michael
2008-01-09 01:47:10 +01:00
Michael Adam
d14de0692c Don't leak data.dptr on error path.
Michael
2008-01-09 01:47:10 +01:00
Michael Adam
280d6cb6c8 Fix flags in call of lookup_name() in pdb_default_create_alias().
Use new flag LOOKUP_NAME_LOCAL.

Michael
2007-12-17 13:05:45 +01:00
Volker Lendecke
eb523ba776 s/sid_to_string/sid_to_fstring/
least surprise for callers
2007-12-15 22:47:30 +01:00
Volker Lendecke
c7c885078b Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is
still far better than a static one.
2007-12-15 22:09:37 +01:00
Volker Lendecke
bb35e794ec Replace sid_string_static by sid_string_dbg in DEBUGs 2007-12-15 22:09:36 +01:00
Volker Lendecke
1f352cdd19 Fix a segfault
sid_to_string still expects a fstring
2007-12-15 09:13:56 -08:00
Jeremy Allison
ec003f3936 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
2007-12-07 17:32:32 -08:00
Jeremy Allison
6959c5c7e3 Remove all pstring from groupdb/
Jeremy.
2007-11-13 15:00:48 -08:00
Gerald (Jerry) Carter
d6cdbfd875 Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
2007-11-01 15:53:44 -04:00
Stefan Metzmacher
a128a8805e [crash fix] don't use already free'ed memory
(found by "make valgrindtest" and my "start winbindd on make test" patch)

metze
(cherry picked from commit fe21e48489852720a05b305b251e4f5cbb200f7a)
(cherry picked from commit 26d8a1ad20c10da495970c584983fbd261b4946e)
2007-10-24 15:36:53 +02:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Gerald Carter
45fa393358 r25405: Fix formatting as per metze's comments 2007-10-10 12:31:03 -05:00
Gerald Carter
11894a62e3 r25393: Removed unused variable 2007-10-10 12:31:01 -05:00
Gerald Carter
c5adb92c02 r25380: Remove the groupdb:mapping parameter as discussed in the following thread:
http://lists.samba.org/archive/samba-technical/2007-June/053747.html
2007-10-10 12:31:01 -05:00
Volker Lendecke
bc8b74dbfe r25024: Fix a whole bunch of Coverity bugs
The callers of get_domain_group_from_sid() with some justification
expected map->gid to be initialized when get_domain_group_from_sid
returned True.
2007-10-10 12:30:35 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
James Peach
171dc060e2 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
2007-10-10 12:23:23 -05:00
Andrew Tridgell
15345bbc73 r23367: check the "use mmap" option for ldb too 2007-10-10 12:23:10 -05:00
Andrew Tridgell
7c9a5c2a3f r23323: merged ldb changes from 3.0.26 2007-10-10 12:23:06 -05:00
Volker Lendecke
55e2f35fad r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup"
2007-10-10 12:21:57 -05:00
Volker Lendecke
590d2164b3 r22786: Some cleanup by Karolin Seeger: Remove unused pdb_find_alias, and change
return values of some alias-releated pdb functions from BOOL to NTSTATUS

Thanks :-)
2007-10-10 12:21:57 -05:00
Volker Lendecke
1f15a8f371 r22554: Fix an assumption that TALLOC_ARRAY(.., 0) != NULL.
Volker
2007-10-10 12:19:44 -05:00
Gerald Carter
bade93ef9d r22509: Fix some memory corruption caused by calling free()
on talloc()'d memory when adding/removing members
from Local Groups.
2007-10-10 12:19:41 -05:00
Stefan Metzmacher
3a28443079 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
2f2e9a7083 r21974: make use of tdb_*_bystring() and string_term_tdb_data() in groupdb/
to avoid creating the TDB_DATA struct from strings "by hand"

metze
2007-10-10 12:18:54 -05:00
Jeremy Allison
0ffca7559e r20090: Fix a class of bugs found by James Peach. Ensure
we never mix malloc and talloc'ed contexts in the
add_XX_to_array() and add_XX_to_array_unique()
calls. Ensure that these calls always return
False on out of memory, True otherwise and always
check them. Ensure that the relevent parts of
the conn struct and the nt_user_tokens are
TALLOC_DESTROYED not SAFE_FREE'd.
James - this should fix your crash bug in both
branches.
Jeremy.
2007-10-10 12:16:24 -05:00
Volker Lendecke
820a64af25 r19927: Fix klokwork ID 4702 2007-10-10 12:16:10 -05:00
Simo Sorce
7c0ea791d2 r19516: Fix the DN, to make searches using the domain as base
the DN must be rid,domain and not domain,rid

Also use member and not memberOf for group members
following conventions.
2007-10-10 12:15:40 -05:00
Volker Lendecke
d234f39c79 r19073: mapping_dn can fail 2007-10-10 12:15:08 -05:00
Andrew Tridgell
a8d398edf0 r18938: fixed a group map bug reported by Jerry. The caller in mapping.c
relies on appending to this list. Unfortunately this can't be tested
using 'net groupmap'
2007-10-10 12:14:48 -05:00
Andrew Tridgell
7f1f5d6056 r18912: we don't need the special case for comments now in the
This also fixes comments in group mappings, as the code accidentially
put in "ntName" in the comment field :-)
2007-10-10 12:14:46 -05:00