1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

206 Commits

Author SHA1 Message Date
Michael Adam
467b8f0f4d winbindd: freeze winbindd_proto.h
Michael
2008-05-18 23:09:34 +02:00
Jeremy Allison
8d701a142b Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
CatchChild();

*before* we fork the domain child. This call establishes a signal handler that
eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon
SIGCLD handler should do. This causes the parent to ignore dead children and
time out, instead of calling winbind_child_died() on receipt of the signal. The
correct fix is to move the CatchChild call into the child code after the fork.

Jeremy.
2008-05-14 14:10:39 -07:00
Jim McDonough
0f7b11acce Enable winbind child processes to do something with signals,
in particular closing and reopening logs on SIGHUP.

Conflicts:

	source/winbindd/winbindd.c
2008-05-13 16:57:01 -04:00
coffeedude
31614cd5e0 libwbclient: Abstract the DS_XXX flags for DsGetDcName().
The wbcLookupDomainController() call supports a set of flags
defined in wbclient.h.  Add a mapping function between these
flags and the original DS_XXX flags in order to prevent having
to include the generated RPC headers in wbclient.h.
2008-05-13 12:58:52 -05:00
Günther Deschner
7889516a38 dsgetdcname: use existing messaging_context if possible.
Guenther
2008-05-09 14:59:20 +02:00
Günther Deschner
82cbb3269b Use strip_hostname after dsgetdcname/getdcname calls.
Guenther
2008-05-09 14:59:19 +02:00
Günther Deschner
fe904ee77a dsgetdcname: mailslot replies are identical to the cldap ones, use cldap everywhere.
Guenther
2008-05-09 14:59:19 +02:00
Günther Deschner
b261f06312 mailslot/cldap: use nt_version bits in queries.
Guenther
2008-05-06 09:41:41 +02:00
Gerald W. Carter
b379b5b5d8 Winbind: Prevent cycle in children list when reaping dead child processes.
Thanks to Glenn Curtis and Kyle Stemen @ Likewise.  Their explanation is:

    In winbindd_dual.c, there is a list of children processes that
    is maintained using macros DTLIST_ADD and DTLIST_REMOVE. In the
    case when a scheduled_async_request fails, the particular child
    was located in the list, and its attributes were cleared out
    and it was reused for a subsequent async request. The bug was that
    the new request would queue the same node into the doubly-linked
    list and would result in list->next pointing to the same node as
    list itself. This would set up an infinite loop in the processing of
    the for loop when the list of children was referenced.

    Solution was to fully remove the child node from the list, such that
    it could be inserted without risk of being inserted twice.

Note that the child is re-added to the list in fork_domain_child() again.
2008-04-30 10:09:43 -05:00
Günther Deschner
2b178dcae6 mailslot: allow to give back struct nbt_ntlogon_packet.
Guenther
2008-04-24 22:01:52 +02:00
Günther Deschner
ce3728191b mailslot: allow to define nt_version in send_getdc_request().
Guenther
2008-04-24 22:01:51 +02:00
Volker Lendecke
4f4781c6d1 Fix CLEAR_IF_FIRST handling of messages.tdb
We now open messages.tdb even before we do the become_daemon. become_daemon()
involves a fork and an immediate exit of the parent, thus the
parent_is_longlived argument must be set to false in this case. The parent is
not really long lived :-)
2008-04-23 22:18:26 +02:00
Gerald W. Carter
59cfba2c3d Mark a domain offline in the wbcDomainInfo structure using the domain_flags.
Use the existing domain_flags fiueld in wbcDomainInfo to set a bit if the
domain is marked as offline by Winbind.
2008-04-23 08:47:50 -05:00
Michael Adam
e489f3d988 winbindd_cache: simplify logic in new key length check for UA keys.
This reduces indentation by combining common code paths,
and wraps long lines.

Holger: sorry, I could not resist. I think it is much easier to
understand what is going on when we only have one check and
determine the max allowed key length in advance.

