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

227 Commits

Author SHA1 Message Date
Andrew Tridgell
cfdd3e68be r1631: don't use req->transport after req has been destroyed
(This used to be commit 35f4ad4700de25085a2d0e5d0f9674ca2e606cd1)
2007-10-10 12:57:45 -05:00
Andrew Tridgell
27ce337277 r1618: fixed the receipt of multi-part replies to SMBtrans2
(This used to be commit bd4106a8e57fc98d1feddc01b58f87f68164247a)
2007-10-10 12:57:44 -05:00
Andrew Bartlett
f1a215f5cb r1604: Samba4 avoids memcpy() as much as possible - we don't need to make a copy here.
Andrew Bartlett
(This used to be commit 9efc94eeafbf0eb4488c53a1456cc7026c937f9f)
2007-10-10 12:57:43 -05:00
Andrew Tridgell
2de2ead42d r1603: fixed in.size to not overstate the packet size by 4 bytes
my apologies to abartlett for thinking this was his bug!
(This used to be commit 6edbc55ddd2fc0d4686ec3075ba9bfc72ac24315)
2007-10-10 12:57:43 -05:00
Andrew Tridgell
b5061894dc r1602: make sure we honor the use_spnego flag
(This used to be commit de764d9004a0d90479158e78e30b1266eb529e3e)
2007-10-10 12:57:43 -05:00
Andrew Tridgell
5ddf678e01 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.
(This used to be commit 96bf4da3edc4d64b0f58ef520269f3b385b8da02)
2007-10-10 12:57:42 -05:00
Stefan Metzmacher
d093b7e777 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
(This used to be commit 0bb50dcf1ccb9797000fcbea4d8a73f2d2a3db77)
2007-10-10 12:57:41 -05:00
Andrew Bartlett
b3c46674a6 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
(This used to be commit 35b83eb329482ac1b3bc67285854cc47844ff353)
2007-10-10 12:57:39 -05:00
Stefan Metzmacher
ad8d0190f1 r1494: fix debug message
metze
(This used to be commit 463982bf3f37bac67e1aaa488e4142d0ecc23307)
2007-10-10 12:57:35 -05:00
Andrew Bartlett
ed03516c91 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
(This used to be commit de5da669397db4ac87c6da08d3533ca3030da2b0)
2007-10-10 12:57:34 -05:00
Stefan Metzmacher
bff4e6963c r1469: fix a segfault and compiler warning,
introduced by the "compiler warning fix" in rev 1460...

metze
(This used to be commit ffb7ba35cdb2fb19b8271a3585eef075948bef9c)
2007-10-10 12:57:33 -05:00
Andrew Bartlett
88002b851b 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
(This used to be commit cea578d6f39a2ea4a24e7a0064c95193ab6f6df7)
2007-10-10 12:57:32 -05:00
Andrew Bartlett
e053c719ab r1460: Avoid a compile warning.
Andrew Bartlett
(This used to be commit 10a973da88441b255eda7cbc263ef5c4f2f0fcae)
2007-10-10 12:57:32 -05:00
Stefan Metzmacher
2c87cb390d r1409: if we have no user name don't use extended security
the capabilities in the union smb_sesssetup should be used to decide
if we can use extented security

metze
(This used to be commit e3760fcc17cc645d942f0fc7f7325976391309ea)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
0fa2b94c56 r1406: I got spnego in the smb client working
so I set 'use spnego = True'

metze
(This used to be commit e06898f88c82c286574f9d73de1a9de829b1ded8)
2007-10-10 12:56:54 -05:00
Stefan Metzmacher
1828f5d506 r1348: get gensec backend by OID instead of name
metze
(This used to be commit 38e00f87191b86901b603e66aec1e7e71f74c29f)
2007-10-10 12:56:51 -05:00
Stefan Metzmacher
4f0e5e0690 r1345: add extended security spnego support to the smb client
code

set lp_use_spnego = False, because I can't get it working yet
but I commit it so others can help me

