1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

116 Commits

Author SHA1 Message Date
Michael Adam
0a3627d249 s3:idmap: remove the special treatment of the default domain "*" from idmap_init_domain 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
Michael Adam
5f969d7a94 s3:winbindd/idmap.c: add my C 2011-01-03 08:34:04 +01:00
Jeremy Allison
3a5f03015b Second part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
Ensure we return after calling passdb for SID lookups for which we are
authoritative.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Nov  8 22:24:34 UTC 2010 on sn-devel-104
2010-11-08 22:24:34 +00:00
Jeremy Allison
42f9ae8756 First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
Ensure idmap_init_passdb_domain() correctly initialized the default
domain first.

Jeremy.
2010-11-08 13:38:13 -08:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Michael Adam
60eae5a134 s3:idmap: fix sid_to_unixid for builtin and own domain.
The old idmap code created a new mapping if asking the backends failed.
Now with the new layering, if passdb (which is used for our own domain
and builtin), then we need to continue and ask the backends, giving
tdb or whatever the default backend is a chance to create a mapping.
2010-08-14 02:10:57 +02:00
Michael Adam
9f60eb8c1b s3:idmap: fix spacing/indentation 2010-08-14 02:10:57 +02:00
Michael Adam
212627e9c0 s3:idmap: don't check range for passdb idmap domain 2010-08-14 02:10:42 +02:00
Michael Adam
24ff45ff4d s3:idmap: parse ranges and "read only" in idmap_init_domain(). 2010-08-14 02:10:42 +02:00
Michael Adam
3a2487e66b s3:idmap: remove idmap_alloc_context from idmap.c
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.
2010-08-14 02:10:40 +02:00
Michael Adam
12a0ab3c96 s3:idmap: remove the alloc methods list from idmap.c
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.
2010-08-14 02:10:39 +02:00
Michael Adam
a423f5151d s3:idmap: remove unused get_alloc_methods(). 2010-08-14 02:10:39 +02:00
Michael Adam
75a6c24459 s3:idmap: remove unused smb_register_idmap_alloc().
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.
2010-08-14 02:10:39 +02:00
Michael Adam
fe8b1588b4 s3:idmap: remove unused idmap_alloc_init(). 2010-08-14 02:10:37 +02:00
Michael Adam
212468bc6e s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
The idmap alloc methods are being removed.
2010-08-14 02:10:37 +02:00
Michael Adam
0d369271c5 s3:idmap: factor out common code of idmap_allocate_uid|gid()
into new idmap_allocate_unixid().
2010-08-14 02:10:37 +02:00
Michael Adam
95617a03db s3:idmap: remove idmap_new_mapping() - now implemented in the backends 2010-08-14 02:10:36 +02:00
Michael Adam
d888e726a9 s3:idmap: remove unused idmap_remove_mapping().
Michael
2010-08-14 02:10:34 +02:00
Michael Adam
6740c180e6 s3:idmap: remove unused idmap_set_mapping().
Michael
2010-08-14 02:10:34 +02:00
Michael Adam
806e006288 s3:idmap: remove unused idmap_set_gid_hwm()
Michael
2010-08-14 02:10:32 +02:00
Michael Adam
002fe91768 s3:idmap: remove unused idmap_set_uid_hwm()
Michael
2010-08-14 02:10:32 +02:00
Stefan Metzmacher
3f14d03adb s3:winbindd: make sure we only call static_init_idmap once
metze

Signed-off-by: Michael Adam <obnox@samba.org>
2010-06-01 10:33:13 +02:00
Andrew Bartlett
e67b0cf603 s3:winbind Ensure we always init idmap_passdb before we use it
It seems that it is possible for idmap_init_passdb_domain() to be run
before idmap_init_domain(), so ensure we run the static init functions
in both.

Andrew Bartlett

Signed-off-by: Michael Adam <obnox@samba.org>
2010-06-01 10:33:13 +02:00
Michael Adam
3fe9859342 s3:idmap: fix a comment typo
Michael
2009-05-27 19:32:46 +02:00
Günther Deschner
67588ca80d s3-idmap: Fix bug #6286: Call init function for builtin idmap modules before probing for them as shared modules.
idmap-gurus of the world, please check.

