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

189 Commits

Author SHA1 Message Date
Michael Adam
aaa5971315 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
(This used to be commit d4be4e30cd)
2008-03-25 15:55:34 +01:00
Volker Lendecke
27c07c9861 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.
(This used to be commit 8e0fa453a3)
2008-03-11 17:21:28 +01:00
Volker Lendecke
0e5d6c0d27 Clean up add_mapping_entry slightly
(This used to be commit 38bb69cb31)
2008-03-11 17:09:20 +01:00
Volker Lendecke
41bea30dd8 Cleanup after pstring removal
(This used to be commit 66d2a9c874)
2008-03-11 17:09:19 +01:00
Jeremy Allison
ddabc2b00c Fix "status used uninitialized" warnings.
Jeremy.
(This used to be commit e57856fff2)
2008-01-15 15:09:13 -08:00
Michael Adam
f3603d5a5a Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
Michael
(This used to be commit 6b2b9a60ef)
2008-01-09 01:47:10 +01:00
Michael Adam
f168fac54c Don't leak data.dptr on error path.
Michael
(This used to be commit d14de0692c)
2008-01-09 01:47:10 +01:00
Michael Adam
286b050e15 Fix flags in call of lookup_name() in pdb_default_create_alias().
Use new flag LOOKUP_NAME_LOCAL.

Michael
(This used to be commit 280d6cb6c8)
2007-12-17 13:05:45 +01:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Volker Lendecke
14ef4cdec1 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.
(This used to be commit c7c885078b)
2007-12-15 22:09:37 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Volker Lendecke
43473c8ded Fix a segfault
sid_to_string still expects a fstring
(This used to be commit 1f352cdd19)
2007-12-15 09:13:56 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
e2eaf24f7b Remove all pstring from groupdb/
Jeremy.
(This used to be commit 6959c5c7e3)
2007-11-13 15:00:48 -08:00
Gerald (Jerry) Carter
88ee61625a 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
(This used to be commit d6cdbfd875)
2007-11-01 15:53:44 -04:00
Stefan Metzmacher
cd8a2b5ffe [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 26d8a1ad20)
(This used to be commit a128a8805e)
2007-10-24 15:36:53 +02:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald Carter
5335a5d0c4 r25405: Fix formatting as per metze's comments
(This used to be commit 45fa393358)
2007-10-10 12:31:03 -05:00
Gerald Carter
1f4e302dc2 r25393: Removed unused variable
(This used to be commit 11894a62e3)
2007-10-10 12:31:01 -05:00
Gerald Carter
d7a4d51ead r25380: Remove the groupdb:mapping parameter as discussed in the following thread:
http://lists.samba.org/archive/samba-technical/2007-June/053747.html
(This used to be commit c5adb92c02)
2007-10-10 12:31:01 -05:00
Volker Lendecke
56a029258f 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.
(This used to be commit bc8b74dbfe)
2007-10-10 12:30:35 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
2007-10-10 12:23:23 -05:00
Andrew Tridgell
422722aad2 r23367: check the "use mmap" option for ldb too
(This used to be commit 15345bbc73)
2007-10-10 12:23:10 -05:00
Andrew Tridgell
248a82c0f2 r23323: merged ldb changes from 3.0.26
(This used to be commit 7c9a5c2a3f)
2007-10-10 12:23:06 -05:00
Volker Lendecke
1cb8a948b3 r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup"
(This used to be commit 55e2f35fad)
2007-10-10 12:21:57 -05:00
Volker Lendecke
9e30a76c04 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 :-)
(This used to be commit 590d2164b3)
2007-10-10 12:21:57 -05:00
Volker Lendecke
2724ce625c r22554: Fix an assumption that TALLOC_ARRAY(.., 0) != NULL.
Volker
(This used to be commit 1f15a8f371)
2007-10-10 12:19:44 -05:00
Gerald Carter
0ecd719499 r22509: Fix some memory corruption caused by calling free()
on talloc()'d memory when adding/removing members
from Local Groups.
(This used to be commit bade93ef9d)
2007-10-10 12:19:41 -05:00
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
38afa75965 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
(This used to be commit 2f2e9a7083)
2007-10-10 12:18:54 -05:00
Jeremy Allison
63609fbb04 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.
(This used to be commit 0ffca7559e)
2007-10-10 12:16:24 -05:00
Volker Lendecke
78a0932145 r19927: Fix klokwork ID 4702
(This used to be commit 820a64af25)
2007-10-10 12:16:10 -05:00
Simo Sorce
2c14cf3b2b 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.
(This used to be commit 7c0ea791d2)
2007-10-10 12:15:40 -05:00
Volker Lendecke
638a16900c r19073: mapping_dn can fail
(This used to be commit d234f39c79)
2007-10-10 12:15:08 -05:00
Andrew Tridgell
afbc8a1faa 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'
(This used to be commit a8d398edf0)
2007-10-10 12:14:48 -05:00
Andrew Tridgell
cda3a18f23 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 :-)
(This used to be commit 7f1f5d6056)
2007-10-10 12:14:46 -05:00
Volker Lendecke
6f3c6a46f9 r18875: The comment field can be empty
(This used to be commit 6d5d7bf4bb)
2007-10-10 12:14:40 -05:00
Andrew Tridgell
7c5f1f28db r18870: - enable the ldb ldap backend properly based on configure tests for
ldap

