1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-14 01:57:53 +03:00

4073 Commits

Author SHA1 Message Date
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
8b9a5d8336 r6246: stop waiting when we get a reply 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
Jeremy Allison
d69f7c0546 r6238: Ensure if realloc fails on an internal
tdb we fail gracefully.
Jeremy.
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
Andrew Tridgell
11e245a3f0 r6222: fixed the socket wrapper code for getsockname() 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
Tim Potter
e3a69a7322 r6215: Add test for LookupNames. Fix CreateUser2 test. 2007-10-10 13:11:27 -05:00
Tim Potter
57680163bc 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.
2007-10-10 13:11:27 -05:00
Tim Potter
fc2b73d4d7 r6213: Add %array_functions for struct samr_String so we can create and
access arrays of them.
2007-10-10 13:11:26 -05:00
Tim Potter
86c62b92e8 r6212: Treat uint8 and int8's as integers instead of chars. Swig maps a char
to a string when we really want an integer.
2007-10-10 13:11:26 -05:00
Tim Potter
a3e7d71463 r6211: Use cli_credentials_set_{domain,username,password}() to fill in
command line arguments for credentials typemap.  Neat!
2007-10-10 13:11:26 -05:00
Tim Potter
1c88e71ec6 r6210: Call cli_credentials_set_conf() when initialising credentials in
cli_credentials typemap.
2007-10-10 13:11:26 -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
Tim Potter
b09a472353 r6208: Add cli_credentials support for swig wrappers. For the moment it
only does anonymous connections.
2007-10-10 13:11:26 -05:00
Stefan Metzmacher
c35887ca64 r6207: - clean up source topdir
- move provision stuff to setup/
- remove unused scripts

metze
2007-10-10 13:11:26 -05:00
Stefan Metzmacher
f4e12b3893 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
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
d5993337b8 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
2007-10-10 13:11:25 -05:00
Richard Sharpe
6f7337163e r6196: Make the comparisons consistent with in the same expression. 2007-10-10 13:11:25 -05:00
Richard Sharpe
85c2b8b944 r6195: I think Metze meant SPOOLSS_ARCHITECTURE_NT_X86, but I could be wrong. 2007-10-10 13:11:25 -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
539286bc9f r6193: we don't need to store the handle type here,
it's in handle->wire_handle.handle_type

metze
2007-10-10 13:11:25 -05:00
Stefan Metzmacher
862226f557 r6192: remove handle->destroy function pointer, this should be done by talloc destructors now
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
661e64e9ce r6190: fix gensize on unions
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
Richard Sharpe
fe7ddad7d4 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.
2007-10-10 13:11:24 -05:00
Andrew Tridgell
47e1452da0 r6185: added LIBCLI_DGRAM to the list of libs to be built as part of LIBCLI 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
Tim Potter
3808c5e092 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.
2007-10-10 13:11:23 -05:00
Andrew Tridgell
01ea1e7762 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
2007-10-10 13:11:23 -05:00
Rafal Szczesniak
01cbed98b3 r6164: More comments in the code.
rafal
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
f4d550c348 r6159: Move some more general ndr stuff (alignment calculations) to ndr.pm 2007-10-10 13:11:22 -05:00
Andrew Tridgell
61e1eea0fd 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")
2007-10-10 13:11:22 -05:00
Tim Potter
87f88aacee 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.
2007-10-10 13:11:22 -05:00
Andrew Tridgell
568b9175f3 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.
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
88d93b9782 r6144: Apparently there are more systems that have AF_UNIX then
AF_LOCAL (we already use AF_UNIX in other places).
2007-10-10 13:11:22 -05:00
Jelmer Vernooij
fac5edd2b7 r6143: Put compression support in the subcontext handling functions rather
then at the element level.
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
443fb7853b 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)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
a2ef9225f1 r6139: Move socket_wrapper to a seperate directory 2007-10-10 13:11:21 -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