1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

698 Commits

Author SHA1 Message Date
Andrew Tridgell
c8177de955 r6691: fixed a comment
(This used to be commit a0fa871c3f)
2007-10-10 13:16:34 -05:00
Andrew Tridgell
f6c0bee791 r6689: minor ldap client library work
- added support for binary encoded search filters
 - fixed some const handling
 - changed the message type to an enum, to help debugging
(This used to be commit d5353b6342)
2007-10-10 13:16:34 -05:00
Rafal Szczesniak
aefd5df199 r6614: Basic approach to monitoring messages for composite functions.
rafal
(This used to be commit 47a7a6c3fc)
2007-10-10 13:16:30 -05:00
Andrew Bartlett
0501a440be r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
(This used to be commit 7a93ac49c2)
2007-10-10 13:11:39 -05:00
Andrew Bartlett
874cd2db86 r6460: Push the client credentials into NTLMSSP, allowing logins of the form
user@REALM for the first time.

Fix the build for smbencrypt.c

Andrew Bartlett
(This used to be commit 5a6a57cd93)
2007-10-10 13:11:39 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
e284a26294 r6338: ADS style GETDC response now works well enough that WinXP can join
Samba4 without Samba3 nmbd
(This used to be commit f4d07d7d3b)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
8c4e06004c r6335: at debug level 10, save netlogon and ntlogon packets that fail to parse
(This used to be commit c29279355c)
2007-10-10 13:11:33 -05:00
Andrew Tridgell
a451bc70e0 r6333: removed an extraneous line (pointed out by metze)
(This used to be commit 61d65d100d)
2007-10-10 13:11:32 -05:00
Andrew Tridgell
8d0a36366c r6331: added IDL and test suite for the ADS style response to a datagram netlogon query.
Note that this response is almost identical to the CLDAP netlogon
response, so adding that will now be quite easy.
(This used to be commit 1ea4ed4ad1)
2007-10-10 13:11:32 -05:00
Andrew Tridgell
63ddff3d7b r6323: added server side support for dgram NTLOGON requests. NT4 workstations can now login
to a Samba4 domain.
(This used to be commit df146d64eb)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
f06e39e308 r6321: added IDL and test suite for NBT dgram 'sam logon' request (sent by
clients when a user tries to login)
(This used to be commit 08ded62156)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b6fd09d805 r6320: some minor netlogon datagram fixes - NT4 can now join a Samba4 domain without
Samba3 nmbd
(This used to be commit 4507bdc339)
2007-10-10 13:11:31 -05:00
Andrew Tridgell
b708e87a63 r6288: the nbt dgram server now responds to GETDC requests. It works with our
test suite, but doesn't yet seem to satisfy a nt4 client. I'm
investigating.
(This used to be commit 406217262d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
e7dd6a1291 r6287: sorted out a small but surprisingly tricky dependency problem with the
ndr code for handling sids and security descriptors now that we have a
sid in the nbt IDL
(This used to be commit f8e77fcdea)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
ce7eb41930 r6248: added parsing of type 10 UAS announce netlogon packets
(This used to be commit d7e6e395ce)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
f83e6ded9d r6245: receive and parse the GETDC response in the NBT-DGRAM test. The test
now tries to bind to port 138 if possible, so if you run it as root
and smbd/nmbd is not running then it works against windows servers
(This used to be commit 52ccdb79bc)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
7c6c366150 r6223: added a bit more datagram infrastructure and the beginnings of a test
suite. The NBT-DGRAM test does a UDP/138 netlogon request, to which a
windows server sends a reply, but the windows server sends the reply
to the wrong port (it always sends to 138), so the test suite doesn't
see it.
(This used to be commit a7634625db)
2007-10-10 13:11:27 -05:00
Andrew Tridgell
769070d502 r6209: started added code to support mailslot requests over UDP/138
datagrams. This adds the IDL to parse mailslot packets, plus mailslot
dispatch and listener registration code.

mailslots are used for UDP/138 browse and netlogon packets
(This used to be commit f20e7e5200)
2007-10-10 13:11:26 -05:00
Andrew Tridgell
6db5d09dba r6185: added LIBCLI_DGRAM to the list of libs to be built as part of LIBCLI
(This used to be commit 47e1452da0)
2007-10-10 13:11:24 -05:00
Andrew Tridgell
a47cb58c2f r6184: the beginnings of the libcli/dgram/ library, and the dgram
server. Currently just listens on port 138 and parses the packets
(using IDL like the rest of NBT). This allows me to develop the
structures and test with real packets
(This used to be commit 10d64a5253)
2007-10-10 13:11:24 -05:00
Andrew Bartlett
7cabdeb7ec r6113: Move GENSEC and the kerberos code out of libcli/auth, and into
auth/gensec and auth/kerberos.

This also pulls the kerberos configure code out of libads (which is
otherwise dead), and into auth/kerberos/kerberos.m4

Andrew Bartlett
(This used to be commit e074d63f3d)
2007-10-10 13:11:20 -05:00
Andrew Bartlett
e6aeeb5269 r6094: Work on the Kerberos code recently merged from Samba 3.0. This fixes
up issues I introduced during the merge, that caused a segfault.

I've still not got the keytab code to work for me (using Samba3 to
generate the keytab) so this is still not fully tested, but it's
better than it was.

