1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-31 01:48:16 +03:00

907 Commits

Author SHA1 Message Date
Andrew Tridgell
f8e77fcdea 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
2007-10-10 13:11:29 -05:00
Andrew Bartlett
838925761d r6272: For 'programmed' use of an anonymous account, we should use
cli_credentials_set_conf(), not cli_credentials_guess().

Also, clarify why for particular flags, we don't do a DCERPC-level
authentication.

Andrew Bartlett
2007-10-10 13:11:29 -05:00
Andrew Tridgell
d7e6e395ce r6248: added parsing of type 10 UAS announce netlogon packets 2007-10-10 13:11:28 -05:00
Andrew Tridgell
3b34df6a67 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
2007-10-10 13:11:28 -05:00
Andrew Tridgell
52ccdb79bc 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
2007-10-10 13:11:28 -05:00
Richard Sharpe
321fbae512 r6229: Back out these changes ... 2007-10-10 13:11:28 -05:00
Andrew Tridgell
a7634625db 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.
2007-10-10 13:11:27 -05:00
Richard Sharpe
3034b22670 r6219: This change allows us to fall back to authenticating without
DCERPC_SCHANNEL_128 if we fail. Thus, it allows us to work with Windows
NT DCs ...
2007-10-10 13:11:27 -05:00
Andrew Tridgell
f20e7e5200 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
2007-10-10 13:11:26 -05:00
Stefan Metzmacher
92f3d5bd9c r6194: - fix some spoolss_*Form names and types
- fix GetPrinterData(), look inside the datablob

- add idl for RemoteFindFirstChangeNotify(), without meaning yet, just to not return a DCERPC_FAULT
  when receiving this request

metze
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
e66aa87f14 r6191: fix spoolss_Enum* push code
metze
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
08d22a07cf r6189: move function to the right place
metze
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
848f553117 r6188: correct fix for rev 6182
we should start with an empty switch_list
in ndr_print as we do for ndr_pull/ndr_push

metze
2007-10-10 13:11:24 -05:00
Andrew Tridgell
10d64a5253 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
2007-10-10 13:11:24 -05:00
Richard Sharpe
6526f21fb7 r6182: Jelmer, I think we need to initialize the switch_list, else we are
crash city.
2007-10-10 13:11:23 -05:00
Jelmer Vernooij
4da9d1d5c2 r6181: Use ndr_print_set_switch_value() here as well. 2007-10-10 13:11:23 -05:00
Jelmer Vernooij
f66e11137e r6180: Use token_lists for storing switch values 2007-10-10 13:11:23 -05:00
Stefan Metzmacher
92a3721bc7 r6179: - add new spoolss tests for all spoolss_Enum*() calls which didn't need
a handle as parameter,

  EnumPorts
  EnumPrinterDrivers
  EnumMonitors
  EnumPrintProcessors
  EnumPrinters

  we now do cross checks between the different info levels
  and sore the results in a global context,
  so that we later can add cross checks between the different object types

- add idl for EnumMonitors and EnumPrintProcessors

metze
2007-10-10 13:11:23 -05:00
Stefan Metzmacher
d92100fcc2 r6178: fix ncacn_np connection without sign or seal against NT4
metze
2007-10-10 13:11:23 -05:00
Stefan Metzmacher
75e427dca9 r6135: - make use of the new dom_sid28 type
(this fixes parsing of w2k blob, which some times have random gargabe data in the sid buffer)

- make the names of the DsReplicaCoursor*Ctr* 's more consistent
  and fix DsGetNCchangesCtr6 parsing

metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
460d1b089e r6134: add a new type dom_sid28 which is a 28 byte fixed buffer with a dom_sid in it
metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
2791de069a r6132: allow up to 15 sub_auth in a dom_sid
(tridge: asked me for that commit)

metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
2d121c8431 r6131: decompression of DsGetNCChanges level 2 responses works now
(and the push side isn't used currently...)

metze
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
5e8558c5b4 r6129: - add our own MSZIP decompression implementation
(taken from cabextract.c from KDE)
  this code maybe need to be rewritten and the
  compression side needs to be done,
  but for now it seems to works

- remove the dependency to zlib

metze
2007-10-10 13:11:20 -05:00
Richard Sharpe
9b4069e845 r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
bbc0f6c552 r6115: don't try to decompress level 7 buffers yet
metze
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
4b88ff2971 r6114: the marker is const and is 0x434B 'CK'
metze
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
0d44d07797 r6112: try to decompress all chunks and put them together
it produces the correct DATA_BLOB length, but only the first chunk is
successfull decompressed...

metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
87d48b2076 r6100: - fix nondiscriminant -> nodiscriminant (that takes me 2 days to find...:-( )
- use a DATA_BLOB for the driver specific data in the devmode

metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
ff32e2182e r6099: use the enum print function
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
fca4dc4827 r6065: revert test value
metze
2007-10-10 13:11:16 -05:00
Stefan Metzmacher
335adef370 r6061: add start of compression support in our rpc code
this is not complete cuurently...

but I want other people to test it and help me on finishing it.
(try to change the #if 0 in torture/rpc/drsuapi.c into #if 1)

metze
2007-10-10 13:11:16 -05:00
Andrew Bartlett
c324d97413 r6032: Fix up SetServerPassword2 on NETLOGON for [bigendian]. Clearly nobody
has the patience to run test_w2k3.sh to completion :-)

It looks to me that the Windows server runs the RC4 over the C struct,
not the NDR data.

Andrew Bartlett
2007-10-10 13:11:16 -05:00
Andrew Bartlett
2301a4b38a 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
2007-10-10 13:11:15 -05:00
Stefan Metzmacher
618dadb7ef r6000: add some notes about the cases where compression (or what ever this is)
is used, in the reply.

metze
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
f8add2e66a r5998: I was wrong with the highwater mark...
I think I now understand how it works:-)

metze
2007-10-10 13:11:14 -05:00
Jelmer Vernooij
f3006e623b r5986: Fix the build. Metze, could you please verify that this fix is correct? 2007-10-10 13:11:12 -05:00
Jelmer Vernooij
6149bd3702 r5980: Fix double free after unexpected disconnect. 2007-10-10 13:11:12 -05:00
Jelmer Vernooij
4089d5f67d r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes the
Test_DoublePointer test failure.
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
ec1eaa274b r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
adefeeb4f3 r5949: give things more meaning, and reuse structs where it is possible
to make things more clear

metze
2007-10-10 13:11:11 -05:00
Andrew Bartlett
0453f9d05d 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
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
a0233a3a9a r5932: Use cli_credentials somewhat more in the Gtk+ code
Support ncacn_spx in DCE/RPC bindings.
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
f8cf161e0e r5930: Fix initialisation of dcerpc_binding->authservice 2007-10-10 13:11:10 -05:00
Jelmer Vernooij
4ad481cfe5 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
ccefd78233 r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
2007-10-10 13:11:08 -05:00
Andrew Bartlett
824289dcc2 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.
2007-10-10 13:11:07 -05:00
Andrew Bartlett
7822101cb5 r5879: Rename SAMR_FIELD_WORKSTATION to SAMR_FIELD_WORKSTATIONS - it is a list.
Andrew Bartlett
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
ff478d44be r5867: winreg depends on initshutdown now (uses initshutdown_String) 2007-10-10 13:11:05 -05:00
Jelmer Vernooij
ea61ec1122 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
2007-10-10 13:11:05 -05:00