1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

1367 Commits

Author SHA1 Message Date
Jeremy Allison
f0039da196 Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
(This used to be commit aad6eb2240)
2004-03-03 23:14:23 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafed)
2004-03-03 20:55:59 +00:00
Jeremy Allison
3fb52e5cc0 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
(This used to be commit f4a7ea6dc2)
2004-02-28 01:53:30 +00:00
Volker Lendecke
e1190848a1 That const was one too many
(This used to be commit 005d92d57e)
2004-02-26 14:34:44 +00:00
Volker Lendecke
0689a2630d Apply some const
Volker
(This used to be commit 0b29d83d33)
2004-02-26 10:55:43 +00:00
Jim McDonough
24df38dbc6 Janitor for tpot...bugzilla #1098, msleep already exists on aix
(This used to be commit 4319df7fdc)
2004-02-23 02:54:03 +00:00
Jeremy Allison
ef8f827449 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
(This used to be commit 0ea0ada6c6)
2004-02-20 23:19:39 +00:00
Jeremy Allison
7d7849b18a 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.
(This used to be commit 5c6f8b1053)
2004-02-20 22:45:53 +00:00
Jeremy Allison
9860bfe384 More paranoia checks.
Jeremy.
(This used to be commit adf8ee3df7)
2004-02-11 23:25:51 +00:00
Jeremy Allison
9870830104 Paranoia fixes :-).
Jeremy.
(This used to be commit 86b030197d)
2004-02-11 19:59:17 +00:00
Jeremy Allison
57dacbe948 Fix for possible crash bug from Sebastian Krahmer (SuSE).
Jeremy.
(This used to be commit e275835b51)
2004-02-10 02:21:38 +00:00
Andrew Bartlett
a69cb9c963 Remove more unused portions of the 'password cache'.
Andrew Bartlett
(This used to be commit 318e11748a)
2004-02-08 05:31:01 +00:00
Andrew Bartlett
fac5f989d3 Remove more unused functions - this time parts of the 'password cache'.
Andrew Bartlett
(This used to be commit 66569546e8)
2004-02-08 02:49:30 +00:00
Andrew Bartlett
7540296fd4 Remove unused utility function.
Andrew Bartlett
(This used to be commit 4c4aa80177)
2004-02-08 00:58:56 +00:00
Andrew Bartlett
e45c217a14 Make get_dc_list static - we only ask for a sorted list externally.
Andrew Bartlett
(This used to be commit e10e176c83)
2004-02-08 00:54:32 +00:00
Jeremy Allison
2f2e5b0191 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
(This used to be commit 3a3e336030)
2004-01-30 18:38:48 +00:00
Andrew Bartlett
784b05c489 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
(This used to be commit 2a2b1f0c87)
2004-01-26 08:45:02 +00:00
Andrew Bartlett
b31ec210fc Fix the initialisation vectors for NTLM2, so that they at least make sense,
even if they don't work yet.

Andrew Bartlett
(This used to be commit 636b98dab9)
2004-01-25 01:11:10 +00:00
Jeremy Allison
bb1119acca 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.
(This used to be commit 25d739978f)
2004-01-17 00:30:35 +00:00
Gerald Carter
b20f1a95a9 * 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
(This used to be commit 79fe75dcdf)
2004-01-15 19:03:18 +00:00
Gerald Carter
b085f0f08e * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
(This used to be commit bca702c976)
2004-01-13 19:42:53 +00:00
Gerald Carter
500c28974d fix some warnings from the Sun compiler
(This used to be commit ebabf72a78)
2004-01-09 14:54:33 +00:00
Andrew Bartlett
f1f24c7c6f Romve debugging assertions (oops...)
Andrew Bartlett
(This used to be commit 7e75a6d681)
2004-01-09 02:47:35 +00:00
Andrew Bartlett
9e1c7dd516 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
(This used to be commit 35f6347a73)
2004-01-09 02:38:58 +00:00
Andrew Bartlett
7d068355aa 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
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
e0ec9d2d56 Make it clearer that the domain here is the domain of the user for
authentication.

Andrew Bartlett
(This used to be commit 7e6cc8f003)
2004-01-08 02:57:42 +00:00
Andrew Bartlett
cfa4469c1e 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
(This used to be commit ba33f1e0d5)
2004-01-05 21:24:27 +00:00
Jeremy Allison
2ed5a1a340 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.
(This used to be commit 84d34e32be)
2004-01-05 19:21:06 +00:00
Andrew Bartlett
ed55d03c8a Don't free the encrypted_session_key early - that causes the subsequent
test for a valid length to fail...

This should fix 'security=server' and hosts-equiv failures picked up by
the build farm.

Andrew Bartlett
(This used to be commit 39311495de)
2004-01-05 12:36:21 +00:00
Andrew Bartlett
425699fce7 Correctly handle per-pipe NTLMSSP inside a NULL session. Previously we
would attempt to supply a password to the 'inside' NTLMSSP, which the
remote side naturally rejected.

Andrew Bartlett
(This used to be commit da408e0d5a)
2004-01-05 04:12:40 +00:00
Andrew Bartlett
a7f8c26d24 Change our Domain controller lookup routines to more carefully seperate
DNS names (realms) from NetBIOS domain names.

Until now, we would experience delays as we broadcast lookups for DNS names
onto the local network segments.

