1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

1125 Commits

Author SHA1 Message Date
Rafal Szczesniak
16a66cf17a A few typo fixes Andrew eventually let off to me.
Rafal
-
Gerald Carter
dfceb0aab5 adding more descriptions for nt status codes -
Andrew Bartlett
6789e237d7 Clean up our NTLMv2 code by moving the grunt work into a helper function.
Andrew Bartlett
-
Andrew Bartlett
85e9c060ea (only for HEAD at the moment).
Add NTLMv2 support to our client, used when so configured ('client use NTLMv2 =
yes') and only when 'client use spengo = no'.  (A new option to allow the
client and server ends to chose spnego seperatly).

NTLMv2 signing doesn't yet work, and NTLMv2 is not done for NTLMSSP yet.

Also some parinoia checks in our input parsing.

Andrew Bartlett
-
Andrew Bartlett
e6f87c7ee5 Add some return values, and don't attempt signing for NTLMSSP yet (it uses a
different algorithm).

Andrew Bartlett
-
Andrew Bartlett
b1c722e306 More signing updates - start checking that the server isn't being spoofed.
Andrew Bartlett
-
Andrew Bartlett
1a2738937e We now have client-side SMB signing support!
This checking allows us to connect to Microsoft servers the use SMB signing,
within a few restrictions:

 - I've not get the NTLMSSP stuff going - it appears to work, but if you break
the sig - say by writing a zero in it - it still passes...
 - We don't currently verfiy the server's reply
 - It works against one of my test servers, but not the other...

However, it provides an excellent basis to work from.  Enable it with 'client
signing' in your smb.conf.

Doc to come (tomorrow) and this is not for 3.0, till we get it complete.

The CIFS Spec is misleading - the session key (for NTLMv1 at least) is the
standard session key, ie MD4(NT#).

Thanks to jra for the early work on this.

Andrew Bartlett
-
Jeremy Allison
1fec0f50ed Stop tpot from trampling over my Heimdal fixes by moving some of them
to HEAD :-).
Jeremy.
-
Andrew Bartlett
a8773c9f82 Factor out common code in the NTLMSSP/SPNEGO code.
The idea here is to seperate, as much as possible, the SPNEGO layer from the
NTLMSSP layer.  This not only helps us with protocol correctness, but also
should allow further mechinisms to be added with relitive ease.  I indend to
make the kerberos code use this shortly.

I've never seen the 'zero length blob' form of the anonymous login, so I've
removed that case.

Andrew Bartlett
-
Tim Potter
9b11ede901 Fixed typo. -
Gerald Carter
fcf63df8bf fix for CR 1603; provide description of NT_STATUS_PIPE_NOT_AVAILABLE -
Jeremy Allison
1684719695 Fixup proto generation to not include krb5 specific symbols
if no kerberos selected. Noticed by Metze.
Jeremy.
-
Jeremy Allison
193cc4f4fc More fixes getting us closer to full Heimdal compile....
Jeremy.
-
Jim McDonough
aceaaad1c2 should be HAVE_KRB5_SET_REAL_TIME (HAVE_ was missing)...fix the build -
Jeremy Allison
77aeb262ef Merge in more of the SuSE patches for Heimdal. These changes show how
to add a function without an explicit #ifdef HEIMDAL which I'm trying
to avoid.
Jeremy.
-
Andrew Bartlett
c7793f2718 (missed in last commit)
Change the 'cookie' to be the ntlmssp_context, and use the 'auth_context' on
that to store the cookie.  Ensures that simple callbacks can 'just work'.

Also make it clear that we are doing a pull_string into a pstring, not just
any sized buffer.

Andrew Bartlett
-
Andrew Bartlett
ba13e058d4 Missed auth_ntlmssp.c in last night's checkin. Also keep track of the current
challenge in the NTLMSSP context.

Andrew Bartlett
-
Gerald Carter
9ac196dad4 small merges from SAMBA_3_0; mostly typos, renames, etc... -
Andrew Bartlett
9e48ab86da Refactor the NTLMSSP code again - this time we use function pointers to
eliminate the dependency on the auth subsystem.  The next step is to add
the required code to 'ntlm_auth', for export to Squid etc.

Andrew Bartlett
-
Andrew Tridgell
e4ce26332b query_alt_name takes a forced unicode string in win2000. It is not
null terminated.

