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

176 Commits

Author SHA1 Message Date
Andreas Schneider
0529b59fbe s3-winbind: Do not delete an existing valid credential cache.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9994

Thanks to David Woodhouse <dwmw2@infradead.org>.

Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul 15 12:48:46 CEST 2013 on sn-devel-104
2013-07-15 12:48:46 +02:00
Andreas Schneider
659dd65f8f winbind: Correctly use names in the domain struct.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:29:29 +01:00
Andreas Schneider
3b01dd5f59 s3:winbind: BUG 9386: Failover if netlogon pipe is not available.
Samba continues to query a broken DC while the DC did not finish to
rebuild Sysvol (after a Windows crash, for example). It causes end users
to received strange codes while trying to authenticate, even if there is
a secondary DC available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Nov 12 18:57:18 CET 2012 on sn-devel-104
2012-11-12 18:57:18 +01:00
Christof Schmitt
1bc2f28b94 winbind: Extend wbcAuthenticateUserEx to provide PAC
With this new interface, external applications that have authenticated
to an ADS can pass the PAC from the Kerberos ticket to
wbcAuthenticateUserEx. winbindd decodes and extracts the info3
information for the external application. If winbindd can verify the PAC
signature, the info3 from the PACis also added to the netsamlogon_cache.

The info3 data can be used by the external application to get the uid
and primary gid. The data in netsamlogon_cache allows to retrieve the
complete group list through the NSS function getgrouplist.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-09-20 19:49:32 -07:00
Jeremy Allison
c84e6aebc2 Fix bug #9098 - winbind does not refresh kerberos tickets.
Based on work from Ian Gordon <ian.gordon@strath.ac.uk>.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 22:01:15 CEST 2012 on sn-devel-104
2012-08-21 22:01:15 +02:00
Jeremy Allison
b70f23c2b5 Correctly check for errors in strlower_m() returns. 2012-08-09 12:08:18 -07:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Andreas Schneider
a256d61c50 s3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.
We don't resolve our own "Domain Local" groups since bug #7843 has been
fixed. So we need to add the add resource groups to the sid list too.

Before bug #7843 the "Domain Local" groups were added with a
lookupuseraliases call, but this isn't done anymore for our domain
so we need to resolve resource groups here.

When to use Resource Groups:
http://technet.microsoft.com/en-us/library/cc753670%28v=WS.10%29.aspx

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul 23 22:12:30 CEST 2012 on sn-devel-104
2012-07-23 22:12:29 +02:00
Rusty Russell
aa2e02e684 source3/winbindd/winbindd_pam.c: fix stackframe leak
check_info3_in_group() doesn't always free its stackframe.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:08:31 +09:30
Volker Lendecke
3f18316358 s3: Fix Coverity ID 2727 to 2740 -- UNINIT 2012-04-19 20:52:27 +02:00
Andrew Bartlett
0902392413 s3-winbindd Only use SamLogonEx when we can get unencrypted session keys
This ensures that we have some check on the session keys being returned
as the RC4 cipher is not checksumed.

The check comes from the fact that the credentials chain is tied to
the session key, and so if the credentials check passes then the
netlogon session key will be correct, and so the user session key
will be correctly decrypted.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Mar 19 21:31:46 CET 2012 on sn-devel-104
2012-03-19 21:31:46 +01:00
Matthieu Patou
5ebbd46b4a s3-winbindd: Close netlogon connection if the status returned by the NetrSamLogonEx call is timeout in the pam_auth_crap path
If not the child process would hang for quite a long time up to the
moment when the connection is cleaned by the kernel (took ~ 20 minutes)
in my tests.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb 27 23:10:03 CET 2012 on sn-devel-104
2012-02-27 23:10:03 +01:00
Andrew Bartlett
3ebd79a6d0 s3-winbindd: pass logon parmeters down to check_sam_security()
This allows ntlm_auth --diagnostics to work against the local DC, just
as it works against a member server.

Andrew Bartlett
2012-02-20 10:50:47 +11:00
Matthieu Patou
56d5cb9386 s3-winbind: don't try to do clever thing if the username is not found while authenticating through winbind
This could cause that we authenticate a user with a bogus domain to
winbind's domain if the password supplied for the PAM_AUTH match.

The problem was reported by Jeff Venable (jvenable@juniper.net).
Patch from Andrew Bartlett (abartlett@samba.org).

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jan 30 18:58:12 CET 2012 on sn-devel-104
2012-01-30 18:58:12 +01:00
Jeremy Allison
f30f71c14a Fix bug #8548 - winbind_samlogon_retry_loop ignores logon_parameters flags.
Fix confirmed by reporter.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 28 23:04:47 CEST 2011 on sn-devel-104
2011-10-28 23:04:47 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Andreas Schneider
7e46a84bb7 s3-auth: Pass the remote_address down to user_info.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:02 +10:00
Günther Deschner
44a434a301 s3-winbind: Fix bug 7888 -- deal with buggy 3.0 based PDCs
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Jun 30 00:42:23 CEST 2011 on sn-devel-104
2011-06-30 00:42:23 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Jim McDonough
b58534f1fc s3-winbind: BUG 8166 - Don't lockout users when offline.
Windows does not track bad password attempts when offline.  We were locking users out but not honoring the lockout duration.

