1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-16 20:23:50 +03:00
Commit Graph

216 Commits

Author SHA1 Message Date
Andrew Bartlett
c91d6b6f9b r1724: Add a new function to return the list of available OIDs.
(Used in our SPNEGO code).

Andrew Bartlett
2007-10-10 12:57:50 -05:00
Andrew Bartlett
6da7b65851 r1723: Make sure we bail out on error in reading a OID.
Andrew Bartlett
2007-10-10 12:57:50 -05:00
Andrew Tridgell
566b7a9ce9 r1712: this should fix a bug with a spinning client when a server dies
unexpectedly. bug found by abartlett.
2007-10-10 12:57:50 -05:00
Andrew Bartlett
64fcd8eceb r1686: Don't use a void* for the context inside the SMB signing code.
Andrew Bartlett
2007-10-10 12:57:48 -05:00
Andrew Bartlett
0e4e3647e8 r1685: Add the ability to lookup RPC auth types for the RPC-MGMT torture test.
Andrew Bartlett
2007-10-10 12:57:48 -05:00
Andrew Tridgell
8685a584c9 r1676: - improved the handling of username/password in locktest and gentest
- use lp_maxprotocol() in the libcli/raw/ negotiate code, so we obey
  the smb.conf "max protocol" option

- better handling of -M option in masktest
2007-10-10 12:57:48 -05:00
Andrew Tridgell
17a3315297 r1674: fixed a bug in the handling of STR_LEN8BIT flagged strings 2007-10-10 12:57:48 -05:00
Stefan Metzmacher
8441750fd9 r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
2007-10-10 12:57:47 -05:00
Andrew Tridgell
326fdc8c9d r1635: when a transport dies, setup errors for all pending sends and recvs, plus disalllow any more sends 2007-10-10 12:57:45 -05:00
Andrew Tridgell
81c450b434 r1634: to get signing right for async requests we must send requests in
order. Fixed the linked list add to always add to the end for outgoing
requests.
2007-10-10 12:57:45 -05:00
Andrew Tridgell
d7e2f39b90 r1633: fixed a couple of async oplock handling errors 2007-10-10 12:57:45 -05:00
Andrew Tridgell
35f4ad4700 r1631: don't use req->transport after req has been destroyed 2007-10-10 12:57:45 -05:00
Andrew Tridgell
e8d4b39088 r1630: - fixed the replacement timegm() function to work correctly for DST changes
- got rid of global_myname(), using lp_netbios_name() instead
2007-10-10 12:57:45 -05:00
Andrew Tridgell
48b5b740f1 r1627: make sure we initialise write_time in the deprecated function cli_ctemp() 2007-10-10 12:57:44 -05:00
Andrew Tridgell
daa9648b3f r1619: - add support for older systems to cli_list*()
- make cli_list_new() use the last_name continue method rather than
   the trans2 findnext continue flag, as the continue flag is broken on
   win2003 (win2003 sometimes misses up to 1/3 of all files in a directory)
2007-10-10 12:57:44 -05:00
Andrew Tridgell
bd4106a8e5 r1618: fixed the receipt of multi-part replies to SMBtrans2 2007-10-10 12:57:44 -05:00
Andrew Bartlett
8a0f7bf5e2 r1605: GENSEC krb5 updates - fix a valgrind found uninitialised variable, and
allow tests for 'unwrapped' krb5, allowed by Win2k3.

SPENGO changes, trying to get the logic right (when and what
sub-mechanisms to wrap).

Andrew Bartlett
2007-10-10 12:57:44 -05:00
Andrew Bartlett
9efc94eeaf r1604: Samba4 avoids memcpy() as much as possible - we don't need to make a copy here.
Andrew Bartlett
2007-10-10 12:57:43 -05:00
Andrew Tridgell
6edbc55ddd r1603: fixed in.size to not overstate the packet size by 4 bytes
my apologies to abartlett for thinking this was his bug!
2007-10-10 12:57:43 -05:00
Andrew Tridgell
de764d9004 r1602: make sure we honor the use_spnego flag 2007-10-10 12:57:43 -05:00
Andrew Tridgell
96bf4da3ed r1578: the first stage of the async client rewrite.
Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
2007-10-10 12:57:42 -05:00
Stefan Metzmacher
0bb50dcf1c r1547: rename 'enum <bla>_level' -> 'enum smb_<bla>_level'
e.g. we now have 'union smb_mkdir' and 'enum smb_mkdir_level' in sync

we may should also rename 'RAW_MKDIR_*' -> 'SMB_MKDIR_*'

metze
2007-10-10 12:57:41 -05:00
Andrew Bartlett
35b83eb329 r1521: Updates to our SMB signing code.
- This causes our client and server code to use the same core code,
  with the same debugs etc.
- In turn, this will allow the 'mandetory/fallback' signing algorithms
  to be shared, and only written once.

Updates to the SPNEGO code
- Don't wrap an empty token to the server, if we are actually already finished.

