1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

4180 Commits

Author SHA1 Message Date
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 Bartlett
fc1b6bae23 r6286: Add back metze's test of setting a trust password to ''. I removed
this because I don't want our torture suite to leave behind accounts
with known passwords if it is stopped in the wrong place.  It is now
run behind the -X (dangerous) wrapper.

Andrew Bartlett
(This used to be commit 057a81d81e)
2007-10-10 13:11:29 -05:00
Andrew Bartlett
3ae4d872f5 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
(This used to be commit 838925761d)
2007-10-10 13:11:29 -05:00
Andrew Bartlett
6d1ae6d35a r6271: Don't zero the cli_credentials structure - instead allow valgrind to
track the use of un-initialised values.

This change will require a recompile from clean, as the enum
describing the status of each element now has a default of
CRED_UNINITIALISED.

Andrew Bartlett
(This used to be commit 83c2eb806d)
2007-10-10 13:11:29 -05:00
Andrew Bartlett
20841a25ad r6270: Move the VUID handling to a IDR tree. This should avoid O(n)
behaviour on session setups, and because we no longer need do deal
with the linked list as much, the code is much simpiler too.

We may be able to compleatly remove the tid and vuid linked lists, but
I need to check.

This patch also tries to clean up the VUID handling and session setups
in general.  To avoid security issues, we now have a distinction
between VUIDs allocated for the session setup (to tie togeather the
multiple round trips) and those used after authentication.

Andrew Bartlett
(This used to be commit 3e5775146d)
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
866c62f26d r6246: stop waiting when we get a reply
(This used to be commit 8b9a5d8336)
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
Jeremy Allison
e3775ee850 r6238: Ensure if realloc fails on an internal
tdb we fail gracefully.
Jeremy.
(This used to be commit d69f7c0546)
2007-10-10 13:11:28 -05:00
Richard Sharpe
c46c6e23ba r6229: Back out these changes ...
(This used to be commit 321fbae512)
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
567a74690c r6222: fixed the socket wrapper code for getsockname()
(This used to be commit 11e245a3f0)
2007-10-10 13:11:27 -05:00
Richard Sharpe
66a3750b14 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 ...
(This used to be commit 3034b22670)
2007-10-10 13:11:27 -05:00
Tim Potter
86122d78e5 r6215: Add test for LookupNames. Fix CreateUser2 test.
(This used to be commit e3a69a7322)
2007-10-10 13:11:27 -05:00
Tim Potter
b796dc4077 r6214: Fix typo in DomainHandle.OpenUser() function.
Implement DomainHandle.LookupNames() function.

UserHandle.DeleteUser() closes the handle so don't try and close it
when the GC destroys the class instance.
(This used to be commit 57680163bc)
2007-10-10 13:11:27 -05:00
Tim Potter
f0641cae5d r6213: Add %array_functions for struct samr_String so we can create and
access arrays of them.
(This used to be commit fc2b73d4d7)
2007-10-10 13:11:26 -05:00
Tim Potter
3b64edcfff r6212: Treat uint8 and int8's as integers instead of chars. Swig maps a char
to a string when we really want an integer.
(This used to be commit 86c62b92e8)
2007-10-10 13:11:26 -05:00
Tim Potter
2543885bf3 r6211: Use cli_credentials_set_{domain,username,password}() to fill in
command line arguments for credentials typemap.  Neat!
(This used to be commit a3e7d71463)
2007-10-10 13:11:26 -05:00
Tim Potter
d77e7cd774 r6210: Call cli_credentials_set_conf() when initialising credentials in
cli_credentials typemap.
(This used to be commit 1c88e71ec6)
2007-10-10 13:11:26 -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
Tim Potter
e1e8928840 r6208: Add cli_credentials support for swig wrappers. For the moment it
only does anonymous connections.
(This used to be commit b09a472353)
2007-10-10 13:11:26 -05:00
Stefan Metzmacher
cf52d62ec9 r6207: - clean up source topdir
- move provision stuff to setup/
- remove unused scripts

metze
(This used to be commit c35887ca64)
2007-10-10 13:11:26 -05:00
Stefan Metzmacher
f9b3a8d3b9 r6206: go baack 10 revisions to get DatabaseDeltas, this shows that the bdc only
need one call to get in sync again (except something like NT_STATUS_MORE_ENTRIES is returned)

also the pdc only need to know the current state values

