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

65 Commits

Author SHA1 Message Date
Andrew Bartlett
34aa19cafe r13317: Create a new function messaging_client_init() which can be used when
we don't have a server messaging context.  We should replace the
datagram messages with stream sockets in this case, so we don't have
to create a unique socket.

Andrew Bartlett
(This used to be commit fd974fb647)
2007-10-10 13:51:43 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881)
2007-10-10 13:49:57 -05:00
Andrew Tridgell
dc0dde70d8 r12783: add a comment about matching more than 1 handler per message (andrew
thought this might be a bug)
(This used to be commit e1cd3f4b89)
2007-10-10 13:49:54 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
d658de65d3 r12512: Use GUID structs in API functions everywhere rather then converting back and
forth between GUID structs and strings in several places.
(This used to be commit 3564e2f967)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Stefan Metzmacher
150848248a r12014: free the irpc_request structure with the irpc_call_recv functions,
to match all other _recv functions we have

metze
(This used to be commit bd4f85ab5f)
2007-10-10 13:46:59 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Andrew Tridgell
06085e7bc0 r10490: - allow deferred irpc replies to set the status
- add an example of deferred reply for echodata in LOCAL-IRPC
(This used to be commit 858a757a6d)
2007-10-10 13:38:54 -05:00
Andrew Tridgell
87f71eb8ad r10489: added the ability for irpc server to defer replies instead of replying
immediately. They set m->defer_reply = True;
(This used to be commit 3dcd800a5d)
2007-10-10 13:38:54 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
b1c3c66ead r10332: Fix the build - messaging uses UNIX_PRIVS
(This used to be commit df4a923c64)
2007-10-10 13:38:28 -05:00
Andrew Tridgell
08b2b7e3e1 r8923: put the IRPC default timeout back to 10s (I didn't mean to commit this, it was
changed just for deugging)
(This used to be commit a7c260e61f)
2007-10-10 13:30:58 -05:00
Andrew Tridgell
fc58570940 r8887: fixed the irpc error that caused ia64 to fail the LOCAL-IRPC test
(This used to be commit ce9a262d37)
2007-10-10 13:30:15 -05:00
Andrew Tridgell
ba759b4c86 r8819: fixed a memory leak in irpc_call()
(This used to be commit 25b7524ce5)
2007-10-10 13:30:08 -05:00
Andrew Tridgell
7ee2babcfe r8587: - fixed ref allocation in irpc replies
- make every irpc server support the irpc_uptime() call
(This used to be commit eee9044826)
2007-10-10 13:29:42 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
056096c30b r8284: - fixed some uninitialised variables in the irpc code
- added code to send multiple irpc calls in parallel, to all servers
  that have registered the given name, with output going in
  io.results[i]. This allows you to make rpc calls to multiple servers
  at once, which is needed for clients like smbstatus
(This used to be commit 061e20e509)
2007-10-10 13:19:31 -05:00
Andrew Tridgell
d084d6d241 r8279: make sure we hold a lock when manipulating the irpc names db
(This used to be commit 9c408d5d7c)
2007-10-10 13:19:30 -05:00
Andrew Tridgell
144b88b3a0 r8277: filled in the code for finding irpc server ids by name, storing the
names in a tdb
(This used to be commit b603a52f27)
2007-10-10 13:19:30 -05:00
Andrew Tridgell
c6881d1e65 r8272: added the hooks for adding a name to a messaging context, so we will
be able to send a message to the "ldap_server" task without having to
know its task ID.
(This used to be commit 8f69867867)
2007-10-10 13:19:29 -05:00
Stefan Metzmacher
4a8c3a9e62 r8042: give better error message
metze
(This used to be commit 70118e9529)
2007-10-10 13:19:02 -05:00
Jelmer Vernooij
66a52992ff r7850: Support mkdir() with just one parameter. Patch from
Steven Edwards <steven_ed4153@yahoo.com>.

I've moved the Win32-specific tests to win32.m4 so it does not
make any of the POSIX configure stuff more complicated.
(This used to be commit bf85fdd015)
2007-10-10 13:18:42 -05:00
Andrew Tridgell
0093e1b62c r7320: added support for a private pointer in irpc registered handlers
(This used to be commit eec521dffd)
2007-10-10 13:17:41 -05:00
Andrew Tridgell
37fdb858b0 r7298: ensure messages are sent in order even when under extreme load. This
fixes a IO_TIMEOUT problem in the messaging benchmarks
(This used to be commit c8b220b65d)
2007-10-10 13:17:38 -05:00
Andrew Tridgell
b4a95b949e r7296: avoid two stat() calls per message. This increases the raw message
rate from 20k/sec to 55k/sec. The irpc rate goes from 16k/sec to
34k/sec.