Michael
2008-04-23 14:55:51 +02:00
Holger Hetterich
fcd35232e1 winbindd_cache: recognize and allow longer UA keys
UA keys consist of a potientally large number of concatenated SID strings which
can grow much larger than 1024 bytes in complex environments. We catch those keys
and allow them exclusivly to be larger.
2008-04-23 13:57:14 +02:00
Volker Lendecke
5df75578ef Fix wbinfo --group-info if the winbind separator set to non \
In getgrsid_lookupsid_recv() we use parse_domain_user which itself looks at
lp_winbind_separator(). Thus when building up that group name we should better
use it as well.
2008-04-22 15:42:09 +02:00
Günther Deschner
538eefe22a cldap: avoid duplicate definitions so remove ads_cldap.h.
Guenther
2008-04-21 20:21:40 +02:00
Günther Deschner
675bf42cff winbind: pass down existing talloc context.
Guenther
2008-04-21 20:21:39 +02:00
Andrew Bartlett
87232351b5 Add in a nice big comment explaining why SamLogonEx matters.
Andrew Bartlett
2008-04-21 17:48:31 +02:00
Günther Deschner
2d6a1c5da6 winbind: Use libnbt for NTLOGON SAMLOGON mailslot request and reply.
Guenther
2008-04-21 11:03:32 +02:00
Volker Lendecke
99fc3283c4 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct 2008-04-20 14:08:16 +02:00
Volker Lendecke
2e4c1ba389 Introduce rpccli_set_timeout()
Reduce dependency on "cli" member of rpc_pipe_client struct
2008-04-20 00:14:26 +02:00
Volker Lendecke
783afab9c8 Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
2008-04-20 00:13:09 +02:00
Stefan Metzmacher
2e1b913063 winbindd: create the messaging conntext earlier
metze
2008-04-18 15:00:20 +02:00
Stefan Metzmacher
8e9fdef792 winbindd: call reinit_after_fork() in the child processes
metze
2008-04-18 15:00:20 +02:00
Günther Deschner
b003ba65e3 Move GETDC mailslot out of winbindd.
Guenther
2008-04-17 15:17:29 +02:00
Stefan Metzmacher
64450cc1e4 dbwrap: wait for tdb2 change notifies in smbd, nmbd and winbindd
metze
2008-04-12 09:14:10 +02:00
Michael Adam
641b5e3fec winbindd: only call winbindd_validate_cache when not in offline logon mode.
originally, the cache was cleared before calling validate, but
this way, we skipt the validation of the database when not in
offline logon mode.

This is put into a new wrapper function winbindd_cache_validate_and_initialize()
which is now called in winbindd.c instead calling validate and
initialize functions separately.

Michael
2008-04-10 13:23:30 +02:00
Volker Lendecke
79bc6796b8 Also accept 0x15 getdc replies
My NT4SP6 which my DC here trusts sends 0x15 instead of 0x13, from looking at
the sniff at least the DC name is at the same place.
2008-04-10 11:53:43 +02:00
Volker Lendecke
99f6b63f3c Try anonymous session setup
... if there's no trust password

Attempt to fix bug 5350
2008-04-09 10:01:53 +02:00
Michael Adam
c1b60cdecf winbindd: fix break out early condition in fill_grent_mem().
if (!&new_glist) would always be skipped, if (new_glist == NULL) is
what must have been meant...

Michael
2008-04-07 16:38:14 +02:00
Bo Yang
8671f9767d Only cache password policy results that worked, otherwise we
cannot login until the cache expires even if a connection
to a DC has been restored.
2008-04-07 09:51:42 -04:00
Günther Deschner
65b4cb20ea Use sid_array_from_info3 in lookup_usergroups_cached().
Guenther
2008-04-04 02:53:40 +02:00
Simo Sorce
f6069126e5 Fix trusted users on a DC that uses the old idmap syntax. There was no default backend therefore on IDs were mapped by default. 2008-04-03 00:26:35 +02:00
Günther Deschner
0970369ca0 Fix NETLOGON credential chain with Windows 2008 all over the place.
In order to avoid receiving NT_STATUS_DOWNGRADE_DETECTED from a w2k8
netr_ServerAuthenticate2 reply, we need to start with the AD netlogon negotiate
flags everywhere (not only when running in security=ads). Only for NT4 we need
to do a downgrade to the returned negotiate flags.

