1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

1664 Commits

Author SHA1 Message Date
Michael Adam
81c7d152b2 r23340: Fix typo in debug ouput. Found by Karolin Seeger <ks@sernet.de>.
Michael
2007-10-10 12:23:07 -05:00
Stefan Metzmacher
d0b7b77fc4 r23330: always include "winbind_client.h" as first header
as it brings in "replace.h" this will bring in "config.h"

metze
2007-10-10 12:23:06 -05:00
James Peach
cbd083efb9 r23312: As per Volker, rename the "windbind:ads" parameter "winbind:rpc only". 2007-10-10 12:23:05 -05:00
Volker Lendecke
1c1f710e3e r23297: This introduces the winbind:ads parameter which defaults to True. Setting it
to False makes winbind use RPC and not LDAP methods to connect to the DCs,
even when it figured out they are AD.
2007-10-10 12:23:03 -05:00
Michael Adam
7e6b0c19f8 r23291: Undo the somewhat naive change of r23279:
The clear text presentaion of the sid in the ldap expression
does work with w2k3 but not with w2k....

Thanks to Guenther for advising me of this issue.

Michael
2007-10-10 12:23:03 -05:00
Michael Adam
2190d838e4 r23290: Fix another small and stupid but severe typo.
Hopfully, I have finally got this right... :-)

Michael
2007-10-10 12:23:03 -05:00
Michael Adam
f2adae8fc1 r23287: Use talloc_move instead of talloc_steal as this is what I really
wanted to do.

Michael
2007-10-10 12:23:03 -05:00
Michael Adam
7170d2e9f5 r23284: Oh what a nasty typo! This gave me some headache,
with talloc randomly failing.

Hey, shouldn't TALLOC_ARRAY _not_ return NULL when
requested to allocate an array with zero entries? :-)

Michael
2007-10-10 12:23:02 -05:00
Michael Adam
f2a29643bd r23283: Use a temporary talloc context in ads:lookup_groupmem.
And clean up unused stuff at the end.
Daringly, I use talloc_steal at some point, where it
appears natural to me.

Michael
2007-10-10 12:23:02 -05:00
Michael Adam
ba3026dce0 r23279: Replace occurrence of sid_binstring inside lookup_groupmem
by sid_string_static.
2007-10-10 12:23:02 -05:00
Volker Lendecke
c5929aa82b r23263: Remove an unused variable -- Fix Coverity ID 358 2007-10-10 12:23:01 -05:00
Michael Adam
bd90573fbb r23253: Add some debugging output. 2007-10-10 12:23:00 -05:00
Michael Adam
5520c7d855 r23252: Complete the reworking of the ads lookup_groupmem function
started in r23070, r23072, r23073, r23078, r23081 and r23082:

After retrieving the list of sids with the extended dn
ldap query, instead of passing all sids to the lsa_lookup_sids
call, now while extracting the sids from the extended dn member
entries, we first try to lookup the sid from cache and only pass
the sids that were not in cache to the lsa_lookup_sids call.

Michael
2007-10-10 12:22:59 -05:00
Gerald Carter
bcc8a3290a r23244: Fix loop with nscd and NSS recusive calls.
> Here's the problem I hit:
>
> getgrnam("foo") -> nscd -> NSS -> winbindd ->
>   winbindd_passdb.c:nam_to_sid() -> lookup_global_sam_name() ->
>   getgrnam("foo") -> nscd -> ....
>
> This is in the SAMBA_3_0 specifically but in theory could happen
> SAMBA_3_0_25 (or 26) for an unknown group.
>
> The attached patch passes down enough state for the
> name_to_sid() call to be able to determine the originating
> winbindd cmd that came into the parent.  So we can avoid
> making more NSS calls if the original call came in trough NSS
> so we don't deadlock ?  But you should still service
> lookupname() calls which are needed for example when
> doing the token access checks for a "valid groups" from
> smb.conf.
>
> I've got this in testing now.  The problem has shown up with the
> DsProvider on OS X and with nscd on SOlaris and Linux.
2007-10-10 12:22:58 -05:00
Volker Lendecke
f5d525399b r23225: Attached find a patch that makes use of NetSamLogonEx in
winbind. With this and W2k3 DCs around it is possible to use
more than one winbind on the same machine account, because
NetSamLogonEx does not use the credentials chain.