metze
(This used to be commit f4e12b3893)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
4baf0b01c4 r6197: fix for my last commit, I removed SPOOLSS_ARCHITECTURE, which was "Architecture"
(sorry richard:-)

disable lookup for DefaultSpoolDirectory until, I have fixed the parsing when WERR_MORE_DATA
is returned

metze
(This used to be commit d5993337b8)
2007-10-10 13:11:25 -05:00
Richard Sharpe
89f03dc4eb r6196: Make the comparisons consistent with in the same expression.
(This used to be commit 6f7337163e)
2007-10-10 13:11:25 -05:00
Richard Sharpe
d3911fa5d7 r6195: I think Metze meant SPOOLSS_ARCHITECTURE_NT_X86, but I could be wrong.
(This used to be commit 85c2b8b944)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
746bb14367 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
(This used to be commit 92f3d5bd9c)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
b46eb7aa17 r6193: we don't need to store the handle type here,
it's in handle->wire_handle.handle_type

metze
(This used to be commit 539286bc9f)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
32e6cf5e3f r6192: remove handle->destroy function pointer, this should be done by talloc destructors now
metze
(This used to be commit 862226f557)
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
051206ff1e r6191: fix spoolss_Enum* push code
metze
(This used to be commit e66aa87f14)
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
638104dd4c r6190: fix gensize on unions
metze
(This used to be commit 661e64e9ce)
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
d2128c1249 r6189: move function to the right place
metze
(This used to be commit 08d22a07cf)
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
fa27fa88da 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
(This used to be commit 848f553117)
2007-10-10 13:11:24 -05:00
Richard Sharpe
cf97980f31 r6187: 1. Make sure that we don't try to delete . and .. in a more portable way.
2. Also, don't try to delete directories.

I am not entirely happy with this patch, and the fact that there is a
define for HAVE_SYS_STAT_H suggests that there are some systems for which
stat will not be defined, which means that the patch is not entirely
portable.
(This used to be commit fe7ddad7d4)
2007-10-10 13:11:24 -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
Richard Sharpe
b9df3f5fe8 r6182: Jelmer, I think we need to initialize the switch_list, else we are
crash city.
(This used to be commit 6526f21fb7)
2007-10-10 13:11:23 -05:00
Jelmer Vernooij
934f11cb97 r6181: Use ndr_print_set_switch_value() here as well.
(This used to be commit 4da9d1d5c2)
2007-10-10 13:11:23 -05:00
Jelmer Vernooij
3b8c824c16 r6180: Use token_lists for storing switch values
(This used to be commit f66e11137e)
2007-10-10 13:11:23 -05:00
Stefan Metzmacher
3abce73193 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
(This used to be commit 92a3721bc7)
2007-10-10 13:11:23 -05:00
Stefan Metzmacher
0ba6108bcd r6178: fix ncacn_np connection without sign or seal against NT4
metze
(This used to be commit d92100fcc2)
2007-10-10 13:11:23 -05:00
Tim Potter
ac5fc1302d r6177: Use here documents instead of print() statements to generate the
Makefile fragments for the build system.  This allows the file to be
edited without using quite as many backslashes.  Some are still necessary
for interpolation of perl variables though.

I've diffed the new Makefile against the old and there are only some
extra newlines as a result of making things more consistent.
(This used to be commit 3808c5e092)
2007-10-10 13:11:23 -05:00
Andrew Tridgell
772f31797d r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
  the userinfo_state structure, place it inside the composite
  structure, not directly on the pipe. If this isn't done then
  correct cleanup can't happen on errors (as cleanup destroys the top
  level composite context only)

- define private structures like userinfo_state in the userinfo.c
  code, not in the public header

- only keep the parameters we need in the state structure. For
  example, the domain_handle is only needed in the first call, so we
  don't need to keep it around in the state structure, but the level is
  needed in later calls, so we need to keep it

- always initialise [out,ref] parameters in RPC calls. The [ref] part
  means that the call assumes the pointer it has been given is
  valid. If you don't initialise it then you will get a segv on
  recv. This is why the code was dying.

- don't use internal strucrure elements like the pipe
  pipe->conn->pending outside of the internal rpc implementation. That
  is an internal list, trying to use it from external code will cause crashes.

- rpc calls assume that rpc call strucrures remain valid for the
  duration of the call. This means you need to keep the structures
  (such as "struct samr_Close") in the userinfo_state strucrure,
  otherwise it will go out of scope during the async processing

- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
  request has finished in the close handler, otherwise it will loop
  forever trying to close

Mimir, please look at the diff carefully for more detailed info on the fixes
(This used to be commit 01ea1e7762)
2007-10-10 13:11:23 -05:00
Rafal Szczesniak
7288298b65 r6164: More comments in the code.
rafal
(This used to be commit 01cbed98b3)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
b1e46fde3a r6159: Move some more general ndr stuff (alignment calculations) to ndr.pm
(This used to be commit f4d550c348)
2007-10-10 13:11:22 -05:00
Andrew Tridgell
4b96d83147 r6150: fixed a few socket_wrapper bugs.
- now works properly with UDP, so the NBT tests work
  - fixed byte order in a few places
  - connect() now fails to non-localhost
  - fixed some places that tested for < 0, which should be == -1 (most syscalls
    return -1 on error, not "negative")
(This used to be commit 61e1eea0fd)
2007-10-10 13:11:22 -05:00
Tim Potter
bc345db961 r6148: Add a showflags target to display the various compiler flags a la
showlayout.  There seems to be a bunch of -D and -I stuff in LD_FLAGS
which I don't think should be there.
(This used to be commit 87f88aacee)
2007-10-10 13:11:22 -05:00
Andrew Tridgell
c363874466 r6147: The maxfd was being recalculated on every event loop, which made us
less scalable. It only needs to be recalculated when we the highest fd
is destroyed.
(This used to be commit 568b9175f3)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
07e3fa2146 r6144: Apparently there are more systems that have AF_UNIX then
AF_LOCAL (we already use AF_UNIX in other places).
(This used to be commit 88d93b9782)
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
e124ec9518 r6143: Put compression support in the subcontext handling functions rather
then at the element level.
(This used to be commit fac5edd2b7)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
848329b9a0 r6140: - Add configure option for enabling the socket-wrapper library, so it
can be enabled on the buildfarm without requiring --enable-developer
- Support tcp and udp being used on the same port
- FIx some portability issues (should fix the build on
							   some hosts on the buildfarm)
- Ignore setting TCP_NODELAY on (semi-)TCP sockets rather then complain about
  it not being supported (saves us from a couple of error messages for each
						  connection that is opened)
(This used to be commit 443fb7853b)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
44d7f4f238 r6139: Move socket_wrapper to a seperate directory
(This used to be commit a2ef9225f1)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
2d0349614c 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
(This used to be commit 75e427dca9)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
d2f2d5c798 r6134: add a new type dom_sid28 which is a 28 byte fixed buffer with a dom_sid in it
metze
(This used to be commit 460d1b089e)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
59b2ffb89f r6132: allow up to 15 sub_auth in a dom_sid
(tridge: asked me for that commit)

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

metze
(This used to be commit 2d121c8431)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
79fb22f9d4 r6130: More work on the NDR tree generator
(This used to be commit ad7ea50eb2)
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
0403e2032b 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
(This used to be commit 5e8558c5b4)
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
4581134bf5 r6128: fix the build
metze
(This used to be commit 8059315034)
2007-10-10 13:11:20 -05:00
Richard Sharpe
da38166904 r6118: Make it so that we can do --with-zlib=no in configure and also a couple
of small typos.
(This used to be commit 9b4069e845)
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
dfbd1752a1 r6115: don't try to decompress level 7 buffers yet
metze
(This used to be commit bbc0f6c552)
2007-10-10 13:11:20 -05:00
Stefan Metzmacher
4810ec445d r6114: the marker is const and is 0x434B 'CK'
metze
(This used to be commit 4b88ff2971)
2007-10-10 13:11:20 -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
Stefan Metzmacher
d15845eb81 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
(This used to be commit 0d44d07797)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
64ad915111 r6109: nicer way to handle compression in the torture test
metze
(This used to be commit a3cec189e1)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
e760bd37b2 r6101: only allow properties we know about, that helps to catch typos!
what does length_of() and id() do?