To add debugging, I now use the krb5_get_error_message() function from
Heimdal when present, to return the custom error string, which
contains far, far more information than the simple error code does.

(This last point may well be worth merging back into 3.0)

Andrew Bartlett
(This used to be commit ed5755d9d1)
2007-10-10 13:11:18 -05:00
Andrew Bartlett
68d7a5e383 r6078: Correctly fix the failures for NT1 (not SPNEGO) session setups in the
client.  The issue was actually a cut-and-paste bug, I was filling in
the .old not the .nt1 part of the union.

I've also removed the 'error checks' - I'll shortly document the API
for the credentials code to clarify that it will always return a
pointer here, except in cases of programmer error.

Tridge:  I hope this is OK.

Andrew Bartlett
(This used to be commit 6439de9ec8)
2007-10-10 13:11:17 -05:00
Andrew Tridgell
0c936acc47 r6074: fixed non-spnego connections for new credentials code
(This used to be commit ff6663aac8)
2007-10-10 13:11:17 -05:00
Andrew Bartlett
73b77ee151 r6030: Missing from previous commit, a small header file to link
libcli/auth/schannel.c and libcli/auth/schannel_sign.c

Andrew Bartlett
(This used to be commit 1e0e66d720)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
46b22b073c r6027: Add copyright, and add a useful debug message.
Andrew Bartlett
(This used to be commit b5260cf0d4)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
f82bafa067 r6026: Update the kerberos keytab code to match Samba3 again.
(untested at this point).

Andrew Bartlett
(This used to be commit ef7f9a01b4)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
f312d91d60 r6025: Remove unused variables. This code will be modified again for the new
cli_credentials code shortly.

Andrew Bartlett
(This used to be commit 13d09c8e9a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
b8f395cf78 r5992: Rename schannel.c -> schannel_sign.c. The rest of the schannel code
(from librpc) will be moved into schannel.c soon.

Andrew Bartlett
(This used to be commit d6c80ff74b)
2007-10-10 13:11:13 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
376b03ebd8 r5940: fix schannel against w2k, it skips the confounder in the signature (24 bytes) for singed packets
but it accepts 32 bytes from the client.

(w2k3 accept it the otherway arround too)

metze
(This used to be commit 08d4c3b9f8)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
928af7e6ff r5877: It is not an error to have a zero-length secret, after decryption.
Andrew Bartlett
(This used to be commit b484776cc4)
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
736797ef7f r5737: add some error codes
metze
(This used to be commit f543eb4ede)
2007-10-10 13:11:01 -05:00
Andrew Bartlett
42031bc4be r5668: Add tests to RPC-SAMLOGON to test for user@REALM style logins. These
need a NULL domain (or a "" domain, except this breaks NTLMv2, and I
need to look into it a bit more).

Add support to the Samba4 server for these logins.  This will need
extension when we handle trusted domains as a DC, as it is a principal
name, not just another format for the username.

Andrew Bartlett
(This used to be commit de02c7c222)
2007-10-10 13:10:58 -05:00
Andrew Bartlett
765832748b r5667: Move schannel state into libcli/auth (as it belongs with schannel,
which will move in with the rest of GENSEC shortly).

Add the RID as another element in the schannel state.

Andrew Bartlett
(This used to be commit 69114b4a8e)
2007-10-10 13:10:58 -05:00
Alexander Bokovoy
3a55299221 r5646: state->loadfile might be NULL after allocation so this is really
should be NT_STATUS_HAVE_NO_MEMORY(state->loadfile) instead of
NT_STATUS_NOT_OK_RETURN(status).
(This used to be commit eb57a58788)
2007-10-10 13:10:56 -05:00
Stefan Metzmacher
70f7c56168 r5601: add a gsskrb5 backend that uses lorikeet-heimdal's new gssapi with
GSS_C_DCE_STYLE support, it's just a start and does work correctly yet

metze
(This used to be commit 87ff661703)
2007-10-10 13:10:55 -05:00
Tim Potter
c9b766a9af r5551: Protect against falling off the end of the name resolve order list
if a name is not found.
(This used to be commit c23f767a9f)
2007-10-10 13:10:54 -05:00
Tim Potter
7fc5f4a6f7 r5550: Initialise retry count - valgrind was freaking out because this value
was not set.
(This used to be commit 328f37a3e8)
2007-10-10 13:10:54 -05:00
Andrew Tridgell
42d6a4c4f0 r5451: - added separate wrepl_associate(), wrepl_pull_table() and wrepl_pull_names() functions, with reasonable
parameters, so callers don't need to deal directly with wins replication packet structures

- converted the NBT-WINSREPLICATION torture test to use the new APIs
(This used to be commit cec1672662)
2007-10-10 13:10:47 -05:00