1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

104 Commits

Author SHA1 Message Date
Stefan Metzmacher
2986c5f08c r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
af6f1f8a01 r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
0e5517d937 r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
2007-10-10 12:56:15 -05:00
Andrew Bartlett
399e2e2b11 r874: This patch is a pile of work on NTLMSSP:
Samba's NTLMSSP code is now fully talloc based, which should go a long
way to cleaning up the memory leaks in this code.  This also avoids a
lot of extra copies of data, as we now allocate the 'return' blobs on
a caller-supplied context.

I have also been doing a lot of work towards NTLM2 signing and
sealing.  I have this working for sealing, but not for the verifier
(MD5 integrity check on the stream) which is still incorrect.

(I can aim a rpcecho sinkdata from a Win2k3 box to my server, and the
data arrives intact, but the signature check fails.  It does however
match the test values I have...).

The new torture test is cludged in - when we get a unit test suite
back, I'll happliy put it in the 'right' place....

Andrew Bartlett
2007-10-10 12:56:14 -05:00
Andrew Tridgell
9a9244a1c6 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.
2007-10-10 12:56:14 -05:00
Andrew Bartlett
f9f581b580 r754: Implement the SetPassword operation on the netlogon pipe.
This involves allowing the password set code in samdb to take an
already hashed password, and some fixes to our torture code.

Andrew Bartlett
2007-10-10 12:53:48 -05:00
Andrew Bartlett
94624e519b r743: Start on a NETLOGON server in Samba4.
Currently this only authentiates the machine, not real users.

As a consequence of running the Samba4 NETLOGON test against Samba4, I
found a number of issues in the SAMR server, which I have addressed.
There are more templates in the provison.ldif for this reason.

I also added some debug to our credentials code, and fixed some bugs
in the auth_sam module.

The static buffer in generate_random_string() bit me badly, so I
removed it in favor of a talloc based system.

Andrew Bartlett
2007-10-10 12:53:46 -05:00
Andrew Bartlett
62eef851fd r719: Follow the trend - remove more unused functions.
Andrew Bartlett
2007-10-10 12:53:45 -05:00
Andrew Tridgell
a9768c25fd r718: removed some more unused code, and two source files 2007-10-10 12:53:44 -05:00
Andrew Bartlett
1a53e5c829 r708: Clean up copyright headers, to reflect code that has come and gone
over time.

Andrew Bartlett
2007-10-10 12:53:44 -05:00
Stefan Metzmacher
d0145cec9f r702: fix krb5 linking
metze
2007-10-10 12:53:43 -05:00
Stefan Metzmacher
b054f7d490 r697: make use of SMB_EXT_LIB for LDAP and KRB5
metze
2007-10-10 12:53:43 -05:00
Stefan Metzmacher
c78a2ddb28 r665: merge over the new build system from my tmp branch
to the main SAMBA_4_0 tree.

NOTE: that it's not completely ready, but it's functional:-)

metze
2007-10-10 12:53:36 -05:00
Andrew Bartlett
e4355a7ec1 r611: Fix breakage from my last commit:
Now that all session keys are DATA_BLOBs, fix the callers.

This assumes some things about the behaviour of certain crypto
algorithms, without the ability to test it on session keys != 16 bytes
in length.  We will just need to retest when we get the KRB5 support
in (DES keys are 8 bytes).

Andrew Bartlett
2007-10-10 12:51:51 -05:00
Andrew Bartlett
44f8b5b53e 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
2007-10-10 12:51:51 -05:00
Andrew Bartlett
c63eb35b45 r451: More NTLMSSP work.
The work here is trying to get the LM_KEY option for NLTMSSP
operating, however until that functions properly, it is now controlled
by some new smb.conf options, defaulting off.

Andrew Bartlett
2007-10-10 12:51:43 -05:00
Andrew Bartlett
5876c78806 r443: Update Samba4 to the auth and NTLMSSP code from Samba3.
Not all the auth code is merged - only those parts that are actually
being used in Samba4.

There is a lot more work to do in the NTLMSSP area, and I hope to
develop that work here.  There is a start on this here - splitting
NTLMSSP into two parts that my operate in an async fashion (before and
after the actual authentication)

Andrew Bartlett
2007-10-10 12:51:42 -05:00
Andrew Tridgell
925bc2622c 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).
2007-10-10 12:51:33 -05:00
Andrew Tridgell
548ec1efef r324: - don't reseed on every password generate
- check for overflow (very unlikely) in random buffer generation
2007-10-10 12:51:32 -05:00
Andrew Tridgell
051efa2abf r305: - added IDL and test code for samr_RidToSid()
- completed the IDL and test code for the various set user password
  mechanisms in samr. Three password mechanisms are now working, the
  UserInfo24 method, the OemChangePasswordUser2() method (which only
  sets the LM password) and the ChangePasswordUser2() method which sets
  both the LM and NT passwords.