Now if DNS comes back negative, we fall straight back to looking up the
short name.

Andrew Bartlett
(This used to be commit 32397c8b01)
2004-01-05 04:10:28 +00:00
Andrew Bartlett
d4954eff57 Make it clear that we cannot sign if we don't have a session key.
(This used to be commit a2f6dec05b)
2004-01-05 00:11:35 +00:00
Andrew Bartlett
e8984d6b9a Automaticly initialise the signing engine, if we have a session key.
(This used to be commit cb063c1b69)
2004-01-05 00:11:02 +00:00
Andrew Bartlett
cc02d8690c Even if the 'device type' is always an ascii string, use push_string to get
it out onto the wire.  Avoids valgrind warnings because the fstrcpy() causes
part of the wire buffer to be 'marked'.

Andrew Bartlett
(This used to be commit 53d802c72a)
2004-01-04 11:05:30 +00:00
Andrew Bartlett
4cc701196e There is not a particularly good excuse for complaining to the *client* that
it sent 'INVALID_PARAMETER', when it was us as the server that could not
come up with a session key.  Instead, allow normal authentication to take
place, but do not setup a session key.

Andrew Bartlett
(This used to be commit e5abd93d79)
2004-01-03 01:12:56 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Andrew Bartlett
adc07646a3 Move our basic password checking code from inside the authentication
subsystem into a seperate file - ntlm_check.c.

This allows us to call these routines from ntlm_auth.  The purpose of this
exercise is to allow ntlm_auth (when operating as an NTLMSSP server) to
avoid talking to winbind.  This should allow for easier debugging.

ntlm_auth itself has been reorgainised, so as to share more code between
the SPNEGO-wrapped and 'raw' NTLMSSP modes.  A new 'client' NTLMSSP mode
has been added, for use with a Cyrus-SASL module I am writing (based on vl's
work)

Andrew Bartlett
(This used to be commit 48315e8fd2)
2003-12-30 07:33:58 +00:00
Andrew Bartlett
5dff713735 Shutting down the connection closes outstanding sessions, so we don't need
to do it twice...

Amdrew Bartlett
(This used to be commit 8f9a069c59)
2003-12-28 09:57:29 +00:00
Andrew Bartlett
f73492a58a This patch corrects some errors in the NTLMSSP implementation, that
would incorrectly return INVALID_PARAMETER, instead of allowing a
login.

Andrew Bartlett
(This used to be commit 76c59469a3)
2003-12-27 11:33:24 +00:00
Volker Lendecke
82027c1ea2 Preliminary fix for our signing problem with failed NTLMSSP logins. This patch
solves the problem for me here, I can still successfully set up signing using
NTLMSSP against w2k3 and it does not show a signing error anymoe when the
password was wrong.

Jeremy, you might want to take a further look at it as this is not
particularly elegant.

Volker
(This used to be commit f5afaafd61)
2003-12-27 10:11:26 +00:00
Jeremy Allison
68e692738b Add in comments explaining NTLMv2 selection. Use lm session key if that's
all there is.
Jeremy.
(This used to be commit b611f8d170)
2003-12-17 21:57:26 +00:00
Jeremy Allison
93a983b7cb Tidyup debug message in ntlmssp code. Add brackets around dodgy if statement.
Jeremy
(This used to be commit 5aab4b976c)
2003-12-17 20:11:39 +00:00
Gerald Carter
54cff4535e Make sure we correctly generate the lm session key.
This fixes a problem joining a Samba domain from a
vanilla win2k client that doesn't set the
NTLMSSP_NEGOTIATE_NTLM2 flag.

Reported on samba ml as "decode_pw: incorrect password length"
when handling a samr_set_userinfo(23 or 24) RPC.
(This used to be commit ef4ab8d7c4)
2003-12-17 06:18:13 +00:00
Jeremy Allison
ee17580c85 Make intent to return only one address clear.
Jeremy.
(This used to be commit d3d0353bae)
2003-12-09 02:29:27 +00:00
Steve French
1f761ad395 Fix incorrect smb flags2 for connections to pre-NT servers (causes smbclient to
fail to OS2 for example)
(This used to be commit 54e2fcb8f4)
2003-12-04 21:26:14 +00:00
Andrew Bartlett
88dad93acb Picked up by the build farm - despite all my efforts, security=server was
broken by my NTLM2 commit.  This should correctly cause the NTLM2 case
not to be negotiated when 'security=server' is in effect.

Andrew Bartlett
(This used to be commit 19bb4b582f)
2003-12-04 04:16:16 +00:00
Jeremy Allison
026e476258 Client connect signing error messages should be level zero else
they're easy to miss.
Jeremy.
(This used to be commit 7fa89b0937)
2003-12-01 22:55:43 +00:00
Jeremy Allison
f7dfa789c1 Fix spurious error msg. when seq=0.
Jeremy
(This used to be commit 4912ad8f18)
2003-12-01 06:59:54 +00:00
Jeremy Allison
b4fa65d0ad Ensure we use the same mid for the secondary trans requests, W2K3
does this.
Jeremy.
(This used to be commit 8adf0cd27a)
2003-12-01 03:24:50 +00:00
Jeremy Allison
12d3246a6c Better fix for client signing bug. Ensure we don't malloc/free trans signing
state info each packet.
Jeremy.
(This used to be commit 818cf32d63)
2003-12-01 01:04:04 +00:00