Autobuild-User: Jim McDonough <jmcd@samba.org>
Autobuild-Date: Wed May 25 18:11:10 CEST 2011 on sn-devel-104
2011-05-25 18:11:10 +02:00
Jeremy Allison
f85e095dd2 More simple const fixups. 2011-05-05 23:56:08 +02:00
Jeremy Allison
017e0c8d95 Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1. 2011-05-04 12:12:13 -07:00
Günther Deschner
0bb4701a74 s3: remove various references to server side dcerpc structs (which are not needed).
Guenther
2011-05-02 15:03:44 +02:00
Stefan Metzmacher
f7bc84409a s3:rpc_client: map fault codes to NTSTATUS with dcerpc_fault_to_nt_status()
Most fault codes have a NTSTATUS representation, so use that.

This brings the fault handling in common with the source4/librpc/rpc code,
which make it possible to share more highlevel code, between source3 and
source4 as the error checking can be the same now.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Apr 24 10:44:53 CEST 2011 on sn-devel-104
2011-04-24 10:44:53 +02:00
Günther Deschner
6e3f0d28a4 s3-includes: only include ntdomain.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
7e73214ebf s3-auth: use auth.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Günther Deschner
f60398d7b2 s3-winbindd: let winbind try to use samlogon validation level 6. (bug #7945)
The benefit of this that it makes us more robust to secure channel resets
triggered from tools outside the winbind process. Long term we need to have a
shared tdb secure channel store though as well.

Guenther

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Feb  4 18:11:04 CET 2011 on sn-devel-104
2011-02-04 18:11:04 +01:00
Günther Deschner
6c20ba3f97 s3-winbind: prefer dcerpc_samr_X functions in winbindd/winbindd_pam.c.
Guenther
2011-02-02 13:30:04 +01:00
Volker Lendecke
c52c75338f s3: inline get_uid_from_state
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jan 28 23:38:16 CET 2011 on sn-devel-104
2011-01-28 23:38:16 +01:00
Volker Lendecke
e099c91ef9 s3: Lift winbindd_cli_state from fillup_password_policy 2011-01-28 22:54:19 +01:00
Volker Lendecke
fe516a3fb7 s3: Do not use state->mem_ctx in fillup_password_policy 2011-01-28 22:54:19 +01:00
Volker Lendecke
2d174d49cd s3: Lift winbindd_cli_state from winbindd_dual_pam_auth_samlogon 2011-01-28 22:54:19 +01:00
Volker Lendecke
5d4bfc949b s3: Lift winbindd_cli_state from winbindd_raw_kerberos_login 2011-01-28 22:54:19 +01:00
Günther Deschner
abb7c07de5 s3-winbind: share a common winbind_samlogon_retry_loop().
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jan 26 12:41:14 CET 2011 on sn-devel-104
2011-01-26 12:41:14 +01:00
Günther Deschner
035a0d2fb3 Revert "s3: These assignments are overwritten immediately"
This reverts commit 18962ea385.
2011-01-26 11:55:37 +01:00
Günther Deschner
36cfa1792e Revert "s3-winbind: fix winbindd_dual_pam_auth_samlogon() for NT4 domains."
This reverts commit cea36aeacf.
2011-01-26 11:55:36 +01:00
Günther Deschner
cea36aeacf s3-winbind: fix winbindd_dual_pam_auth_samlogon() for NT4 domains.
After failing the netr_LogonSamLogonEx, we failed to retry with
netr_LogonSamLogon.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Jan 24 12:35:42 CET 2011 on sn-devel-104
2011-01-24 12:35:42 +01:00
Volker Lendecke
92e138f920 s3: Use the right uid winbindd_raw_kerberos_login() 2010-12-19 23:25:06 +01:00
Volker Lendecke
a159958065 s3: wcache_invalidate_samlogon only needs the SID 2010-12-19 23:25:06 +01:00
Andrew Bartlett
6195dfc0eb s3-winbind Improve memory handling in NTLMv2-backend plaintext authentication
Andrew Bartlett
2010-12-10 16:09:06 +11:00
Andrew Bartlett
5cfe949108 s3-winbind Don't send the LM password to the server, ever
This is for the case where we have the plaintext password locally, and
can construct the challenge-response values here.

We should never ever use the LM password in domain authentication.
The last domain controller to only have LM passwords stored was NT
3.5.

Andrew Bartlett
2010-12-10 16:08:31 +11:00
Volker Lendecke
3b71f5df03 s3: Return the correct result from winbindd_dual_auth_passdb 2010-11-27 19:11:03 +01:00
Volker Lendecke
d1c1aaeb8b s3: Remove a reference to "winbindd_cli_state" from append_auth_data
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 17 12:02:34 UTC 2010 on sn-devel-104
2010-11-17 12:02:34 +00:00
Volker Lendecke
bdf830ac61 s3: Remove a reference to "winbindd_cli_state" from append_info3_as_txt 2010-11-17 12:17:22 +01:00
Volker Lendecke
75f41c304a s3: Remove a reference to "winbindd_cli_state" from append_afs_token 2010-11-17 12:17:22 +01:00
Volker Lendecke
5b0724d228 s3: Remove a reference to "winbindd_cli_state" from append_info3_as_ndr 2010-11-17 12:17:22 +01:00
Volker Lendecke
3bfe6765b2 s3: Remove a reference to "winbindd_cli_state" from append_unix_username 2010-11-17 12:17:22 +01:00
Volker Lendecke
240edd07b3 s3: Remove a reference to "winbindd_cli_state" from append_auth_data 2010-11-17 12:17:21 +01:00