1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

222 Commits

Author SHA1 Message Date
Volker Lendecke
a51e6ce43c Pass a talloc_ctx to pdb_enum_aliasmem 2009-06-08 21:14:10 +02:00
Günther Deschner
f5e9e1954c s3-groupdb: fix enum_aliasmem in ldb branch.
It is totally valid to have an alias with no members.

Tridge, please check.

Found by RPC-SAMR torture test.

Guenther
2009-06-07 11:25:21 +02:00
Jeremy Allison
53de3b136e Don't steal when we know the ptr will be null. Thanks to Simo for
pointing this out.
Jeremy.
2009-05-21 18:48:17 -07:00
Jeremy Allison
5dd82fb675 Revert the last two commits (fix for #6386). The actual problem
was a bug in ldb in 3.2 which could return a freed pointer on
ret != LDAP_SUCCESS. The main thing we must ensure is that we
never talloc_steal until we know LDAP_SUCCESS was returned.
Jeremy.
2009-05-21 18:37:36 -07:00
Jeremy Allison
87504b27d8 Ensure all possible uses of indirection through res are checked after
an ldb_search.
Jeremy.
2009-05-21 18:00:54 -07:00
Jeremy Allison
d4d06a4ef9 Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Don't indirect a potentially null pointer.
Jeremy.
2009-05-21 17:27:25 -07:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Jelmer Vernooij
b6981e79df samba3/ldb: Update the ldb_dn API to match that of the Samba 4 LDB:
* ldb_dn_new() now takes an initial DN string
 * ldb_dn_string_compose() -> ldb_dn_new_fmt()
 * dummy ldb_dn_validate(), since LDB DNs in the current implementation
   are always valid if they could be created.
2009-04-23 18:27:32 +02:00
Jelmer Vernooij
9b64073cf7 ldb/samba3: Support event context argument to ldb_init().
This argument is ignored (Samba3's LDB is synchronous) but having it
there is useful for API compatibility with the LDB used by Samba 4 and
available on some systems.
2009-04-23 18:27:31 +02:00
Volker Lendecke
ca701cfd52 Fix a couple of memleaks in mapping_ldb.c 2009-02-07 19:25:34 +01:00
Jelmer Vernooij
f3ecb70133 Replace ldb_search() with ldb_search_exp_fmt(), like in Samba 4. 2009-01-21 16:15:53 +01:00
Jelmer Vernooij
47951fc5d0 Reorder arguments to ldb_search() to match what is in Samba 4. 2009-01-21 15:18:05 +01:00
Volker Lendecke
37f4c70920 Ignore 3.0 style invalid group mappings during upgrade to ldb 2008-11-04 10:56:24 +01:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Stefan Metzmacher
0ee4d20adb s3:mapping_tdb: fix the del_aliasmem() function
We should not cancel the transaction, when we want to delete a key.

metze
2008-09-29 16:36:10 +02:00
Jeremy Allison
e588f0bc36 Be explicit about setting perms for the ldb. Helps others who may use this api.
Jeremy.
(This used to be commit f0ea0f3502037db878238942ee0729f6940e0b01)
2008-08-27 11:28:18 -07:00
Andrew Tridgell
9a89e30229 ldb: Fix permissions of group_mapping.ldb.
This one fixes bug #5715 and CVE-2008-3789.
(cherry picked from commit a94f44c49f668fcf12f4566777a668043326bf97)
(This used to be commit 2eaf4ed62220246bcc1a9702166b0b4f381fdae3)
2008-08-27 12:08:39 +02:00
Andrew Tridgell
fe3dd9b3e6 fixed lots of places that paniced on a failed transaction_commit,
thinking it was a failure of a transaction cancel
(This used to be commit 22dbe158ed62ae47bbcb41bba3db345294f75437)
2008-08-13 11:54:10 +02:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-08-13 11:54:08 +02:00
Jeremy Allison
b6344d1d45 Add fix from Simo for bug #5540 - missing code to substitute
%u. Make this the same as other uses.
Jeremy.
(This used to be commit c4a137e9789b06047ce53e5828fb5e1bb76aca06)
2008-07-14 12:40:33 -07:00
Günther Deschner
968c91b883 Fix build warning.
Thanks to Thorkil Olesen.

Guenther
(This used to be commit 3130aa63fd64c08c1d8be8338d6490aeb12c234a)
2008-07-03 11:10:21 +02:00
Stefan Metzmacher
aaf61d9ae4 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
(This used to be commit b313acdd31c97d032c3890764addf66c6b9a4d89)
2008-04-12 10:01:42 +02:00
Stefan Metzmacher
37fbe55eea groupdb: readd groupdb:backend parametric option
This reverts c5adb92c020e38644baf1afc8fc570a518cd6307.

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

metze
(This used to be commit 5f5d90ef76b969ecbe564399368a7450c4e3d155)
2008-04-12 09:21:04 +02:00
Michael Adam
2478949821 mapping_tdb: fix enumeration of mappings.
db->traverse_read returns the number of traversed object on success.

Michael
(This used to be commit 2be2188a97060f04c2dea3ca9ed0fd3db0b3df7c)
2008-04-04 17:05:00 +02:00
Michael Adam
1b3f36b2b5 mapping.tdb: fix creation of entries with GROUP_PREFIX
Macro is no expanded inside literal string.

Michael
(This used to be commit 872a3d3d38287ab9cbb260d05777481d94e03539)
2008-04-04 16:47:51 +02:00
Volker Lendecke
16198dc51e Convert dbwrap_trans_delete to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit dead193f46c2b19955ab3e5ac5ba343694f4858a)
2008-04-01 14:04:22 +02:00
Volker Lendecke
fcdfff1cc8 Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 5f4de856af1abe63b13059bbe1615cb5877770d0)
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
e144a8b15f mapping_tdb: use the correct sid for the key creation
metze
(This used to be commit 0d221a3f0a948e173b22585b7833a5441d860a57)
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
a114125f89 mapping_tdb: use db_open_trans()
metze
(This used to be commit 16d18df0d069aec645c41e38e8c926ccdaac9388)
2008-04-01 14:04:21 +02:00
Volker Lendecke
04ab839170 Protect group_mapping.tdb ops with transactions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit d702ed73c1b986ded9deaa3abed92c39d71949fc)
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
e191b0edd5 mapping_ldb: fix memory leak in group enumeration
metze
(This used to be commit 235c056a0ecbb70b21a2572d42c32067dd699988)
2008-03-28 19:48:42 +01:00
Volker Lendecke
bfb001526f Fix a segfault
(This used to be commit 40d1d64c6a2ae128eb3fce0e7f5351b0c5942f30)
2008-03-28 14:12:34 +01:00
Michael Adam
f1c844c168 util_tdb: remove trivial and unused tdb_wipe().
It has been replaced by tdb_wipe_all().

