1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

21 Commits

Author SHA1 Message Date
Volker Lendecke
3fa69438b9 Convert response.extra_data.data from malloc to talloc 2009-05-12 18:02:00 +02:00
Dan Sledz
aed8e9aa0a s3: Implement wbcGetpwsid
* Adds the plumbing required to lookup users by sid into winbind, wbinfo
  and smbd helper lib (winbind_util.c).
* Removes some double declarations of winbind_util.c functions.
* Bumps the winbind protocol version to 21 and the minor version of
  wbclient to 3.
2009-02-11 19:39:15 -08:00
Michael Adam
ecc53d0312 Revert "s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary."
This reverts commit 487f5e7b4768cfe9e511b0ba56f16c411e21f702.

I was confused about the real meaning of find_domain_from_name_noinit()
vs. find_domain_from_name(). We don't need the connection established
here, just the domain struct which gets initialized by rescan_trusted_domains().

Sorry for the noise.

Michael
2009-02-09 23:30:42 +01:00
Michael Adam
487f5e7b47 s3:winbindd_user: create domain connection in winbindd_fill_pwent if necessary.
Calling find_domain_from_name_noinit() might not be enough here.
This makes winbindd_getpwent() behave the same as winbindd_getgrent().

Michael
2009-02-09 14:05:42 +01:00
Michael Adam
a63f602473 s3:winbindd_user: fix a debug message.
find_domain_from_name_noinit() is no longer called only for
name alias support.

Michael
2009-02-09 14:03:52 +01:00
Volker Lendecke
4e79ca6161 Fix coverity ID 876 (FORWARD_NULL)
Michael, please check!
2009-02-07 11:10:10 +01:00
Tim Prouty
10e9e95ce8 s3 build: Fix "assignment discards qualifiers from pointer target type" warnings 2009-02-02 00:03:09 -08:00
Michael Adam
a0d0519200 s3:winbind_user: fix "getent passwd" to allocate new uids.
"getent passwd" used to fill the idmap cache with negative
cache entries for unmapped user sids.

Don't pass domain name unconditionally to idmap_sid_to_[ug]id().
idmap_sid_to_[ug]id() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_[ug]id()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_[ug]id request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael
2009-02-02 00:53:05 +01:00
Michael Adam
8c57f34b99 s3:winbind_user: move initialization of domain up in winbindd_fill_pwent()
and streamline logic some

Michael
2009-02-02 00:53:04 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Michael Adam
95b4baf5ad s3:winbindd: don't open a new dc connection in winbindd_getpwnam (main winbindd)
This is just to find the corresponding domain struct.
Actual connection is handled by the domain child.

Michael
2008-12-04 13:39:05 +01:00
Gerald (Jerry) Carter
544cd1b4b9 winbindd: Update the calls to ws_name_XX() to reflect API changes.
* Ensures that all points an which a name is received or returned
  to/from a client passes through the name aliases layer (users
  and groups).
2008-09-16 10:27:59 -07:00
Volker Lendecke
340ab6a256 idmap rewrite
(This used to be commit 30a180f2fce8cf6a3e5548f6bba453272ba70b33)
2008-08-12 11:28:29 +02:00
Volker Lendecke
0fdffbc959 Fix an incompatible pointer warning
(cherry picked from commit 3282f7289b7b33beeaa1ca649651cca6537a69af)
(This used to be commit fc8641443951dc852dc9cf1e73626df452b815f7)
2008-07-25 23:35:00 +02:00
Simo Sorce
fae6a4e79b Clean up the rest of the file too
(This used to be commit f6c92c4759096f839e3854a1e9eea56e6eecad4d)
2008-07-06 12:27:34 -04:00
Simo Sorce
632e42e165 More clean up, indentation and trailing space removal
(This used to be commit d17d401603c1c26a5fd5eca5ece245790445e6d4)
2008-07-06 12:17:22 -04:00
Simo Sorce
d0a71a00bb Make code more readable, fix indentation and traling spaces.
(This used to be commit e19e12d5cbba28ccf682eaf0ff26909bd7e8e6c6)
2008-07-06 12:03:35 -04:00
Jeremy Allison
120c09b125 From Steve Danneman @ Isilon.
Attached is the companion patch to
(037b9689d9042a398cb91e4628a82fcdfa913c21), which
made handling of WINBINDD_LIST_GROUPS asynchronous.

Because most all of the list_groups code was reusable, I abstracted it,
and implemented both list_groups and list_users on top of it.

On my large test domain a "wbinfo -u" call went from 70 seconds to 30
seconds with this patch.  Plus, the parent process is no longer blocked
from receiving new requests during that time.

Steven Danneman | Software Development Engineer
Isilon Systems    P +1-206-315-7500     F +1-206-315-7501
www.isilon.com
(This used to be commit 5188f2861137ff06d5399561d55d7d00c3a08644)
2008-06-26 14:02:39 -07: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
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
Stefan Metzmacher
28aa4bff8d r25154: move winbindd code into winbindd/
metze
(This used to be commit 3ac7566ae14c48ff9b0f6b232e0ec4b2f73df558)
2007-10-10 12:30:46 -05:00