1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

1389 Commits

Author SHA1 Message Date
Andrew Bartlett
724e8d3f33 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
2007-10-10 10:51:06 -05:00
Gerald Carter
a7e2730ec4 r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
2007-10-10 10:51:05 -05:00
Andrew Bartlett
9598593bcf Fix most of bug #169.
For a (very) long time, we have had a bug in Samba were an NTLMv2-only
PDC would fail, because it converted the password into NTLM format for
checking.

This patch performs the direct comparison required for interactive
logons to function in this situation.  It also removes the 'auth flags', which
simply where not ever used.

Natrually, this plays with the size of structures, so rebuild, rebuild
rebuild...

Andrew Bartlett
-
Herb Lewis
4b737b51a5 fix typo -
Jeremy Allison
43db249fb8 Ensure we cope correctly with ea length of zero. Detect torture fail correctly.
Jeremy.
-
Volker Lendecke
8037750df5 Apply some const -
Jeremy Allison
0d239a9c07 Fix get/set of EA's in client library. Added torture test for it.
Jeremy.
-
Andrew Bartlett
43c71b3202 Let the comment match the function...
Andrew Bartlett
-
Andrew Bartlett
4b9c50db85 Revert bogus part of smb signing commit - when Win2k supports singing/SPNEGO,
it does sign the first packet.

Andrew Bartlett
-
Andrew Bartlett
e5422d7413 Add a few comments explaining KEY_EXCH
Andrew Bartlett
-
Andrew Bartlett
1e91cd0cf8 Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.

We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).

As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it.  This should give
us maximum compatability.

Andrew Bartlett
-
Andrew Bartlett
414d3fdc75 Make it clearer that this error refers to the peer, as this code is in both
the client and server.

Andrew Bartlett
-
Andrew Bartlett
e27b5cbe75 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
-
Jeremy Allison
5eeeee302c Working (tested) client code for setting EA's by filename and fnum.
Now for parsing out the retrieved EA's.
Jeremy.
-
Jim McDonough
c2436c433a Fix bugzilla # 1208
Winbind tickets expired.  We now check the expiration time, and acquire
new tickets.  We couln't rely on renewing them, because if we didn't get
a request before they expired, we wouldn't have renewed them.  Also, there
is a one-week limit in MS on renewal life, so new tickets would have been
needed after a week anyway.   Default is 10 hours, so we should only be
acquiring them that often, unless the configuration on the DC is changed (and
the minimum is 1 hour).
-
Jeremy Allison
b0c109c403 Added cli_set_ea(), cli_get_ea next...
Jeremy.
-
Gerald Carter
5fbfaa687a updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD -
Jeremy Allison
d7cf64b1e4 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
-
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
-
Jeremy Allison
966e49a48c First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
-
Herb Lewis
0375dace24 if we are truncating to the . we need to start at the beginning in case
there are multiple "."'s in the name.

This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this
is #define'd to 1 directly above. Should we also get rid of the #ifdef?
-
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
-
Jeremy Allison
aad6eb2240 Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
-
Jeremy Allison
c9f31fafed Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
-
Jeremy Allison
f4a7ea6dc2 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
-
Volker Lendecke
005d92d57e That const was one too many -
Volker Lendecke
0b29d83d33 Apply some const
Volker
-
Jim McDonough
4319df7fdc Janitor for tpot...bugzilla #1098, msleep already exists on aix -
Jeremy Allison
0ea0ada6c6 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
-
Jeremy Allison
5c6f8b1053 Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
Jeremy.
-
Jeremy Allison
adf8ee3df7 More paranoia checks.
Jeremy.
-
Jeremy Allison
86b030197d Paranoia fixes :-).
Jeremy.
-
Jeremy Allison
e275835b51 Fix for possible crash bug from Sebastian Krahmer (SuSE).
Jeremy.
-
Andrew Bartlett
318e11748a Remove more unused portions of the 'password cache'.
Andrew Bartlett
-
Andrew Bartlett
66569546e8 Remove more unused functions - this time parts of the 'password cache'.
Andrew Bartlett
-
Andrew Bartlett
4c4aa80177 Remove unused utility function.
Andrew Bartlett
-
Andrew Bartlett
e10e176c83 Make get_dc_list static - we only ask for a sorted list externally.
Andrew Bartlett
-
Jeremy Allison
3a3e336030 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
-
Andrew Bartlett
2a2b1f0c87 This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.

This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.

Andrew Bartlett
-
Andrew Bartlett
636b98dab9 Fix the initialisation vectors for NTLM2, so that they at least make sense,
even if they don't work yet.

Andrew Bartlett
-
Jeremy Allison
25d739978f Fix for a signing bug when the mid wraps.
Found by Fran Fabrizio <fran@cis.uab.edu>.
Add to the *start* of the list not the end of the list.
This ensures that the *last* send sequence with this mid
is returned by preference.
This can happen if the mid wraps and one of the early
mid numbers didn't get a reply and is still lurking on
the list.
Jeremy.
-
Gerald Carter
79fe75dcdf * BUG 446
- setup_logging() in smbclient to be interactive (remove the timestamps)
  - Fix bad return value in pull_ucs2( needs more testing to make sure this
    didn't break something else) that caused clistr_pull() to always read
    the same string from the buffer (pull_usc2() could return -1 if the original
    source length was given as -1)
  - increment some debugging messages to avoid printing them out so often
-
Gerald Carter
bca702c976 * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
-
Gerald Carter
ebabf72a78 fix some warnings from the Sun compiler -
Andrew Bartlett
7e75a6d681 Romve debugging assertions (oops...)
Andrew Bartlett
-
Andrew Bartlett
35f6347a73 Add a new type of name lookup 'ads'. This seperates this from normal
hostname lookups, and ensures that we don't lookup 'short' (ie NetBIOS)
domain names in DNS.

Andrew Bartlett
-
Andrew Bartlett
7c34de8096 This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
-
Andrew Bartlett
7e6cc8f003 Make it clearer that the domain here is the domain of the user for
authentication.

Andrew Bartlett
-
Andrew Bartlett
ba33f1e0d5 Fix more cases to ensure that as a server, we don't complain to the client
about our server-side lack of session key.

Andrew Bartlett
-
Jeremy Allison
84d34e32be Ensure we set "always sign" flag if set. We don't currently do anything with
this but we should log the fact it was negotiated.
Jeremy.
-