metze
(This used to be commit 55963934db)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
4931dfc8c6 r6100: - fix nondiscriminant -> nodiscriminant (that takes me 2 days to find...:-( )
- use a DATA_BLOB for the driver specific data in the devmode

metze
(This used to be commit 87d48b2076)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
3b05dae200 r6099: use the enum print function
metze
(This used to be commit ff32e2182e)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
d4886d20db r6098: fix parsing of empty union cases
metze
(This used to be commit f3c64120a1)
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
4f4d18d66c r6097: allow compression only on subcontexts
metze
(This used to be commit 2a7eead1c8)
2007-10-10 13:11:19 -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
Jeremy Allison
8c270fcedb r6093: Patch to fix sys_select so it can't drop signals if another fd
is ready to read. Patch from Mark Weaver <mark-clist@npsl.co.uk>.
Jeremy.
(This used to be commit 857e98e8ea)
2007-10-10 13:11:18 -05:00
Jelmer Vernooij
e91fb065fa r6088: Add the socket_wrapper library. This is a very simple library that
redirects traffic (currently just IP traffic) over unix domain sockets
if the SOCKET_WRAPPER_DIR environment variable has been set.
Aim is to use this for the Samba4 torture suite on the buildfarm.

The socket_wrapper library can only be used if Samba was compiled with
--enable-developer.

test_rpc.sh passes against a local smbd with SOCKET_WRAPPER_DIR set.
(and ethereal showed no traffic whatsoever)

Stuff that still needs to be fixed in socketwrapper:
 - Give ENETUNREACH if target is not localhost
 - A given port number can only be used for UDP /or/ TCP, not both.
 - Perhaps allow some calls to circumvent socketwrapper (do we need DNS?)
(This used to be commit f8a63a843c)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
a5ee5aae69 r6087: - remove the dlopen code for now (before it goes back, it needs to be
made into something that isn't a maze of #ifdefs)

- when a module is not found, make it a non-fatal error. Otherwise the standalone ldb
  tools just bail out. The previous code meant that if you had a
  module listed and it wasn't present then you could _never_ fix it,
  as you coudln't open the ldb to remove that module from @MODULES !
(This used to be commit c4728625c0)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
be6285adad r6086: default to stderr for error messages in ldb, so we get errors in ldb_connect()
(This used to be commit a6e492f95c)
2007-10-10 13:11:18 -05:00
Simo Sorce
1a4bb9f4aa r6085: dc is case insensitive
(This used to be commit 55117f1ab9)
2007-10-10 13:11:18 -05:00
Simo Sorce
5487ee5e9c r6084: - Introduce the samldb module dependency on samba4
- This module will take care of properly filling an user or group object
  with required fields. You just need to provide the dn and the objectclass
  and a user/group get created

  Simo.
(This used to be commit fb9afcaf53)
2007-10-10 13:11:18 -05:00
Andrew Bartlett
6ed40eda29 r6079: Add inline documentation on the credentials context API.
Andrew Bartlett
(This used to be commit 258c04e367)
2007-10-10 13:11:17 -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
0d36266cd4 r6075: added talloc_enable_null_tracking() (asked for by lifeless)
(This used to be commit 40b8ee186a)
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
Jelmer Vernooij
5ae38fb963 r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed.
(This used to be commit 7fe77cd659)
2007-10-10 13:11:17 -05:00
Stefan Metzmacher
747eb74d2e r6065: revert test value
metze
(This used to be commit fca4dc4827)
2007-10-10 13:11:16 -05:00
Stefan Metzmacher
5a9ceee7a5 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
(This used to be commit 335adef370)
2007-10-10 13:11:16 -05:00
Jelmer Vernooij
2fa732c625 r6045: Couple of small GTK+ fixes
Use uint32_t and uint16_t rather then DWORD and WORD in
the NT4 backend. Add some more unknown fields..
(This used to be commit 6c3b1ec329)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
ae1ea5619b r6033: Patch from 'lifeless' to clarify behaviour with NULL pointers.
Andrew Bartlett
(This used to be commit 48c5187967)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
a19d002cee 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
(This used to be commit c324d97413)
2007-10-10 13:11:16 -05:00
Andrew Tridgell
21d9419b1e r6031: don't try to send errors when the socket has been destroyed
(This used to be commit 54c0284679)
2007-10-10 13:11:16 -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
038c4c4c6a r6024: Some of the ordering constraints on the popt callbacks were getting
painful, so don't call lp_*() functions until the post stage (rather
than in the cli_credentails_init(), which is called in the pre stage),
and don't open the secrets.ldb looking for the machine account details
until we actually need them (well after popt is done, and we know we have the other things right).

Set the domain and realm, as well as the account and password for -P
(fetch machine password) operation.

Allow NETLOGON credentials to be stored in this structure - will allow
SCHANNEL to be made more generic.

Clarify why we don't do special checks for NULL pointers, particularly
in the anonymous check (it indicates a programmer error, not a
run-time condition).

Also make lib/credentials.c a little more consistant.

Andrew Bartlett
(This used to be commit 730e6056b7)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
44484c7861 r6010: Change the testing order, so we test all transports for each binding
option, rather than all binding options for each transport.

This means that we get to most of the tests earlier, with at least
some binding options.  (And allows us to have some confidence before
waiting for an RPC-SAMR test to finish with bigendian).

Andrew Bartlett
(This used to be commit 5c3e4df804)
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
3ec2c008b8 r6000: add some notes about the cases where compression (or what ever this is)
is used, in the reply.

metze
(This used to be commit 618dadb7ef)
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
220f82e570 r5999: ups, remove the testvalue that I used against my w2k3 server
metze
(This used to be commit 3d3e09af16)
2007-10-10 13:11:14 -05:00
Stefan Metzmacher
01ab1128ce r5998: I was wrong with the highwater mark...
I think I now understand how it works:-)