Michael
(This used to be commit cdde2e4eaca51d51f036ad99d55df7bfd6535b03)
2008-03-26 11:15:03 +01:00
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 d4be4e30cd8c3bdc303da30e42280f892a45a8c9)
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 8e0fa453a3d0a2c997a935b6940796612c972708)
2008-03-11 17:21:28 +01:00
Volker Lendecke
0e5d6c0d27 Clean up add_mapping_entry slightly
(This used to be commit 38bb69cb316ba605a6d3a4454b986cb63ace3c21)
2008-03-11 17:09:20 +01:00
Volker Lendecke
41bea30dd8 Cleanup after pstring removal
(This used to be commit 66d2a9c87411be88269bbb3a4d3c0a218a55be06)
2008-03-11 17:09:19 +01:00
Jeremy Allison
ddabc2b00c Fix "status used uninitialized" warnings.
Jeremy.
(This used to be commit e57856fff2ef86481ac6770c7d010a26666d8bdd)
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 6b2b9a60ef857ec31da5fea631535205fbdede4a)
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 d14de0692c623ff07dada45a3d7bec03ceca2b7e)
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 280d6cb6c8e834ce0a08769e9187b0f40321716f)
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 eb523ba77697346a365589101aac379febecd546)
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 c7c885078be8fd3024c186044ac28275d7609679)
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 bb35e794ec129805e874ceba882bcc1e84791a09)
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 1f352cdd1976ad36484e146165df585b88ec5527)
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 ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-07 17:32:32 -08:00
Jeremy Allison
e2eaf24f7b Remove all pstring from groupdb/
Jeremy.
(This used to be commit 6959c5c7e3e95604c66788b86d5789757e18cc36)
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 d6cdbfd875bb2653e831d314726c3240beb0a96b)
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 26d8a1ad20c10da495970c584983fbd261b4946e)
(This used to be commit a128a8805e172738334ec6854548f138c335058b)
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 f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-18 17:40:25 -07:00