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

30 Commits

Author SHA1 Message Date
Stefan Metzmacher
9327ec51d1 r4728: split up server_services into:
- stream_socket services
  the smb, ldap and rpc service which sets up a srtam socket end then
  waits for connections
and
- task services
  which this you can create a seperate task that do something
  (this is also going through the process_model subsystem
  so with -M standard a new process for this created
  with -M thread a new thread ...

I'll add datagram services later when we whave support for datagram sockets in lib/socket/

see the next commit as an example for service_task's

metze
(This used to be commit d5fa02746c)
2007-10-10 13:08:49 -05:00
Jelmer Vernooij
31ded4901b r3737: - Get rid of the register_subsystem() and register_backend() functions.
- Re-disable tdbtool (it was building fine on my Debian box but other
					machines were having problems)
(This used to be commit 0d7bb2c40b)
2007-10-10 13:05:48 -05:00
Andrew Tridgell
dde0705807 r3507: - added deferred replies on sharing violation in pvfs open. The
deferred reply is short-circuited immediately when the file is
  closed by another user, allowing it to be opened by the waiting user.

- added a sane set of timeval manipulation routines

- converted all the events code and code that uses it to use struct
  timeval instead of time_t, which allows for microsecond resolution
  instead of 1 second resolution. This was needed for doing the pvfs
  deferred open code, and is why the patch is so big.
(This used to be commit 0d51511d40)
2007-10-10 13:05:23 -05:00
Andrew Tridgell
a99b6219a8 r3481: split out client.h and events.h
(This used to be commit c6f4865744)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
aa34fcebf8 r3466: split out request.h, signing.h, and smb_server.h
(This used to be commit 7c4e6ebf05)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
3643fb1109 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
(This used to be commit b97e395c81)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
0caeda53d3 r3356: in the standard process model we need to make sure we close all
listening sockets after the fork to prevent the child still listening
on incoming requests.

I have also added an optimisation where we use dup()/close() to lower
the file descriptor number of the new socket to the lowest possible
after closing our listening sockets. This keeps the max fd num passed
to select() low, which makes a difference to the speed of select().
(This used to be commit f2a9bbc317)
2007-10-10 13:05:00 -05:00
Andrew Tridgell
990d76f7cb r3314: added a option "socket:testnonblock" to the generic socket code. If
you set this option (either on the command line using --option or in
smb.conf) then every socket recv or send will return short by random
amounts. This allows you to test that the non-blocking socket logic in
your code works correctly.

I also removed the flags argument to socket_accept(), and instead made
the new socket inherit the flags of the old socket, which makes more
sense to me.
(This used to be commit 406d356e69)
2007-10-10 13:04:53 -05:00
Andrew Tridgell
304a9eafd4 r3181: shutdown the secrets db on exit so we don't constantly get talloc leak warnings
(This used to be commit 11713da2ef)
2007-10-10 13:04:37 -05:00
Andrew Tridgell
fef617c31b r3012: added initial support for byte range locking in the posix vfs. This is
enough for us to pass locktest, but does not yet support lock timeouts
and some of the other esoteric features.
(This used to be commit 58a92abd88)
2007-10-10 12:59:57 -05:00
Stefan Metzmacher
250b6254bd r2723: fix some debug messages
metze
(This used to be commit 9600c1a2c7)
2007-10-10 12:59:26 -05:00
Andrew Tridgell
3ea916b227 r2654: fixed some more server memory leaks. We are now down to a single leak
of 16 bytes, caused by the 16 byte data_blob in the smb_signing
code.
(This used to be commit 2f1b788e09)
2007-10-10 12:59:17 -05:00
Andrew Tridgell
9a62dce0ac r2648: - use a destructor on struct server_connection to simplify the
connection termination cleanup, and to ensure that the event
  contexts are properly removed for every process model

- gave auth_context the new talloc treatment, which removes another
  source of memory leaks.
(This used to be commit 230e1cd777)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
764eddb696 r2646: - use a talloc destructor to ensure that sockets from the new socket
library are closed on abnormal termination

- convert the service.h structures to the new talloc methods
(This used to be commit 2dc334a328)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
3e54089bc1 r2588: connect/disconnect is common enough that I don't think a level 0 DEBUG
is warranted to warn that it has happened :)
(This used to be commit ee51eefe17)
2007-10-10 12:59:08 -05:00
Stefan Metzmacher
7d06a06584 r2447: let the server code use the new lib/socket/ stuff
metze
(This used to be commit 2fd577d241)
2007-10-10 12:58:54 -05:00
Stefan Metzmacher
7a0e61f38e r1516: remove the server_connection from the list on the server_socket
and call talloc_destroy(srv_conn->mem_ctx)