metze
(This used to be commit f8add2e66a)
2007-10-10 13:11:14 -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
Jelmer Vernooij
4a095be541 r5989: Display authentication information (list of available auth protocols
+ principal names per endpoint) to gepdump. Still need to fix memory management
in the GTK+ utilities...
(This used to be commit b48a0af0b0)
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
Jelmer Vernooij
9b48673ad9 r5987: Add credentials callback for gtk+. The gtk+ apps now no longer
ask for a password when kerberos is being used.
(This used to be commit 642ec7cbef)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
df8c102ec9 r5986: Fix the build. Metze, could you please verify that this fix is correct?
(This used to be commit f3006e623b)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
8307c19c78 r5985: Actually adding auth_domain.c in -r 5983 would probably have been a
good idea....

Andrew Bartlett
(This used to be commit 84b566a36b)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
c62fc9b46f r5984: Add index and attributes to default ldif for secrets.ldb
Andrew Bartlett
(This used to be commit 41dea45892)
2007-10-10 13:11:12 -05:00
Andrew Bartlett
d735487aad r5983: Start support for being a domain member in Samba4.
This adds the auth_domain module to the auth subsystem, and cleans up
some small details around the join process (ensuring all the right
info is in the DB).

Andrew Bartlett
(This used to be commit 858cbfb821)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
1cb21b84a9 r5980: Fix double free after unexpected disconnect.
(This used to be commit 6149bd3702)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
4c4738938a r5977: Fix uninitialised memory bug in ndr_pull_ref_ptr(). This fixes the
Test_DoublePointer test failure.
(This used to be commit 4089d5f67d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
7c55d0ffa5 r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
(This used to be commit ec1eaa274b)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
88a5f8b26f r5963: Fix parameter passing for gentest and locktest
(This used to be commit 28914c89dc)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
1bb3e99d06 r5949: give things more meaning, and reuse structs where it is possible
to make things more clear

metze
(This used to be commit adefeeb4f3)
2007-10-10 13:11:11 -05:00
Stefan Metzmacher
07c705745a r5947: print out the password hashes when -d 100 is in use,
very usefull for creating a keytab file with

metze
(This used to be commit 15b80a28db)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
e25cff1c11 r5942: A couple of small changes to fix things up with the new credentials
infrustructure.

Andrew Bartlett
(This used to be commit d51718ab8a)
2007-10-10 13:11:11 -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
Andrew Tridgell
da5349dede r5939: improve talloc_realloc() docs after feedback from lifeless
(This used to be commit 301cbb0d12)
2007-10-10 13:11:10 -05:00
Andrew Tridgell
689a803ac7 r5938: - allow NULL string argument to talloc_vasprintf_append()
- default to using va_copy(), thus assuming a modern libc
(This used to be commit 3060b26c9e)
2007-10-10 13:11:10 -05:00
Andrew Tridgell
340d35be2d r5937: - performance improvement to talloc_asprintf_append()
- allow standalone talloc to use gcc printf attributes
(This used to be commit e25aa54e96)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
455be8fb82 r5932: Use cli_credentials somewhat more in the Gtk+ code
Support ncacn_spx in DCE/RPC bindings.
(This used to be commit a0233a3a9a)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
b7676c4b48 r5930: Fix initialisation of dcerpc_binding->authservice
(This used to be commit f8cf161e0e)
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
34cde06513 r5924: Use cli_credentials in libnet/.
(This used to be commit e5bc6f4f17)
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
Jelmer Vernooij
105660d3f9 r5906: Fix the usage of the internal popt (make proto should ignore it)
Updated included popt to 1.7.
(This used to be commit d60cb643e8)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
63b5ad6d54 r5903: While I can't test IPv6, metze asked me to commit a matching change
for unknown hosts that I just did for IPv4.

Andrew Bartlett
(This used to be commit 7e1d82a200)
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
4037a7e80c r5901: Add another option to the test script - the realm, which must match
the real ream, not just the short domain name.

Andrew Bartlett
(This used to be commit d585e1a759)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
a25443dbeb r5900: Use flatname to specify the netbios domain name (matches what win2k3
uses for trusted domain records) in the secrets join records.

Andrew Bartlett
(This used to be commit a6c502832c)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
439056c1db r5899: Fix spelling.
Andrew Bartlett
(This used to be commit 50af206477)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
3240f01636 r5898: Handle errors in the 'sync' name and IP address handling code.
Andrew Bartlett
(This used to be commit 6b8b40f73b)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
48e7cfbe1d r5895: Remove old auth_domain code - to be replaced with entirely new implementation.
Andrew Bartlett
(This used to be commit a16339729d)
2007-10-10 13:11:06 -05:00
Andrew Bartlett
5aa2646be8 r5879: Rename SAMR_FIELD_WORKSTATION to SAMR_FIELD_WORKSTATIONS - it is a list.
Andrew Bartlett
(This used to be commit 7822101cb5)
2007-10-10 13:11:06 -05:00
Andrew Bartlett
2b41ba049e r5878: Be clear which machine name (We have one worksation, and one BDC) we
are doing logins with.

Andrew Bartlett
(This used to be commit b7297c44fa)
2007-10-10 13:11:06 -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
Andrew Bartlett
00ac91fa29 r5876: Add a test account for the duration of the samsync - to ensure we have
a good variety of things to test against.

Add code to testjoin to handle this just like test machine accounts

Soon I'll remove the 'must change password' flag, so we can do logins with it.

Andrew Bartlett
(This used to be commit 08b47e2dc0)
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
d4c0da18a7 r5871: Remove file with unused function (that uses fstring)
Remove fstring usage from version.c
(This used to be commit d25163159c)
2007-10-10 13:11:06 -05:00
Jelmer Vernooij
72621f838e r5867: winreg depends on initshutdown now (uses initshutdown_String)
(This used to be commit ff478d44be)
2007-10-10 13:11:05 -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
Jelmer Vernooij
85943483fb r5853: Move some of the functions not specific to the Samba NDR parser generator
to a new ndr.pm.
Add function that can generate a "OrderTable" describing the order
in which the NDR data will be pushed/pulled.
(This used to be commit 2603a7326d)
2007-10-10 13:11:05 -05:00
Jelmer Vernooij
795f593757 r5852: Rename ndr.pm to ndr_parser.pm
I'm going to add a ndr.pm later on that'll generate a
tree with necessary information for the two NDR backends
(eparser, ndr_parser) containing alignment info, etc.
(This used to be commit 5162daa946)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
85e0b90cf3 r5850: enable parsing of revision 4 security acl's
metze
(This used to be commit 2a6a075c7d)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
c2875e51e8 r5839: add LDAP DirSync control idl
metze
(This used to be commit 29d898a338)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
c638a8380d r5830: start to analyse the attribute values, depending on the attribute type
metze
(This used to be commit 63229b9503)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
d7b5a565ef r5828: add some idl for DsAddEntry()
metze
(This used to be commit 3e6ec81128)
2007-10-10 13:11:04 -05:00
Tim Potter
1d64203954 r5827: Make ndrdump accept a uuid as well as a pipe name to specify
which rpc interface to use.
(This used to be commit d59bc9dc9b)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
55546176c6 r5800: fix recursiv printing in ndr_print_DsGetNCChangesInfo1()
metze
(This used to be commit 1084ad4bfc)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
cead12981f r5799: more DsGetNCChanges updates, I'm starting to understand it...
also add a really simple torture test for DsGetNCChanges

metze
(This used to be commit bcde67a7ef)
2007-10-10 13:11:04 -05:00