1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-19 23:17:05 +03:00

124 Commits

Author SHA1 Message Date
Stefan Metzmacher
1b8ed6c0ff winbind: use a struct element for WBFLAG_PAM_UNIX_NAME
To not conflict with WBFLAG_PAM_INFO3_TEXT.

This should fix pam_winbind.

metze
2008-02-28 23:00:42 +01:00
Günther Deschner
ea609d1b0e Fix some more callers of PAC_DATA.
Guenther
2008-02-17 02:12:00 +01:00
Kai Blin
cf671ca35b ntlm_auth: Parse configfile after parsing it's location, not before. 2008-01-31 09:42:18 +01:00
Kai Blin
97768628f5 ntlm_auth: Get rid of statics in manage_squid_ntlmssp_request 2008-01-19 13:16:24 +01:00
Kai Blin
af43842622 ntlm_auth: Rewrite manage_client_ntlmssp_request without statics. 2008-01-19 13:16:24 +01:00
Kai Blin
2479a0c3ad nltm_auth: Use struct ntlm_auth_state in helper functions.
Now rewriting the helpers one after the other can start.
2008-01-19 13:16:24 +01:00
Kai Blin
f8243d1913 ntlm_auth: Prepare for a deeper rewrite of the helper functions 2008-01-19 13:16:24 +01:00
Kai Blin
4a475baf26 ntlm_auth: Dynamically allocate the read buffer.
This ports over my changes from Samba4
2008-01-19 13:16:23 +01:00
Kai Blin
ab0ee6e9a6 util_str: Don't return memory from talloc_tos(), use mem_ctx instead. 2008-01-19 02:20:16 +01:00
Jeremy Allison
0599d57eff Fix CID 476. Ensure a valid pac_data pointer is always passed to
ads_verify_ticket as it's always derefed.
Jeremy.
2008-01-11 23:53:27 -08:00
Jeremy Allison
52dc5eaef2 Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
2007-12-10 11:30:37 -08:00
Jeremy Allison
0411635511 Getting to the home stretch for elimination of pstrings...
Jeremy.
2007-12-03 18:48:41 -08:00
Jeremy Allison
6f9c2910bd Add talloc stackframe for ntlm_auth.c
Jeremy.
2007-11-20 19:17:47 -08:00
Volker Lendecke
5f205ab48d Make base64_encode_data_blob return a talloced string 2007-11-09 15:12:30 +01:00
Jeremy Allison
f35a266b3c 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.
2007-10-18 17:40:25 -07:00
Stefan Metzmacher
8a95d7a7ed 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
2007-10-10 12:30:45 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Gerald Carter
cbd33da9f7 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.
2007-10-10 12:23:19 -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
Stefan Metzmacher
fa322f0cc9 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
2007-10-10 12:18:59 -05:00
Jeremy Allison
32b040fe05 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.
2007-10-10 12:18:22 -05:00
Günther Deschner
7e1a84b722 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
2007-10-10 12:17:50 -05:00
Gerald Carter
2d877e41d1 r21010: fix the pstring change in ntlm_auth for require-membership-of in ntlm_auth 2007-10-10 12:17:26 -05:00
Volker Lendecke
089b51e28c r18029: More C++ stuff 2007-10-10 11:43:23 -05:00
Jeremy Allison
5d9bb91ab7 r17984: Ensure we never indirect a null opt_username if it wasn't
specified.
Jeremy.
2007-10-10 11:39:45 -05:00
Jeremy Allison
c097e10739 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.
2007-10-10 11:39:45 -05:00
Jeremy Allison
5f51417916 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.
2007-10-10 11:39:45 -05:00
Jeremy Allison
37c636eb48 r17921: Comment is obsolte. This is now implemented in winbindd.
Jeremy.
2007-10-10 11:38:59 -05:00
Jeremy Allison
7b53932b51 r17903: Fix null deref caught by Stanford checker. Don't
call ntlmssp_end on a null pointer ! (Doh !).
Jeremy.
2007-10-10 11:38:58 -05:00
Jeremy Allison
ae7cc298a1 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.
2007-10-10 11:38:43 -05:00
Volker Lendecke
4f6605a488 r17446: Fix some C++ warnings and two memleaks found by Coverity, IDs 304 and 305.
Volker
2007-10-10 11:38:34 -05:00
Andrew Bartlett
bd3e06a0e4 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
2007-10-10 11:38:19 -05:00
Andrew Bartlett
967292b713 r17005: Add a new helper mode to ntlm_auth: ntlm-change-password-1
This mode proxies pre-calculated blobs from a remote (probably VPN)
client into the domain.  This allows clients to change their password
over a PPTP connection (where they would not be able to connect to
SAMR directly).

The precalculated blobs do not reveal the plaintext password.

Original patch by Alexey Kobozev <cobedump@gmail.com>
2007-10-10 11:19:17 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Günther Deschner
a75dd80c62 r15523: Honour the time_offset also when verifying kerberos tickets. This
prevents a nasty failure condition in winbindd's pam_auth where a tgt
and a service ticket could have been succefully retrieved, but just not
validated.

Guenther
2007-10-10 11:16:55 -05:00
Gerald Carter
a95d11345e r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd server 2007-10-10 11:16:00 -05:00
Günther Deschner
afc519530f r14585: Tighten argument list of kerberos_kinit_password again,
kerberos_kinit_password_ext provides access to more options.

Guenther
2007-10-10 11:15:38 -05:00
Volker Lendecke
bb6d678575 r14033: Fix Coverity bug # 126 2007-10-10 11:11:06 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
Jeremy Allison
c970d7d0a5 r12555: Fix more load_case_table swegfaults. Arggg.
What I'd give for a global constructor...
Jeremy.
2007-10-10 11:05:59 -05:00
Jeremy Allison
d1caef8663 r11573: Adding Andrew Bartlett's patch to make machine account
logons work if the client gives the MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
or MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT flags. This changes
the auth module interface to 2 (from 1). The effect of this is
that clients can access resources as a machine account if they
set these flags. This is the same as Windows (think of a VPN
where the vpn client authenticates itself to a VPN server
using machine account credentials - the vpn server checks
that the machine password was valid by performing a machine
account check with the PDC in the same was as it would a
user account check. I may add in a restriction (parameter)
to allow this behaviour to be turned off (as it was previously).
That may be on by default.
Andrew Bartlett please review this change carefully.
Jeremy.
2007-10-10 11:05:20 -05:00
Jeremy Allison
af85458067 r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab.
Jeremy.
2007-10-10 11:05:08 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Volker Lendecke
c7d10e2c83 r9198: Convert hex_encode and strhex_to_data_blob to take a talloc context.
Volker
2007-10-10 11:00:27 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Gerald Carter
03ebf3ebfe r6450: * fix typo in htlm_auth help message
* add synonym for idmap_rid in better lining with
  other idmap backend names
* remove old debug messages when idmap {uid|gid} options
  are not defined
2007-10-10 10:56:41 -05:00