I added the flag domain->can_do_samlogon_ex because this
only works against W2k3 and with schannel. The theory is to
try if we're AD and have schannel, and fall back to
NetSamLogon if this fails. can_do_samlogon_ex is thus a
protection against multiple failures.

Only checking into 3_0, this needs more review before going
into a production release.

Feel free to comment :-)
2007-10-10 12:22:56 -05:00
Günther Deschner
def6464c87 r23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using
netr_GetDcAnyName all the time (which is the correct thing to do).

Fix the naming and opcode mixup in all branches.

Guenther
2007-10-10 12:22:54 -05:00
Volker Lendecke
a925e0991f r23117: Factor out local messaging.
This removes message_block / message_unblock. I've talked to Jeremy and
Günther, giving them my reasons why I believe they have no effect.
Neither could come up with a counter-argument, so they go :-)
2007-10-10 12:22:47 -05:00
Volker Lendecke
a7b9581a5c r23116: Fix typo, found by Karolin Seeger 2007-10-10 12:22:47 -05:00
James Peach
f1e8de4b57 r23095: Support systems that have their PAM headers in /usr/include/pam. 2007-10-10 12:22:45 -05:00
Michael Adam
4d9e8c91dc r23078: Don't handle return code NT_STATUS_NONE_MAPPED from lookup sids
as an error. (This is purely cosmetic here, issuing a success
message at the end.)
2007-10-10 12:22:43 -05:00
Gerald Carter
86b6a41d57 r23075: more duplicate code blocks from bad merge 2007-10-10 12:22:18 -05:00
Gerald Carter
2c64638934 r23074: Remove duplicate code blocks from bad merge 2007-10-10 12:22:18 -05:00
Michael Adam
88dac65ab1 r23072: In winbindd_ads.c:lookup_groupmem, replace the bottleneck
dn_lookup loop by a rpccli_lsa_lookupsids_all (see r23070)
call. This replaces one ldap search per member sid by one
rpc call per 1000 sids. This greatly speeds up groupmem
lookups for groups with lots of users.

Since the loop in lookup_groupmem was the only use of dn_lookup,
the function is removed.

Michael
2007-10-10 12:22:18 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Gerald Carter
f53aa56998 r23054: Move the check for the lookup_domain of S-1-22-{1,2} before the
check for IS_DC.  Otherwise we will for example fail to lookup a
sid of S-1-22-1-780 because it has no valid struct winbindd_domain*
in the list.   Thanks to Simo for the catch.
2007-10-10 12:22:17 -05:00
Gerald Carter
d70cec3196 r23048: Simo is correct in that winbind_lookup{sid,name}_async() needs
to be able to handle SIDs in the S-1-22-{1,2} domain in order
for winbindd_sid_to_uid(), et. al. to succeed.  For 3.0.25a,
we will short circuit in the sid_to_uid() family of functions
so that smbd is ok.

For 3.0.26, we need to allow winbindd to handle all types of SIDs.
2007-10-10 12:22:17 -05:00
Gerald Carter
3d48a7e72d r23046: Few missing merges from cleaning out the Centeris winbindd tree.
Nothing of major interest.  Will fix a few problems with one way trusts.
2007-10-10 12:22:17 -05:00
Michael Adam
8c517f9aac r23040: Activate the winbindd cache validation code in the
winbindd main function.

I have tested and somewhat extended the code, and it seems
to do a good job. I have possibly not caught all error
conditions though.

Michael
2007-10-10 12:22:16 -05:00
Stefan Metzmacher
fb77cc7fbc r23039: merge from SAMBA_3_0_26:
use a helper function to construct the TDB_DATA key
as strlen_m() is totally wrong here anyway