Guenther
2009-04-24 10:02:06 +02:00
Volker Lendecke
76d53e7648 Alternative fix for 45db33e73 and 0d443ae7931
Simo is right, we need to ask passdb first. At least this fixes a nasty to find
NT_STATUS_ACCESS_DENIED problem in the build farm for the test run I just did
on host "opi".

Michael, can you re-check if this also fixes the error you found, leading to
the two fixes?

Thanks,

Volker
2009-01-02 15:00:05 +01:00
Volker Lendecke
13248e8917 Revert "s:Fix uid_to_sid mapping when the idmap cache is empty."
This reverts commit 9a9b64dbdf.
2009-01-02 15:00:05 +01:00
Volker Lendecke
c033ea5626 Revert "s3:idmap: Remove passd check from idmap_backends_unixid_to_sid()."
This reverts commit 45db33e732.
2009-01-02 15:00:05 +01:00
Michael Adam
45db33e732 s3:idmap: Remove passd check from idmap_backends_unixid_to_sid().
As noted by Metzy, it makes no sense here to check id->sid.
What is worse, this might even be passed in uninitialized.

This still fixes the bug for me (of course), but we might need
to check, if another special handling of passdb is needed
(possibly changing from constant return code NT_STATUS_OK...)

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
2008-12-25 12:14:03 +01:00
Michael Adam
9a9b64dbdf s:Fix uid_to_sid mapping when the idmap cache is empty.
This failed for backends other than passed, since
idmap_backends_unixid_to_sid() always asked passdb first,
which returned Success no matter whether a mapping was
found or not.

One effect wast that getpwuid failed after "net cache flush".
Only after filling the cache with a getpwnam call it succeeded.

This fix makes the behaviour of idmap_backends_unixid_to_sid()
exactly the same as that of idmap_backends_sid_to_unixid()

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
2008-12-25 12:14:02 +01:00
Michael Adam
11d5b1a21a s3:winbindd/idmap: add diagnostic entry debug msg to idmap_backends_sid_to_unixid
Michael
2008-12-01 04:37:21 +01:00
Michael Adam
7b4e54359f s3:winbindd/idmap: add diagnostic entry debug msg to idmap_backends_unixid_to_sid
Michael
2008-12-01 04:37:21 +01:00
Michael Adam
5f5fa28c5d s3:winbindd/idmap: add diagnostic entry debug msg to idmap_find_domain().
Michael
2008-12-01 04:37:21 +01:00
Steven Danneman
00c6271d5c Added ability to remove id mappings in wbinfo and libwbclient.
The idmap_tdb backend already provides an interface to remove existing id
mappings.  This commit plumbs that ability up through, winbindd, libwbclient,
and wbinfo.

Added new winbindd command:
        WINBINDD_REMOVE_MAPPING
Added new libwbclient interfaces:
        wbcRemoveUidMapping() and wbcRemoveGidMapping()
Added new wbinfo options:
        --remove-uid-mapping
        --remove-gid-mapping