Thanks to Metze for finding this.
-
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. -
Andrew Bartlett
b6641badcb Updates to our NTLMSSP code:
This tries to extract our server-side code out of sessetup.c, and into a more
general lib.  I hope this is only a temporay resting place - I indend to
refactor it again into an auth-subsystem independent lib, using callbacks.

Move some of our our NTLMSSP #defines into a new file, and add two that I found
in the COMsource docs - we seem to have a double-up, but I've verified from
traces that the NTLMSSP_TARGET_TYPE_{DOMAIN,SERVER} is real.

This code also copes with ASCII clients - not that we will ever see any here,
but I hope to use this for HTTP, were we can get them.  Win2k authenticates
fine under forced ASCII, btw.

Tested with Win2k, NTLMv2 and Samba's smbclient.

Andrew Bartlett
-
Andrew Bartlett
c6535836f2 Don't force the DOS password into a 14 char space, as this would imply null
termination - the password will not be null terminated before hashing if
len >= 14.

related to debian bug #157432

Andrew Bartlett
-
Andrew Bartlett
fe1cc779d5 Fix a number of client-side fstring/pstring mixups.
Andrew Bartlett
-
Christopher R. Hertel
42a4e5b851 Fixed some simple typos, including one that would have resulted in a
DEBUG() message printing the wrong value.
-
Volker Lendecke
f5494f5ef6 One more const. Andrew, you seem to have krb5 :-)
Volker
-
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Richard Sharpe
5d6c181033 Document the size constraints on a write request. -
Richard Sharpe
4201038588 Port the fix to cli_setup_write to handle offsets greater than 32-bits from
Samba 2.2.x ...
-
Jeremy Allison
784d15761c Finish adding strings to all talloc_init() calls.
Jeremy.
-
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Tim Potter
a2159610b9 Fixed bug in debug statement when tconX fails. -
Herb Lewis
723c4caf64 merge from 2.2 fix for smbclient large files -
Gerald Carter
3ceff08eb7 app_head merge for get_friendly_nt_err() -
Gerald Carter
6b18ca9511 merge of get_dc_name()-like code from APP_HEAD; better support password server = DC1 * -
Jeremy Allison
2d63fc7760 Fix write error returning EFBIG - found by Conrad.
Jeremy.
-
Jeremy Allison
185804ac94 Fix client large file reporting.
Jeremy
-
Jeremy Allison
7185b846e4 Ensure global_scope() returns "", not the NULL string. Froma tpot fix.
Jeremy.
-
Gerald Carter
f978387e78 cleaning up some friendly error messages -
Gerald Carter
157b5ab198 [merge] remove assert(count ==1) for multi-homed PDCs; CR 1277 -
Jeremy Allison
c6da50def8 Doing janitorial duty for tpot - memory leak fix.
Jeremy.
-
Herb Lewis
ce7d421ba9 use the new IVAL_TO_SMB_OFF_T for file_info size member
dir now shows correct size on large files
-
Andrew Bartlett
ea18d02036 Dereference the correct thing here, so we don't segfault -
Jeremy Allison
7ba051a830 Fixup of ordered cleanup of get_dc_list - bug found by Dominik 'Aeneas' Schnitzer <dominik@schnitzer.at>
Jeremy.
-
Jeremy Allison
1a36ac60be Test was reversed for ERRmoredata in cli_read.
Jeremy.
-
Andrew Bartlett
47f3bfe956 Having waited for *way* too long, this is mimir's namecache and trusted domain
cache code.

This uses gencache, mimir's new caching code that stores at text-based cache
of various data.

Mimir has done a *lot* of work on this patch, and it is finally time to
get it in CVS.

Andrew Bartlett
-
Gerald Carter
c31a17889e [merge from APP_HEAD]
90% fix for CR 1076.  The password server parameter will no take things
like

        password server = DC1 *

which means to contact DC1 first and the go to auto lookup if it
fails.


jerry
-
Jeremy Allison
19f86f1f72 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
-
Jim McDonough
929874d274 get_nt_error_msg from APPLIANCE_HEAD is called nt_errstr in HEAD. This should fix the build. -
Gerald Carter
3ea73f158e merge get_friendly_nt_err_msg() from app_head -