Andrew Bartlett
2007-10-10 12:57:39 -05:00
Andrew Bartlett
b97d3cb2ef r1498: (merge from 3.0)
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().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
65147f5aa2 r1497: add forward declaration for struct auth_session_info
(fix compiler warning)

metze
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
463982bf3f r1494: fix debug message
metze
2007-10-10 12:57:35 -05:00
Andrew Bartlett
30d88580ef r1476: Don't print messages about the CCACHE not being found - this is normal.
Andrew Bartlett
2007-10-10 12:57:34 -05:00
Andrew Bartlett
de5da66939 r1475: More kerberos work
- We can now connect to hosts that follow the SPNEGO RFC, and *do not*
give us their principal name in the mechListMIC.
 - The client code now remembers the hostname it connects to

- We now kinit for a user, if there is not valid ticket already

- Re-introduce clock skew compensation

TODO:
 - See if the username in the ccache matches the username specified
 - Use a private ccache, rather then the global one, for a 'new' kinit
 - Determine 'default' usernames.
  - The default for Krb5 is the one in the ccache, then $USER
  - For NTLMSSP, it's just $USER

Andrew Bartlett
2007-10-10 12:57:34 -05:00
Stefan Metzmacher
ffb7ba35cd r1469: fix a segfault and compiler warning,
introduced by the "compiler warning fix" in rev 1460...

metze
2007-10-10 12:57:33 -05:00
Stefan Metzmacher
9a876be76c r1467: disable gensec_krb5 by default till abartlet
add the kinit code

metze
2007-10-10 12:57:33 -05:00
Andrew Tridgell
ea5659b051 r1466: the name "oid" is taken by some silly system headers - avoid it in our code 2007-10-10 12:57:33 -05:00
Stefan Metzmacher
fc8d00b8ab r1463: fix the krb5 build
metze
2007-10-10 12:57:32 -05:00
Andrew Bartlett
cea578d6f3 r1462: GENSEC Kerberos and SPENGO work:
- Spelling - it's SPNEGO, not SPENGO
 - SMB signing - Krb5 logins are now correctly signed
 - SPNEGO - Changes to always tell GENSEC about incoming packets, empty or not.

Andrew Bartlett
2007-10-10 12:57:32 -05:00
Andrew Bartlett
67ac960066 r1461: ntlm_check.c is a server-side peice of code, so it belongs in AUTH.
Andrew Bartlett
2007-10-10 12:57:32 -05:00
Andrew Bartlett
10a973da88 r1460: Avoid a compile warning.
Andrew Bartlett
2007-10-10 12:57:32 -05:00
Andrew Bartlett
893a9a3865 r1457: Add the GSSAPI layer to our gensec_krb5 code.
Andrew Bartlett
2007-10-10 12:56:58 -05:00
Jelmer Vernooij
7e9884799e r1451: More missing files... 2007-10-10 12:56:58 -05:00
Jelmer Vernooij
eaa2940ba0 r1450: Oops.. Missing files :-) 2007-10-10 12:56:57 -05:00
Jelmer Vernooij
69de0d95c5 r1449: Use the config system somewhat better in libcli/auth 2007-10-10 12:56:57 -05:00
Andrew Bartlett
1164be10af r1448: Indent this so proto doesn't pick it up.
Andrew Bartlett
2007-10-10 12:56:57 -05:00
Andrew Bartlett
b97ea8a63f r1447: Fix compile.
Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
310a570936 r1446: Another funciton to avoid in proto.h
Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
159c234589 r1445: Ensure get_auth_data_from_tkt doesn't get into proto.h
Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
64e99170c3 r1443: More changes towards Kerberos in Samba4's GENSEC.
The kerberos context is now tied in life to the GENSEC context.

Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
3e9aa67e3f r1442: I was going to rename kerberos.c -> kerberos_kinit.c, but didn't.
Fix config.mk...

(oh, and this file is somehow marked as binary...)

Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
231e505dea r1441: Indentation and comment fixes.
Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
1c31aa4271 r1440: GENSEC improvements:
- Infrustructure for kerberos
 - Don't segfault on un-implemented backend functions
 - Add comments.

Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
e48557158e r1439: Once we are authenticated, always return NT_STATUS_OK. (Makes SPENGO
easier to code, as it may return an 'ok' with an empty blob).

Andrew Bartlett
2007-10-10 12:56:56 -05:00
Andrew Bartlett
06b997c826 r1438: Record the principal name we are sent in the SPENGO mechListMIC in a
seperate char *, not a DATA_BLOB.

This allows us to tell if we were sent a string here, or a real MIC.
2007-10-10 12:56:56 -05:00
Andrew Bartlett
eb0dd4a821 r1437: Intermediate commit of krb5 for GENSEC.
The session key in the client is wrong, we don't do signing/sealing
and we are sending raw Kerberos, not GSSAPI.

But it's a start, and if we continue to have to call Krb5 directly,
this will be the basis.

I also intend to provide an alternate implementation, using just
GSSAPI.

Andrew Bartlett
2007-10-10 12:56:56 -05:00