I should have run strace -T on this a long time ago.
(This used to be commit b9281668bb)
2007-10-10 13:17:38 -05:00
Andrew Tridgell
d934cb71d0 r7295: added an irpc benchmark. It gets about 16k messages/sec on my laptop,
compared to about 20k messages/sec for the raw messaging layer. I
think that is quite acceptable given the extra functionality.
(This used to be commit a05d38d1d9)
2007-10-10 13:17:38 -05:00
Andrew Tridgell
bf1ffa283c r7294: implemented the irpc messaging system. This is the core of the
management system I proposed on samba-technical a couple of days
ago. Essentially it is a very lightweight way for any code in Samba to
make IDL based rpc calls to anywhere else in the code, without the
client or server having to go to the trouble of setting up a full rpc
service.

It can be used with any of our existing IDL, but I expect it will
mostly be used for a new set of Samba specific management calls.

The LOCAL-IRPC torture test demonstrates how it can be used by calling
the echo_AddOne() call over this transport.
(This used to be commit 3d589a0995)
2007-10-10 13:17:37 -05:00
Andrew Tridgell
a8feef8d36 r7228: use socket_pending() instead of the direct ioctl in the messaging code
(This used to be commit ca3c4e9617)
2007-10-10 13:17:28 -05:00
Andrew Tridgell
f1ade86d75 r7211: - use ioctl(FIONREAD) to remove the artificial limit on messaging size
- avoid a memcpy
(This used to be commit 753839c358)
2007-10-10 13:17:26 -05:00
Andrew Tridgell
dd43abbd32 r7206: changed the messaging library to use sendto instead of a connected
send on the unix domain datagram socket. This gains us about 50% in
speed, and also means that we don't run the risk of running out of
file descriptors due to heavy messaging traffic. We now use a single
file descriptor no matter how many messages are pending to any number
of servers.
(This used to be commit 2369170fc1)
2007-10-10 13:17:26 -05:00
Andrew Tridgell
fc5c075cff r6578: brown paper bag time with the new messaging code ....
(This used to be commit d465ff67bd)
2007-10-10 13:16:27 -05:00
Andrew Tridgell
7282ddda0a r6561: re-did the internal message system based on DGRAM unix domain
sockets. This gains us about 40% in messaging speed.
(This used to be commit f244a64ed5)
2007-10-10 13:16:25 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4d)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
55d4d36993 r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.

Major changes include:

 - simplified the process model code a lot.

 - got rid of the top level server and service structures
   completely. The top level context is now the event_context. This
   got rid of service.h and server.h completely (they were the most
   confusing parts of the old code)

 - added service_stream.[ch] for the helper functions that are
   specific to stream type services (services that handle streams, and
   use a logically separate process per connection)

 - got rid of the builtin idle_handler code in the service logic, as
   none of the servers were using it, and it can easily be handled by
   a server in future by adding its own timed_event to the event
   context.

 - fixed some major memory leaks in the rpc server code.

 - added registration of servers, rather than hard coding our list of
   possible servers. This allows for servers as modules in the future.

 - temporarily disabled the winbind code until I add the helper
   functions for that type of server

 - added error checking on service startup. If a configured server
   fails to startup then smbd doesn't startup.

 - cleaned up the command line handling in smbd, removing unused options
(This used to be commit cf6a46c3cb)
2007-10-10 13:09:22 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
6c14b0133d r4944: every event_add_*() caller was having to call talloc_steal() to take
control of the event, so instead build that into the function. If you
pass NULL as mem_ctx then it leaves it as a child of the events
structure.
(This used to be commit 7f981b9ed9)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
fd62df6418 r4943: Smplified the events handling code a lot. The first source of
complexity was that events didn't automatically cleanup
themselves. This was because the events code was written before we had
talloc destructors, so you needed to call event_remove_XX() to clean
the event out of the event lists from every piece of code that used
events. I have now added automatic event destructors, which in turn
allowed me to simplify a lot of the calling code.

The 2nd source of complexity was caused by the ref_count, which was
needed to cope with event handlers destroying events while handling
them, which meant the linked lists became invalid, so the ref_count ws
used to mark events for later destruction.

The new system is much simpler. I now have a ev->destruction_count,
which is incremented in all event destructors. The event dispatch code
checks for changes to this and handles it.
(This used to be commit a3c7417cfe)
2007-10-10 13:09:08 -05:00
Stefan Metzmacher
cfc10f2a83 r4727: add a reference to the event context
to that the destructor don't double free the registered events
when the event context is first in the talloc_free() hierarchie

fixes a bug with process_model_thread and the talloc_steal(conn, ev)

metze
(This used to be commit 05c3d1c4a6)
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
9112a632f6 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
(This used to be commit b94f92bc66)
2007-10-10 13:06:21 -05:00
Jelmer Vernooij
8e16d8a76f r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
(This used to be commit 64826da834)
2007-10-10 13:05:47 -05:00