1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-23 20:59:10 +03:00
Commit Graph

111 Commits

Author SHA1 Message Date
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
4868e42027 r6020: Never do NT status codes with protocols before NT1 as we don't get client caps.
Jeremy.
2007-10-10 10:56:16 -05:00
19a639ac46 r5952: BUG 2469: patch from Jason Mader to cleanup compiler warning when not using krb5 2007-10-10 10:56:11 -05:00
3e10c36cb5 r5290: Fix for bug #2323 - plaintext problem with WinXP.
Jeremy.
2007-10-10 10:55:36 -05:00
65dfae7ea4 r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use consistent
enum type for Protocol extern.
Jeremy.
2007-10-10 10:53:26 -05:00
e1364ff774 r1370: BUG 1297 - prevent map_username() from being called twice during logon 2007-10-10 10:52:08 -05:00
9d5821d5ee r1122: As spotted by lha@stacken.kth.se we don't actually use this variable any more.
Andrew Bartlett
2007-10-10 10:51:56 -05:00
4695cc95fe r786: Memory leak fixes in (mostly) error code paths from
kawasa_r@itg.hitachi.co.jp. A couple of mem leak fixes in
mainline code paths though :-).
Jeremy.
2007-10-10 10:51:38 -05:00
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
40b5794ae0 r59: revert session key problem 2007-10-10 10:51:06 -05:00
26d8791dde r49: Support SMB signing on connections using only the
LANMAN password.  This also corrects the 'session key'
for these connections.
2007-10-10 10:51:06 -05:00
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
-
a90c3bd281 BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were -
f2eaa14b1e BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes -
493ac5ce98 Patch by Luca Bolcioni <Luca.Bolcioni@yacme.com>. Ensure we always
initialise the session key.  Fixes segfaults with security=server, and
encrypt passwords = no.

Andrew Bartlett
-
3d9931fe29 reply_spnego_kerberos did not set the domain of the user handed to
register_vuid correctly. We ended up with the local netbios name in
substitutions for %D later.

Volker

P.S: Tridge, I can *really* see why you want to get rid of global variables
:-)
-
8e20c06ed3 Fix from Luke Howard <lukeh@PADL.COM> for incorrect early free().
Jeremy.
-
3ce6c9f273 Commit the translation of the realm to the netbios domain name in the kerberos
session setup. After talking to jht and abartlet I made this unconditional, no
additional parameter.

Jerry: This is a change in behaviour, but I think it is necessary.

Volker
-
ba0b5b8c9b Fix for bug #815. Make plaintext unicode passwords work with NT4.x
Jeremy.
-
2f43a1c166 fix %a variable for Windows 2003 -> Win2K3 -
4e73faa7b4 Subtract NT_STATUS from common flag, don't add it...
Jeremy.
-
0d82ac57a5 Don't automatically set nt status code flag unless client tells us it can
cope.
Jeremy.
-
f3bbc87b0d Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
-
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
-
62ed2598b3 more 2.2.x compatibility fixes - allow user looksup in the kerb5
sesssetup to fall back to 'user' instaed of failing is REA.LM\user
doesn't exist.

also fix include line in smb_acls.h as requested by metze
-
afbf15f941 Fix memleak. -
ae452e51b0 metze's autogenerate patch for version.h -
a83506802f Win2k never returns 'no such user' here, so when we do it, the clients freak
out.  Return the standard 'logon failure' instead.

Andrew Bartlett
-
d8ab446859 Fix memleaks.
Currently I'm compiling against MIT Kerberos 1.2.8.

Anthony, you said you have a heimdal installation available. Could you
please compile this stuff with krb and check it with valgrind?

Thanks,

Volker
-
ce5b8d2ec2 In ads_verify_realm, all we use in the ADS_STRUCT is the
auth.realm. So directly pass that instead of setting up and tearing
down the ADS_STRUCT.

Volker
-
a2bd8f0bfa Update my copyrights according to my agreement with IBM -
731420b03d only honor the first OID in the sessetup snego negotiate. Deviates
from RFC but I'm smelling a client bug here.

	/* only look at the first OID for determining the mechToken --
	   accoirding to RFC2478, we should choose the one we want
	   and renegotiate, but i smell a client bug here..

	   Problem observed when connecting to a member (samba box)
	   of an AD domain as a user in a Samba domain.  Samba member
	   server sent back krb5/mskrb5/ntlmssp as mechtypes, but the
	   client (2ksp3) replied with ntlmssp/mskrb5/krb5 and an
	   NTLMSSP mechtoken.                 --jerry              */
-
79e0bf8298 Start the packet signing engine in the kerberos case in the same place
as the ntlmssp case.
Jeremy.
-
59dae1da66 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
-
ba4d334b82 More printf fixes - size_t is long on some architectures. -
eff74a1fcc Server side NTLM signing works - until the first async packet. Working on this
next....
Jeremy.
-
9f835b85dd convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
-
e5714edc23 Signing so far... the client code fails on a SMBtrans2 secondary transaction
I think (my changes haven't affected this I believe). Initial support on the
server side for smbclient. Still doesn't work for w2k clients I think...
Work in progress..... (don't change).
Jeremy.
-
c390b3e4cd Added the "required" keyword to the "client signing" parameter to force it
on. Fail if missmatch. Small format tidyups in smbd/sesssetup.c. Preparing
to add signing on server side.
Jeremy.
-
30bbf4c8c4 It seems only NT4 does the VC == 0 session drop code.
Jeremy.
-
bf0916e1da Correct (?) handling for VC = 0. Trying to fix XP logoff leaving resources
around.
Jeremy.
-
48c8211084 volker's add_signature() fix; must pass the beginning on the outbuf to get the flags field -
e7d635af80 fix for UNICODE plaintext passwords (bug #59) and fix smbclient to send the unicode plain text password if negoitated -
d7ca85613b really make sure to include the version in the lanman string; tested spnego using smbclient -
865c112756 spelling -
8dcc008999 Fix uninitialized blobs reported by Luke Howard.
Jeremy.
-
dade462a16 add version back to lanman string in sessetup reply -
8f8d819d58 Merge comment with HEAD -
3f9616a68a Merge from HEAD - sync up SessionSetup code to HEAD, including Luke Howard's
session key and auth verifier patches.

Andrew Bartlett
-
7bc5fc729f fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before dereferencing -