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

236 Commits

Author SHA1 Message Date
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
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Andrew Bartlett
4bf783d4d6 s3-auth Change type of num_sids to uint32_t
size_t is overkill here, and in struct security_token in the num_sids
is uint32_t.

This includes a change to the prototype of add_sid_to_array()
and add_sid_to_array_unique(), which has had a number of
consequnetial changes as I try to sort out all the callers using
a pointer to the number of sids.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Michael Adam
0dc3cd75a1 s3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()
Michael
2010-08-14 02:10:29 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
3b529d50be s3-rpc_misc: clean out include/rpc_misc.h.
Well known rids don't really belong into an rpc header, just use the ones
defined in security.idl.

Guenther
2010-05-18 00:44:26 +02:00
Volker Lendecke
8693ae741c s3: Fix a typo 2010-04-14 21:50:00 +02:00
Volker Lendecke
e00327323d s3: Fix some nonempty blank lines 2010-03-14 17:42:49 +01:00
Volker Lendecke
0e9844c70a s3: Fix some C++ warnings 2010-03-02 14:29:43 +01:00
Volker Lendecke
2330b625cc s3: Fix an uninitialized variable warning 2010-03-02 14:29:43 +01:00
Simo Sorce
be026a6fd8 s3:groupmap revert to tdb storage
Group mapping needs to be cluster aware, and this means using the tdb backend.
Remove ldb group mapping as this is not cluster aware.
2010-03-01 16:09:58 -05:00
Volker Lendecke
a050c79fab s3: Copy the mapping.c license header to mapping.h
We need some license header there. If this does incorrect copyright
attributions, please correct this.
2010-02-27 11:19:20 +01:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
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 f0ea0f3502)
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 a94f44c49f)
(This used to be commit 2eaf4ed622)
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 22dbe158ed)
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 f91a3e0f7b)
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 c4a137e978)
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 3130aa63fd)
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 b313acdd31)
2008-04-12 10:01:42 +02:00
Stefan Metzmacher
37fbe55eea groupdb: readd groupdb:backend parametric option
This reverts c5adb92c02.

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

metze
(This used to be commit 5f5d90ef76)
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 2be2188a97)
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 872a3d3d38)
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 dead193f46)
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 5f4de856af)
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 0d221a3f0a)
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
a114125f89 mapping_tdb: use db_open_trans()
metze
(This used to be commit 16d18df0d0)
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 d702ed73c1)
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 235c056a0e)
2008-03-28 19:48:42 +01:00
Volker Lendecke
bfb001526f Fix a segfault
(This used to be commit 40d1d64c6a)
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 cdde2e4eac)
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 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