also don't follow NULL pointers

metze
(This used to be commit 786c00c3d4)
2007-10-10 12:57:38 -05:00
Stefan Metzmacher
b11e1a41d8 r1515: move dublicate code to a function
metze
(This used to be commit a8ec53c81a)
2007-10-10 12:57:38 -05:00
Stefan Metzmacher
a1748ef743 r1514: close stuff from the server_connection not in the
close_connection fn of a specific service

metze
(This used to be commit 0e1f5e66d3)
2007-10-10 12:57:37 -05:00
Andrew Bartlett
f607197054 r1498: (merge from 3.0)
Rework our random number generation system.

On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

This also requires that we start the secrets subsystem, as that is
where the reseed value is stored, for systems without /dev/urandom.

In order to aviod identical streams in forked children, the random
state is re-initialised after the fork(), at the same point were we do
that to the tdbs.

Andrew Bartlett
(This used to be commit b97d3cb2ef)
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
45a85bdd35 r1486: commit the start of the generic server infastructure
the idea is to have services as modules (smb, dcerpc, swat, ...)

the process_model don't know about the service it self anymore.

TODO:
- the smbsrv should use the smbsrv_send function
- the service subsystem init should be done like for other modules
- we need to have a generic socket subsystem, which handle stream, datagram,
  and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server
  , or for smb or dcerpc or whatever to connect to a server wide auth service)
- and other fixes...

NOTE: process model pthread seems to be broken( but also before this patch!)

metze
(This used to be commit bbe5e00715)
2007-10-10 12:57:35 -05:00
Stefan Metzmacher
118f3edd27 r1291: rename struct smbsrv_context to smbsrv_connection
because this is the connection state per transport layer (tcp)
connection

I also moved the substructs directly into smbsrv_connection,
because they don't need a struct name and we should allway pass the complete
smbsrv_connection struct into functions

metze
(This used to be commit 60f823f201)
2007-10-10 12:56:49 -05:00
Stefan Metzmacher
8bf537d119 r1280: rename struct request_context to smbsrv_request
metze
(This used to be commit a85d2db582)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
d4ae6ae74d r1277: rename struct server_context to smbsrv_ontext
because I need server_context fot the generic server infastructure

metze
(This used to be commit 0712f9f307)
2007-10-10 12:56:48 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Andrew Tridgell
43caaa54e7 r99: make sure we reap child processes in the standard process model
(This used to be commit ad8b3cc1e3)
2007-10-10 12:51:06 -05:00
Stefan Metzmacher
c61089219b - we now specify the object files in the subsystems config.m4 file
I plan to convert all objectfile group to use SMB_SUBSYSTEM
  later I'll add a SMB_BINARY() and SMB_LIBRARY(), then there will be no more need
  to touch Makefile.in, because all make rules will be autogenerated by configure

- convert the PROCESS_MODEL subsystem to this new scheme
  and move the pthread test to smbd/process_model.m4

- convert the CHARSET subsystem to this new scheme
  and move the iconv test to lib/iconv.m4
(This used to be commit 2e57ee884e)
2004-02-02 13:43:03 +00:00
Andrew Tridgell
d262b8c3c7 completed the linkage between the endpoint mapper and the dcerpc
server endpoints. We can now successfully setup listening endpoints on
high ports, then use our endpoint mapper redirect incoming clients to
the right port.

also greatly cleanup the rpc over tcp session handling.
(This used to be commit 593bc29bbe)
2003-12-13 23:25:15 +00:00
Andrew Tridgell
d4705378ce dcerpc over tcp in the samba4 server now works to some extent. It
needs quite a bit more work to get it finished. The biggest missing
feature is the lack of NTLMSSP which is needed for basic
authentication over tcp
(This used to be commit 9fb0f03693)
2003-12-13 10:58:48 +00:00
Andrew Tridgell
ef2e26c91b first public release of samba4 code
(This used to be commit b0510b5428)
2003-08-13 01:53:07 +00:00