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

141 Commits

Author SHA1 Message Date
Kouhei Sutou
f8dae40fc8 spnego: Support ASN.1 BIT STRING and use it in SPNEGO.
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 20:10:54 +02:00
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Bo Yang
8c7a579bdc s3: set winbindd request flags in ntlm_auth to make it contact trusted domain when krb5 auth is enabled
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-22 02:03:32 +08:00
Andrew Bartlett
32062013c3 s3: Fix ntlm_auth and winbindd to use new common libcli/auth APIs 2009-04-14 19:33:04 +10:00
Andrew Bartlett
baf7274fed Make Samba3 use the new common libcli/auth code
This is particuarly in the netlogon client (but not server at this
stage)
2009-04-14 16:23:44 +10:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Andrew Bartlett
97af7f1ed1 Add some harmless use of talloc_tos() in ntlm_auth 2009-04-14 12:54:12 +10:00
Andrew Bartlett
574a6a8c35 s3:kerberos Rework smb_krb5_unparse_name() to take a talloc context
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 13:25:36 +02:00
Volker Lendecke
5b6c428763 Fix an uninitialized variable, introdued with 4d100f2f 2009-02-13 12:15:04 +01:00
Volker Lendecke
6e19b22c5a Fix Coverity ID 744
This was marked as a resource leak. This change makes the code a bit clearer
that we always free error_string.
2009-02-13 10:20:51 +01:00
Volker Lendecke
4d100f2f6a Fix Coverity ID 745 (RESOURCE_LEAK) 2009-02-13 10:20:45 +01:00
todd stecher
9d4d2f70cb S3: Fixes for coverity issues. 2009-02-10 14:43:14 -08:00
Volker Lendecke
8fc15ab96d remove the explicit mem_ctx from ntlmssp_state, use the state itself 2008-11-30 17:15:19 +01:00
Kai Blin
7d8787c915 ntlm_auth: Put huge NTLMv2 blobs into extra_data on CRAP auth.
This fixes bug #5865
2008-11-10 12:50:02 +01:00
Jelmer Vernooij
f3f9446ec1 Rename hex_encode to hex_encode_talloc,for consistency with samba 4 and heimdal. 2008-10-18 16:16:57 +02:00
Volker Lendecke
abe1431ad3 Remove external refs to winbindd_fd
(This used to be commit 18bf2b2028)
2008-04-06 12:27:08 +02:00
Kai Blin
b6ab1c4061 ntlm_auth: Improve compliance to the Squid helper protocol
This fixes bug #4235.

Patch from Pawel Worach <pawel.worach@gmail.com> with some linebreaks
added by me.

Also fix one BH message that the original patch didn't fix.
(This used to be commit 098380760d)
2008-03-19 23:49:43 +01:00
Stefan Metzmacher
76de025c72 winbind: use a struct element for WBFLAG_PAM_UNIX_NAME
To not conflict with WBFLAG_PAM_INFO3_TEXT.

This should fix pam_winbind.

metze
(This used to be commit 1b8ed6c0ff)
2008-02-28 23:00:42 +01:00
Günther Deschner
965774fa8f Fix some more callers of PAC_DATA.
Guenther
(This used to be commit ea609d1b0e)
2008-02-17 02:12:00 +01:00
Kai Blin
a8209904a5 ntlm_auth: Parse configfile after parsing it's location, not before.
(This used to be commit cf671ca35b)
2008-01-31 09:42:18 +01:00
Kai Blin
b133f5ac0a ntlm_auth: Get rid of statics in manage_squid_ntlmssp_request
(This used to be commit 97768628f5)
2008-01-19 13:16:24 +01:00
Kai Blin
4b05fd29e6 ntlm_auth: Rewrite manage_client_ntlmssp_request without statics.
(This used to be commit af43842622)
2008-01-19 13:16:24 +01:00
Kai Blin
40db1a1625 nltm_auth: Use struct ntlm_auth_state in helper functions.
Now rewriting the helpers one after the other can start.
(This used to be commit 2479a0c3ad)
2008-01-19 13:16:24 +01:00
Kai Blin
83f30d72e0 ntlm_auth: Prepare for a deeper rewrite of the helper functions
(This used to be commit f8243d1913)
2008-01-19 13:16:24 +01:00
Kai Blin
f22a29e1bd ntlm_auth: Dynamically allocate the read buffer.
This ports over my changes from Samba4
(This used to be commit 4a475baf26)
2008-01-19 13:16:23 +01:00
Kai Blin
805caafd44 util_str: Don't return memory from talloc_tos(), use mem_ctx instead.
(This used to be commit ab0ee6e9a6)
2008-01-19 02:20:16 +01:00
Jeremy Allison
43717a16e2 Fix CID 476. Ensure a valid pac_data pointer is always passed to
ads_verify_ticket as it's always derefed.
Jeremy.
(This used to be commit 0599d57eff)
2008-01-11 23:53:27 -08: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
Jeremy Allison
adf6d848de Getting to the home stretch for elimination of pstrings...
Jeremy.
(This used to be commit 0411635511)
2007-12-03 18:48:41 -08:00
Jeremy Allison
90b8a7c8fe Add talloc stackframe for ntlm_auth.c
Jeremy.
(This used to be commit 6f9c2910bd)
2007-11-20 19:17:47 -08:00
Volker Lendecke
62b97b0156 Make base64_encode_data_blob return a talloced string
(This used to be commit 5f205ab48d)
2007-11-09 15:12:30 +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 f35a266b3c)
2007-10-18 17:40:25 -07:00
Stefan Metzmacher
28d076d20f r25143: rename public functions from winbind_client.h
init_request	=> winbindd_init_request
free_response	=> winbindd_free_response
read_reply	=> winbindd_read_reply