Increased libwbclient version to 0.2
Increased winbind interface version to 20
2008-11-18 16:04:04 -08:00
Herb Lewis
24992010cb get rid of unneeded argument in get_methods and get_alloc_methods
(This used to be commit 07b0323472)
2008-09-04 14:35:27 -07:00
Michael Adam
620d873183 idmap tdb2: fix inconsistent mappings by checking for race and retrying to fetch mapping.
Michael
(This used to be commit cb4c74c9c2)
2008-08-13 11:54:08 +02:00
Volker Lendecke
18bc97287c Some doxygen comments for idmap
(This used to be commit adecc6d913)
2008-08-12 11:28:29 +02:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fc)
2008-08-12 11:28:29 +02:00
Volker Lendecke
8d4bd2d960 Remove the multi-ID lookup code and the 3.2.0 version of idmap_cache
(This used to be commit 1bd98521dc)
2008-08-12 11:28:29 +02:00
Volker Lendecke
0c1e27abf6 Directly call backends from idmap_[ugs]_to_[ugs]id
(This used to be commit f955407042)
2008-08-12 11:28:28 +02:00
Simo Sorce
9669411d1e Fix regression introduced with 4086ef15b3
We must not return an error here just because we are offline.
We must instead fix the mappings to the best of our knowledge
(ie mark as mapped, expired ones, and as unmapped, unknown ones)
(This used to be commit 4436272dd4)
2008-07-12 21:42:23 -04:00
Simo Sorce
8812606c43 Remove one nested level by reversing if condition
(This used to be commit 657a2f20dd)
2008-07-12 21:41:55 -04:00
Simo Sorce
eda1a267e1 Add back mem leak fixes
(This used to be commit 2adea093c5)
2008-07-12 21:40:33 -04:00
Simo Sorce
02e592486f Make again idmap_init static
(This used to be commit e113b7c13f)
2008-07-12 21:40:28 -04:00
Volker Lendecke
343c7ff3d2 Revert "Fix two memory leaks in an error path in idmap.c"
This reverts commit 7cec389e19.
(This used to be commit d0b34cbb4e)
2008-07-11 17:53:26 +02:00
Volker Lendecke
622d36aa41 Revert "Make idmap_init() static"
This reverts commit c8d1bbfddc.
(This used to be commit 5cded3da00)
2008-07-11 17:53:26 +02:00
Volker Lendecke
b6dcc24987 Revert "Convert idmap_cache to gencache"
This reverts commit 0bf0434f22.
(This used to be commit cc53667773)
2008-07-11 17:53:24 +02:00
Volker Lendecke
ebb2d70a60 Revert "Make use of ADD_TO_ARRAY"
This reverts commit 81f334bd6d.
(This used to be commit d4d106776a)
2008-07-11 17:53:24 +02:00
Volker Lendecke
ca34287063 Make use of ADD_TO_ARRAY
(This used to be commit 81f334bd6d)
2008-07-05 12:19:13 +02:00
Volker Lendecke
0234276af8 Convert idmap_cache to gencache
(This used to be commit 0bf0434f22)
2008-07-05 12:19:13 +02:00
Volker Lendecke
1999791b7c Make idmap_init() static
This is called only from idmap_alloc_init, which feels kindof weird.

Digging deeper in the code...
(This used to be commit c8d1bbfddc)
2008-07-02 13:34:09 +02:00
Volker Lendecke
ab57861686 Fix two memory leaks in an error path in idmap.c
(This used to be commit 7cec389e19)
2008-07-02 13:34:09 +02:00
Karolin Seeger
a7cf0bd32a idmap: Fix typos in comments.
Karolin
(This used to be commit 94a4d7fa32)
2008-06-17 10:30:19 +02:00
Karolin Seeger
98ed31a107 Fix typo.
arguements -> arguments

Karolin
(This used to be commit 16b5b772d2)
2008-06-17 09:46:17 +02:00
Simo Sorce
a123abdb91 Fix trusted users on a DC that uses the old idmap syntax. There was no default backend therefore on IDs were mapped by default.
(This used to be commit f6069126e5)
2008-04-03 00:26:35 +02: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
Stefan Metzmacher
38f8d32d10 winbindd: remove unused WINBINDD_DUMP_MAPS support
Also the design of this function was really bad,
instead do the dump into a file, the client should get
back the list of mappings.

metze
(This used to be commit ce7fe8acf4)
2007-12-12 10:07:05 +01:00
Stefan Metzmacher
92482e5667 idmap: add a const to idmap_dump_maps()
metze
(This used to be commit de31913f0a)
2007-12-11 12:56:23 +01:00
Jeremy Allison
7faee02d0d Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
(This used to be commit 52dc5eaef2)
2007-12-10 11:30:37 -08:00
Michael Adam
bf13b9f180 Fix a debug message (missing newline).
Michael
(This used to be commit 2a1755327f)
2007-12-05 17:14:55 +01:00
Gerald (Jerry) Carter
2545457268 Prevent segv in winbindd running on a DC using the "idmap backend" syntax.
The number of domains should be counted as they are added and not assumed
to match the loop counter.

manually cherry-picked 8ad2826c48
(This used to be commit 99b75cada2)
2007-11-20 13:27:14 -06:00
Volker Lendecke
8f391ae471 Fix an incompatible pointer type warning
(This used to be commit 3c50caa962)
2007-10-19 16:46:13 -05: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
Simo Sorce
b111d543a5 Fix default domains support using compat syntax.
Without this fix idmap_rid can't be used with the compatible syntax.
Includes fix to keep trusted domains working
(This used to be commit 8c770c367c)
2007-10-16 14:16:03 -04:00
Stefan Metzmacher
28aa4bff8d r25154: move winbindd code into winbindd/
metze
(This used to be commit 3ac7566ae1)
2007-10-10 12:30:46 -05:00