metze
2007-10-10 12:22:16 -05:00
Volker Lendecke
a8082a3c7c r23015: Make message_(de)register static to messages.c 2007-10-10 12:22:15 -05:00
Volker Lendecke
caece8975b r22943: More message_register -> messaging_register 2007-10-10 12:22:10 -05:00
Volker Lendecke
330946ad23 r22908: All callers of message_init now also call messaging_init. Unify those. 2007-10-10 12:22:07 -05:00
Volker Lendecke
3fdfb5b7cd r22905: cli_send_mailslot had a message_send_pid inside 2007-10-10 12:22:06 -05:00
Günther Deschner
dcf5375aa4 r22904: Fix indent.
Guenther
2007-10-10 12:22:06 -05:00
Günther Deschner
203391623b r22903: Now that we have the on-disc trustdomaincache with type flags we can better
decide whether it's worth to register a krb5 ticket gain handler while users
logon offline.

Guenther
2007-10-10 12:22:06 -05:00
Günther Deschner
ef8f0d3504 r22901: When an AD account has UF_DONT_REQUIRE_PREAUTH set we need to fallback to ntlm
in the kerberized PAM_AUTH.

Guenther
2007-10-10 12:22:05 -05:00
Volker Lendecke
c8b9827340 r22895: Convert some more calls from message_send_buf to messaging_send_buf 2007-10-10 12:22:05 -05:00
Michael Adam
f0570dc3d9 r22855: fix the build
(#if inside DEBUG macro not allowed...)

Michael
2007-10-10 12:22:03 -05:00
Michael Adam
d909a60641 r22848: Fix brace alignment. 2007-10-10 12:22:02 -05:00
Michael Adam
9d2db8c70f r22847: The new validate_panic function calls exit (instead of setting
a global error flag an returning), so cleanups and returns
subsequent to calls of smb_panic_fn have become unnecessary.
2007-10-10 12:22:02 -05:00
Michael Adam
417325b9e6 r22845: Modified and extended the winbindd cache validation code:
* Replaced signal catching/longjmp magic by a fork:
  Let the child do the actual validation of the entries.
  Exit code and signals are intercepted by waitpid.
* Fix logic so that also encounter of an unknown key in the
  tdb leads to an error.
* Extended status of validation is kept in a (as yet simple)
  stuct and communicated over a pipe from child to parent.
* Added two validation_ functions for two new keys.

The call of winbindd_validate_cache is still commented out
in the winbindd main loop. But I am currently testing it
and so far it seems to work fine.

The next step in my plan is to generalize the validation
mechanism to a tdb_open_log_validate function in lib/util_tdb.c.
There ist nothing very special about the cache tdb here,
and this might be useful elsewhere...

Michael
2007-10-10 12:22:01 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Jeremy Allison
c0ba891be0 r22812: Fix bug #3024 (and also the group varient). Patch from
Johann Hanne <jhml@gmx.net> and also Kaya Bekiro?lu <kaya.bekiroglu@isilon.com>
Jeremy.
2007-10-10 12:22:00 -05:00
Günther Deschner
5b4a4df26f r22794: Add "debug_state" and "silent" to pam_winbind.conf template. Honor the silent
argument when parsing pam configuration file options.

Guenther
2007-10-10 12:21:57 -05:00
Simo Sorce
4fb3e0f655 r22771: One liner fix for idmap_ldap
Fixes the strange behavior we were seeing about idmap_ldap creating
a new connection for each query.

Jerry we need this in for 3.0.25
2007-10-10 12:21:56 -05:00
Volker Lendecke
a66a04e9f1 r22747: Fix some C++ warnings 2007-10-10 12:21:54 -05:00
Volker Lendecke
a99ab3a2ed r22745: Add local groups to the --required-membership-sid test. This needs
merging to 3_0_26 once Michael's net conf changes have been merged. It
depends on token_utils.c.
2007-10-10 12:21:54 -05:00
Volker Lendecke
f4f0d71377 r22744: Fix a valgrind error. parse_domain_username does not necessarily fill in
the domain.
2007-10-10 12:21:53 -05:00
Volker Lendecke
8a038b8cd3 r22738: Fix a debug message.
Günther, please check this!

Thanks,

Volker
2007-10-10 12:21:52 -05:00
Günther Deschner
08a7ee8d96 r22737: Fix crash bug (info3 is now talloced).
Guenther
2007-10-10 12:21:52 -05:00