- updated some crypto routines to support the password change tests
2007-10-10 12:51:19 -05:00
Andrew Tridgell
849d0d314a r275: added IDL and test code for samr_QueryDisplayInfo3(),
samr_AddMultipleMembersToAlias(),
samr_RemoveMultipleMembersFromAlias(), samr_OemChangePasswordUser2(),
and samr_ChangePasswordUser2()

The password change functions don't actually work yet (but should
soon). At this stage I have just completed the IDL for them. Next step
is to get the hash verifiers right and the torture test should be able
to do password changes.
2007-10-10 12:51:19 -05:00
Andrew Tridgell
117aa5cab7 r265: fixed a bug in the string to sid conversion code 2007-10-10 12:51:18 -05:00
Jeremy Allison
4d0ed04c54 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.
2007-10-10 12:51:16 -05:00
Jeremy Allison
a25ae9addb r189: Added UNIX search into tests - added client library parse code.
Jeremy.
2007-10-10 12:51:15 -05:00
Andrew Tridgell
af34710d4d 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.
2007-10-10 12:51:11 -05:00
Andrew Tridgell
37d0efa9c2 r101: added lsa_SetSecret() and lsa_QuerySecret()
this required some crypto infrastructure and some sid utilities
2007-10-10 12:51:06 -05:00
Andrew Tridgell
f6cf9020c8 r100: remember the user session key during session setup so it can be used in various crypto
routines
2007-10-10 12:51:06 -05:00
Gerald Carter
11717ae912 r42: importing .cvsignore files 2007-10-10 12:50:40 -05:00
Andrew Tridgell
25b7ec390a r23: get rid of def_finfo 2007-10-10 12:50:33 -05:00
Andrew Tridgell
06a8100e6a fixed the handling of level II oplocks in samba4, especially when
acting as a cifs redirectory (using the cifs backend)
-
Andrew Tridgell
9ea20d0c9a 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
-
Tim Potter
f172b6f1d0 The file descriptor argument to cli_getattrE() is a fnum not a fd. -
Andrew Tridgell
138cb5f2f5 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
-
Stefan Metzmacher
a25c167b3f move more code to the config.m4 scheme
LIBBASIC, LIBSMB are the new global subsystems

metze
-
Tim Potter
54cb508c78 Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
-
Andrew Tridgell
05db0b9d94 - modified the dcerpc client security code to be generic, so ntlmssp
and schannel are both instances of possible security modules

- added schannel sign and sign/seal support to the dcerpc client
  code. You select it with binding options of "schannel,sign" or
  "schannel,seal".
-
Tim Potter
db1cc96af6 Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface.

Part 2 will be to eliminate cli_state from smbtorture as this is now
the only place where it is used.
-
Stefan Metzmacher
64b5bfcd73 merge:
ldap and krb5 configure tests
libads/*.c and libcli/raw/clikrb5.c from 3.0

metze
-
Andrew Tridgell
7cbc4ad871 * fixed a segv when -U is not used in smbtorture.
* fixed the handling of anonymous logins
-
Tim Potter
b63ebaa770 Autodetect service_type in cli_tree_full_connection() if the caller
passes in NULL.
-
Andrew Tridgell
bb1af644a5 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.
-
Andrew Tridgell
a1275c1e89 make sure we allow clients to negotiate ntlmssp seal if they want it -
Andrew Tridgell
4929c53bc8 the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers.
-
Andrew Tridgell
f2d3dc9893 * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
-
Andrew Tridgell
983c0e9683 added netr_DatabaseSync(). It doesn't work as I haven't done schannel
yet, but at least the request is understood by w2k3

Also modified pidl to allow multiple branches in a union to have the
same element. This is used in netlogon.
-
Andrew Tridgell
3c7287c24e another big improvement in the credentials API. I think it now
actually makes sense, and as a nice side effect it matches the debug
output of the w2k3 netlogon.log
-
Andrew Tridgell
3dd978b12b * netr_ServerPasswordSet() now works - the test suite changes the
machine account password.

  * neater handling on value() options in IDL. The auto-print code
    will now display the right value so you don't need to initialise
    it in your C code
-
Andrew Tridgell
e6e0906464 * another small API change in the credentials code
* don't use static variables in the smbdes code
-
Andrew Tridgell
b7d748f499 neater credentials handling in netlogon client code -
Andrew Tridgell
c8ef040774 fixed NTLMSSP_SIGN_VERSION (which I broke earlier today) -