metze
(This used to be commit 2445cceba9ab9bd928c8bc50927a39509e4526b0)
2007-10-10 12:56:51 -05:00
Tim Potter
37fcf22364 r1268: varient -> variant
(This used to be commit de5984c95602ca67e8ac3139c3aa4330b74266e0)
2007-10-10 12:56:46 -05:00
Andrew Bartlett
bf598954f7 r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts.
I have moved the SPNEGO and Kerberos code into libcli/auth, and intend
to refactor them into the same format as NTLMSSP.

Andrew Bartlett
(This used to be commit 58da78a7460d5d0a4abee7d7b84799c228e6bc0b)
2007-10-10 12:56:44 -05:00
Jeremy Allison
73c077d37b r1091: Added in timing tests for deferred opens. Added extra debug info to signing
mistakes.
Jeremy.
(This used to be commit 5c3a2417cfe1bdbdfb35d933d49f77f6696790b3)
2007-10-10 12:56:37 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
98d291423f r961: convert 'uchar' to 'uint8_t'
metze
(This used to be commit 9f914e4af99e18b469d4cf9d8b1514a2bd28ddec)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
2007-10-10 12:56:21 -05:00
Andrew Tridgell
47864891ff r893: a few more _t conversions
(This used to be commit 66eb46dbb1486c5916194bf6b303cf16373a272a)
2007-10-10 12:56:18 -05:00
Gerald Carter
e80dad7561 r891: fix compile
(This used to be commit 8b6c048a02b4be0ba9c67ed82973041dccdd5c51)
2007-10-10 12:56:17 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2007-10-10 12:56:15 -05:00
Andrew Tridgell
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
2007-10-10 12:56:14 -05:00
Andrew Bartlett
6b921d1d21 r719: Follow the trend - remove more unused functions.
Andrew Bartlett
(This used to be commit 62eef851fd79b2739b93b4ed7829514a3dcbf1d0)
2007-10-10 12:53:45 -05:00
Andrew Bartlett
dce84ffd37 r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.
- This required using NETLOGON_NEG_AUTH2_FLAGS for the
    SetupCredentials2 negotiation flags, which is what Samba3 does,
    because otherwise the server uses different crypto.
  - This tests the returned session keys, which we decrypt.

 - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in
   most places.

 - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is
   available.

 - Remove a useless argument to SMBsesskeygen_ntv1

 - move netr_CredentialState from the .idl to the new credentials.h

Andrew Bartlett
(This used to be commit 44f8b5b53e6abd4de8a676f78d729988fadff320)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
493a37ba66 r335: added much better handling of servers that die unexpectedly during a
request (a dead socket). I discovered this when testing against Sun's
PC-NetLink.

cleaned up the naming of some of the samr requests

add IDL and test code for samr_QueryGroupMember(),
samr_SetMemberAttributesOfGroup() and samr_Shutdown().  (actually, I
didn't leave the samr_Shutdown() test in, as its fatal to windows
servers due to doing exactly what it says it does).
(This used to be commit 925bc2622c105dee4ffff809c6c35cd209a839f8)
2007-10-10 12:51:33 -05:00
Jeremy Allison
763c4bc9ac r204: Turns out that the string in the SEARCH unix_info level is that
rare thing, a non-length string (ie. not a WIRE_STRING) but a null
terminated char string. There wasn't a good interface to pull that
out of a blob (all the string interfaces assumed WIRE_STRINGS). Added
a new one, only used for this call. Sucks, I know - but the alternatives
suck more. Added tests for some of the unix info returned.
Jeremy.
(This used to be commit 4d0ed04c54b105789ffd32334c3b0e544f02418c)
2007-10-10 12:51:16 -05:00
Jeremy Allison
00cedc0c04 r189: Added UNIX search into tests - added client library parse code.
Jeremy.
(This used to be commit a25ae9addbb362abf67a0cbd6e62bf4cbe06d8b7)
2007-10-10 12:51:15 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4da1841653624fe304b1c8d812c0fdd9)
2007-10-10 12:51:11 -05:00
Andrew Tridgell
a8a42e7f53 r100: remember the user session key during session setup so it can be used in various crypto
routines
(This used to be commit f6cf9020c8899e784385ea0e14fa465685441ee6)
2007-10-10 12:51:06 -05:00
Andrew Tridgell
f169d83a8b fixed the handling of level II oplocks in samba4, especially when
acting as a cifs redirectory (using the cifs backend)
(This used to be commit 06a8100e6a2f3f079af5b6ec32d87d1d25f56c3c)
2004-03-25 02:41:19 +00:00
Andrew Tridgell
14591dc0ea fixed two writex client bugs
- always use the 14 word writex varient even for small transfers as
   long as large offsets are negotiated (this matches windows
   behaviour)

 - make sure we fill in the top 16 bits of the count for large writex
   calls