Tested with w2k8, w2ksp4, w2k3r2 and nt4sp6.

Guenther
2008-04-02 11:12:47 +02:00
Gerald W. Carter
3414eac439 Fix enumeration of forest trusts from our root domain.
Do not overwrite the domain->domain_flags when setting infomation
in set_dc_type_and_flags_connect().
2008-03-31 13:40:58 -05:00
Steven Danneman
e7827bb6af Augmented "wbinfo -m" to list additional information about the type, direction, and transitivty of trusts.
* added several helper functions to convert the trust_flags field in the
winbindd_tdc_domain to more useful administrator ideas of trust type, trust
direction, and trust transitivity.

* converted winbindd_list_trusted_domains() to enumerate the trusted domain
cache, instead of the domain list, and return additional trust information to
the calling process

* modified wbinfo to pretty print this additional trust information when a new
--verbose switch is given with -m.  Thus "wbinfo -m" and "wbinfo -all-domains"
output as before, but "wbinfo --verbose -m" prints extra trust info.

* updated some comments and fixed typos
2008-03-31 13:40:58 -05:00
Steven Danneman
6aac972d79 Forest root trust flags won't overwrite child trust flags
* changed the behavior of winbind_ads.c:trusted_domains() to not overwrite
existing trust information if we're joined to a child domain, and querying the
forest root domain.  Previously if we were joined to a child domain, we'd
request all known trust information from this child domain (our primary domain)
and store it in the tdc.  We'd then request all trust information from our tree
root (to get the forests we transitively trust) and overwrite the existing trust
information we already had from the perspective of the tree root.

* updated several comments and fixed typos
2008-03-31 13:40:58 -05:00
Michael Adam
6d3fc63bfa winbindd_cache: add missing validation function for pwinfo cache entry
Michael
2008-03-29 02:10:41 +01:00
Günther Deschner
6a576cfe9b Don't let winbind getgroups crash when we have no gids in the token.
Guenther
2008-03-29 00:47:42 +01:00
Volker Lendecke
e04fc36f22 Make some fns static 2008-03-28 13:44:30 +01:00
Günther Deschner
fed6443729 Fix typo.
Guenther
2008-03-27 18:05:02 +01:00
Gerald W. Carter
4de4949e3b Don't fill password policy structure for any domain other than our own.
The samr connects will fail.  This is not independent of the CONTACT_TRUSTDOM
flag neede by krb5 logins.
2008-03-27 11:56:29 -05:00
Volker Lendecke
0d617f639a Fix wbinfo -a trusted\\user%password on a Samba DC with trusts
Winbind can't be allowed to connect to the local smbd.
2008-03-27 13:11:10 +01:00
Günther Deschner
fa64c76ac8 Move LOGON_KRB5_FAIL_CLOCK_SKEW to winbindd_pam.
Guenther
2008-03-27 13:06:43 +01:00
Günther Deschner
2586dc34e0 Fix winbind NETLOGON cred chain on a samba dc for w2k8 trusts.
Guenther
2008-03-26 21:11:53 +01:00
Volker Lendecke
559cd9e5a7 Fix a segfault
When we get a NT_STATUS_WRONG_PASSWORD for example, my_info3 is not initialized
at all. So first check that we have NT_STATUS_IS_OK(status) before we
dereference my_info3.
2008-03-25 23:36:06 +01:00
Volker Lendecke
38683a7301 Fix typo 2008-03-25 21:35:41 +01:00
Volker Lendecke
cfceb063f5 Merge dd9e0bea31751 from 3-0-ctdb -- use NetSamLogonEx when possible
NetSamLogonEx has the advantage that it does not use the credential chain
2008-03-19 17:00:53 +01:00
Volker Lendecke
32fc759d94 Fix some "nexted extern" warnins 2008-03-19 16:23:28 +01:00