- use ldb_global_init() instead of the backend specific
  ldb_tdb_init().
(This used to be commit a6c53e5861)
2007-10-10 12:14:40 -05:00
Andrew Tridgell
3cf367f0e7 r18868: just in case there is a disaster (with our code? never ...) use a
rename to group_mapping.tdb.upgraded rather than an unlink when
upgrading. So if we absolutely have to go back to the tdb, we can
change mapping_ldb.o to mapping_tdb.o in Makefile.in and recover
peoples group mappings.

We could go one step futher and make the backend configurable. Any
opinions on that?
(This used to be commit 203fc0b03c)
2007-10-10 12:14:39 -05:00
Andrew Tridgell
8761f5dcc4 r18867: change the group mapping code to use ldb instead of tdb
See the discussion of this on the samba-technical list
(This used to be commit 4ad1436cea)
2007-10-10 12:14:39 -05:00
Günther Deschner
a3e1f7e44d r18703: Fix the annoying effect that happens when nscd is running:
We usually do not get the results from user/group script modifications
immediately. A lot of users do add nscd restart/refresh commands into
their scripts to workaround that while we could flush the nscd caches
directly using libnscd.

Guenther
(This used to be commit 7db6ce295a)
2007-10-10 12:00:49 -05:00
Gerald Carter
2b27c93a9a r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
(This used to be commit 3da9f80c28)
2007-10-10 11:51:18 -05:00
Gerald Carter
c9f9c65050 r17669: Remove RID algorithm support from unmapped users and groups
when using smbpasswd
(This used to be commit dde552336c)
2007-10-10 11:38:45 -05:00
Volker Lendecke
03e3cd1d5a r17554: Cleanup
(This used to be commit 761cbd52f0)
2007-10-10 11:38:38 -05:00
Volker Lendecke
0c53b0ab72 r17550: Fix a few bugs in the tdb_multikey code. Thanks to tridge for pointing them
out.

Volker
(This used to be commit 6bf5e7080a)
2007-10-10 11:38:38 -05:00
Volker Lendecke
108009f268 r17470: This is the group mapping rewrite announced a few days ago. I'm afraid it's
more than 1000 lines of patch, but doing it in smaller pieces is hardly
possible.

Anybody interested please look over this. The patch is not really interesting,
just look at the new groupdb/mapping.c file.

Jerry, one entry for the 3.0.24 release notes: smbd will refuse to start if we
have overlapping mappings in group_mapping.tdb. With the old db a unix gid can
be mapped to two different SIDs. This will be refused with the new code.

Volker
(This used to be commit f0f0e893ca)
2007-10-10 11:38:36 -05:00
Volker Lendecke
76362d0d33 r17468: To minimize the diff later on, pre-commit some changes independently: Change
internal mapping.c functions to return NTSTATUS instead of BOOL.

Volker
(This used to be commit 4ebfc30a28)
2007-10-10 11:38:36 -05:00
Volker Lendecke
d802774e02 r17465: Get rid of add_initial_entry. In the two places it was called in it seemed a
bit pointless to me.

Volker
(This used to be commit 244b25ae49)
2007-10-10 11:38:36 -05:00