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

4095 Commits

Author SHA1 Message Date
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
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
Jelmer Vernooij
ad7ea50eb2 r6130: More work on the NDR tree generator 2007-10-10 13:11:20 -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
Stefan Metzmacher
8059315034 r6128: fix the build
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
Andrew Bartlett
e074d63f3d 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
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
a3cec189e1 r6109: nicer way to handle compression in the torture test
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
55963934db r6101: only allow properties we know about, that helps to catch typos!
what does length_of() and id() do?

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
f3c64120a1 r6098: fix parsing of empty union cases
metze
2007-10-10 13:11:19 -05:00
Stefan Metzmacher
2a7eead1c8 r6097: allow compression only on subcontexts
metze
2007-10-10 13:11:19 -05:00
Andrew Bartlett
ed5755d9d1 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
2007-10-10 13:11:18 -05:00
Jeremy Allison
857e98e8ea 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.
2007-10-10 13:11:18 -05:00
Jelmer Vernooij
f8a63a843c 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?)
2007-10-10 13:11:18 -05:00
Andrew Tridgell
c4728625c0 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 !
2007-10-10 13:11:18 -05:00
Andrew Tridgell
a6e492f95c r6086: default to stderr for error messages in ldb, so we get errors in ldb_connect() 2007-10-10 13:11:18 -05:00