(This used to be commit 9ea20d0c9a1cb4800f3f54195cbbe70c98c8e423)
2004-03-08 07:11:13 +00:00
Andrew Tridgell
6c7e231773 fixed a problem with the smb client code spinning when the connection
is lost. We now close the cli_transport when there is a socket io
error
(This used to be commit 138cb5f2f5f8ce1479ac687d18e6a0e355e55b7f)
2004-02-21 04:02:00 +00:00
Stefan Metzmacher
670ccc7d64 merge:
ldap and krb5 configure tests
libads/*.c and libcli/raw/clikrb5.c from 3.0

metze
(This used to be commit 64b5bfcd73d7626d6f687a641b11e64821144df7)
2004-02-01 11:26:25 +00:00
Andrew Tridgell
ff4a146168 * fixed a segv when -U is not used in smbtorture.
* fixed the handling of anonymous logins
(This used to be commit 7cbc4ad8710ad33387145bfc9974d0ed4b0fb231)
2004-01-15 23:19:07 +00:00
Tim Potter
7db3bbc048 Autodetect service_type in cli_tree_full_connection() if the caller
passes in NULL.
(This used to be commit b63ebaa770940a276ab63583a13d8cc349b6efe6)
2004-01-02 01:04:59 +00:00
Andrew Tridgell
24c22aef90 a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.

In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.

I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.

The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
(This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2)
2003-12-16 09:02:58 +00:00
Andrew Tridgell
fcc4efd1ea the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers.
(This used to be commit 4929c53bc8dddda8a763fdfbcf81a79776d01113)
2003-12-11 09:07:45 +00:00
Andrew Tridgell
926240428c * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
(This used to be commit f2d3dc9893fa0e089c407fa16ce9ff13587e70cd)
2003-12-04 02:03:06 +00:00
Andrew Tridgell
3e0501082c fixed default port handling pointed out by Tom Jansen
(This used to be commit 8246e6ca0bd0eaa92de602db46a119d368e93391)
2003-11-26 21:57:29 +00:00
Andrew Tridgell
940ce958a6 make the socket send code a little clearer
(This used to be commit 48028fbb856ea7ee642f36ba9ed0d5815763f52b)
2003-11-20 00:36:10 +00:00
Andrew Tridgell
e1e98ab049 updated copyright year
(This used to be commit 4dcc06d04c67c6e063c5b2a88f693423c77f342d)
2003-11-19 23:17:55 +00:00
Andrew Tridgell
59df3ce5b5 security descriptors are no longer a "special" type, they are handled
using the [relative] property

this also fixes level3 of PrinterInfo (a relative secdesc)
(This used to be commit d5a15257fdd5f6cfe2706765a7c29f623ec1c6f8)
2003-11-17 06:27:45 +00:00
Andrew Tridgell
bf48b6e69a added OpenPrinter and a test function. Note that the Samba3 structure
for OpenPrinter was wrong.
(This used to be commit 186ddbbf8774d0960852ea9186c8e4e6f7be7a0f)
2003-11-17 03:38:13 +00:00