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

103 Commits

Author SHA1 Message Date
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
Tim Potter
0c3bb181e8 r4259: Fix cast in SMB_XMALLOC_ARRAY. Bugzilla #2168. 2007-10-10 10:53:40 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Jeremy Allison
7565019286 r3377: Merge in first part of modified patch from Nalin Dahyabhai <nalin@redhat.com>
for bug #1717.The rest of the code needed to call this patch has not yet been
checked in (that's my next task). This has not yet been tested - I'll do this
once the rest of the patch is integrated.
Jeremy.
2007-10-10 10:53:05 -05:00
Jeremy Allison
0f3f7b035b r3273: Ensure we're consistent in the use of strchr_m for '@'.
Jeremy.
2007-10-10 10:53:03 -05:00
Tim Potter
7f161702fa r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
2007-10-10 10:52:55 -05:00
Andrew Bartlett
4bf0b94011 r2762: Remove silly conversion to and from UTF8 on the winbind pipe. Fix the
naming of the require_membership_of parameter in pam_winbind and fix
the error code for 'you didn't specify a domain' in ntlm_auth.

Andrew Bartlett
2007-10-10 10:52:51 -05:00
Andrew Bartlett
657bb14789 r2147: Fix utility name in error message (pre-emptivly merged to trunk ;-)
Andrew Bartlett
2007-10-10 10:52:33 -05:00
Andrew Bartlett
5bd6abb54e r1582: On failure, print the length of the right variable.
Andrew Bartlett
2007-10-10 10:52:15 -05:00
Andrew Bartlett
36741d3cf5 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
2007-10-10 10:52:13 -05:00
Andrew Bartlett
4da976dbd0 r1128: The end-of-file is not the end of the world, so don't make a load DEBUG() about it.
Andrew Bartlett
2007-10-10 10:51:57 -05:00
Andrew Bartlett
feccc3daca r1126: Allow more flexible GSS-SPENGO client and server operation. The
client now falls back to NTLMSSP, and the server allows the client to
start, without first asking for a mech list.

Andrew Bartlett
2007-10-10 10:51:57 -05:00
Andrew Bartlett
94c0827ce2 r1124: ntlm_auth memory leak fixes by James Wilkinson - jwilk@alumni.cse.ucsc.edu
Andrew Bartlett
2007-10-10 10:51:56 -05:00
Alexander Bokovoy
72d30ea066 r517: Remove wrong commit I did by mistake 2007-10-10 10:51:27 -05:00
Alexander Bokovoy
e278e2e6e0 r516: On GNU/Linux distributions which allow to use both 2.4 and 2.6 kernels
there is SYS_utimes syscall defined at compile time in glibc-kernheaders but
it is available on 2.6 kernels only. Therefore, we can't rely on syscall at
compile time but have to check that behaviour during program execution. An easy
workaround is to have replacement for utimes() implemented within our wrapper and
do not rely on syscall at all. Thus, if REPLACE_UTIME is defined already (by packager),
skip these syscall shortcuts.
2007-10-10 10:51:26 -05:00
Andrew Bartlett
aa3bc79835 r240: I'm pretty happy with the 'ntlm-server-1' helper protocol now, and as
there is now a public patch that uses it, make it always available.

(It was #ifdef DEVELOPER)

Andrew Bartlett
2007-10-10 10:51:15 -05:00
Andrew Bartlett
57a5563b42 r201: Fix bugs in the --helper-protocol=ntlm-server-1 implementation.
(allow the use of base64 encoded strings, LM or NT passwords)

Andrew Bartlett
2007-10-10 10:51:13 -05:00
Andrew Bartlett
c05016a2f7 r191: Only send the ntlm_auth 'ntlm-server-1' helper client a '.' after the
server had said something (such as an error).

Andrew Bartlett
2007-10-10 10:51:12 -05:00
Andrew Bartlett
8efdd957ba r188: Add a new 'helper protocol' to ntlm_auth.
This protocol looks rather like SMTP headers/LDAP:

NT-Domain: TESTWG
Username: abartlet
...

Password: foo

Challenge-response passwords are in hexideciaml, while any 'plain'
string can be base64 encoded when like this:

Password:: Zm9vCg==

(the :: indicates it, just like LDAP - I hope)

The protocol is not final, so it is #ifdef DEVELOPER for now (so
nobody starts to rely on it until I'm happy), but we may as well get
this into subversion.

My intention is to use this to power the next version of my
PPP/ntlm_auth plugin, and hopefully entice a FreeRadius plugin out of
the woods.

Andrew Bartlett
2007-10-10 10:51:12 -05:00
Andrew Bartlett
6e1b7a8848 r177: Split ntlm_auth --diagnostics into a seperate file, so as not to clutter
the main ntlm_auth program.

It quite possibly should belong in smbtorture, but relies on the
winbind client for now.

Andrew Bartlett
2007-10-10 10:51:12 -05:00
Andrew Bartlett
da4177209d r171: Continue the 'rename nt_session_key' work. This attempts to rename
this variable to 'user_session_key', where possible.  The command line
parameter is currently unchanged).

Andrew Bartlett
2007-10-10 10:51:11 -05:00
Andrew Bartlett
0693b9e79f r104: Fix ntlm_auth by adding the new strhex_to_data_blob() call.
Andrew Bartlett
2007-10-10 10:51:09 -05:00