write_sock	=> winbind_write_sock
read_sock	=> winbind_read_sock
close_sock	=> winbind_close_sock(void)

metze
(This used to be commit 8a95d7a7ed)
2007-10-10 12:30:45 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Gerald Carter
4caefdf348 r23474: Here's a small patch that disables the libkrb5.so replay cache
when verifying a ticket from winbindd_pam.c.

I've found during multiple, fast, automated SSH logins (such
as from a cron script) that the replay cache in MIT's krb5
lib will occasionally fail the krb5_rd_req() as a replay attack.

There seems to be a small window during which the MIT krb5
libs could reproduce identical time stamps for ctime and cusec
in the authenticator since Unix systems only give back
milli-seconds rather than the micro-seconds needed by the
authenticator.  Checked against MIT 1.5.1.  Have not
researched how Heimdal does it.

My thinking is that if someone can spoof the KDC and TDS
services we are pretty hopeless anyways.
(This used to be commit cbd33da9f7)
2007-10-10 12:23:19 -05:00
Volker Lendecke
b4a7b7a888 r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
(This used to be commit 3d3d61687e)
2007-10-10 12:22:01 -05:00
Stefan Metzmacher
56ba447668 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
(This used to be commit fa322f0cc9)
2007-10-10 12:18:59 -05:00
Jeremy Allison
9f8e8e1aac r21663: Fix from the Wine guys: Robert Shearman <rob@codeweavers.com>
The background behind this patch is that we're using ntlm_auth with
Wine. Windows allows us to pass in a NULL domain and a username of the
form of "user@domain" and this is converted into an NTLMSSP_AUTH packet
with a NULL domain name and a username of the same form.
Jeremy.
(This used to be commit 32b040fe05)
2007-10-10 12:18:22 -05:00
Günther Deschner
69cee2a3ec r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
(This used to be commit 7e1a84b722)
2007-10-10 12:17:50 -05:00
Gerald Carter
6ff9007252 r21010: fix the pstring change in ntlm_auth for require-membership-of in ntlm_auth
(This used to be commit 2d877e41d1)
2007-10-10 12:17:26 -05:00
Volker Lendecke
6655e1e997 r18029: More C++ stuff
(This used to be commit 089b51e28c)
2007-10-10 11:43:23 -05:00
Jeremy Allison
56fc287080 r17984: Ensure we never indirect a null opt_username if it wasn't
specified.
Jeremy.
(This used to be commit 5d9bb91ab7)
2007-10-10 11:39:45 -05:00
Jeremy Allison
f5cc2b4807 r17981: Hmmm. Don't break helper functions that don't need
the username by forcing it to be specified. Still
split out domain \ user for the ones that do use
it.
Jeremy.
(This used to be commit c097e10739)
2007-10-10 11:39:45 -05:00
Jeremy Allison
037eac7065 r17979: Make ntlm_auth more intelligent about figuring out it's
domain and user args. if only given a parameter of the
form --username DOMAIN\user. When called by firefox
or other user apps they may not know what the domain
is (and they don't care). They just want to pass the
contents of $USERNAME without having to parse it
or guess a domain.
Jeremy.
(This used to be commit 5f51417916)
2007-10-10 11:39:45 -05:00
Jeremy Allison
3247b4f15a r17921: Comment is obsolte. This is now implemented in winbindd.
Jeremy.
(This used to be commit 37c636eb48)
2007-10-10 11:38:59 -05:00
Jeremy Allison
364cb7f71a r17903: Fix null deref caught by Stanford checker. Don't
call ntlmssp_end on a null pointer ! (Doh !).
Jeremy.
(This used to be commit 7b53932b51)
2007-10-10 11:38:58 -05:00
Jeremy Allison
b41e14abfd r17610: Added the ability for firefox to drive the winbindd
ntlm_auth module to allow it to use winbindd cached
credentials.The credentials are currently only stored
in a krb5 MIT environment - we need to add an option to
winbindd to allow passwords to be stored even in an NTLM-only
environment.
Patch from Robert O'Callahan, modified with some fixes
by me.
Jeremy.
(This used to be commit ae7cc298a1)
2007-10-10 11:38:43 -05:00
Volker Lendecke
175aa92e9e r17446: Fix some C++ warnings and two memleaks found by Coverity, IDs 304 and 305.
Volker
(This used to be commit 4f6605a488)
2007-10-10 11:38:34 -05:00
Andrew Bartlett
fe348fdb28 r17216: From Kai Blin <kai.blin@gmail.com>:
A patch to make ntlm_auth recognize three new commands in
ntlmssp-client-1 and squid-2.5-ntlmssp:

The commands are the following:

Command: SF <hex number>
Reply: OK
Description: Takes feature request flags similar to samba4's
gensec_want_feature() call. So far, only NTLMSSP_FEATURE_SESSION_KEY,
NTLMSSP_FEATURE_SIGN and NTLMSSP_FEATURE_SEAL are implemented, using the same
values as the corresponding GENSEC_FEATURE_* flags in samba4.

Command: GF
Reply: GF <hex number>
Description: Returns the negotiated flags.

Command: GK
Reply: GK <base64 encoded session key>
Description: Returns the negotiated session key.

(These commands assist a wine project to use ntlm_auth for signing and
sealing of bulk data).

Andrew Bartlett
(This used to be commit bd3e06a0e4)
2007-10-10 11:38:19 -05:00