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

98 Commits

Author SHA1 Message Date
Gary Lockyer
b852ad044b source4/smbd: refactor the process model for prefork
Refactor the process model code to allow the addition of a prefork
    process model.

    - Add a process context to contain process model specific state
    - Add a service details structure to allow service to indicate which
      process model options they can support.

    In the new code the services advertise the features they support to the
    process model.  The process model context is plumbed through to allow the
    process model to keep track of the supported options, and any state
    the process model may require.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-10-19 05:33:09 +02:00
Michael Adam
476672b647 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Andrew Bartlett
56e760f8f1 s4-smb_server No longer follow the security=share smb.conf directive
By ignoring the value of security= from the smb.conf, we can allow this
to instead set the value of 'server role' in a manner compatible
with the Samba 3.x release stream.

Andrew Bartlett
2011-11-08 02:58:06 +01:00
Andrew Tridgell
8b2ba64d60 libds: moved enum security_types to a common header
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-05-08 10:56:27 +02:00
Andrew Bartlett
ea0ac9cdfc s4-auth Rename auth -> auth4 to avoid conflict with s3 auth 2011-05-08 10:56:26 +02:00
Andrew Tridgell
ef7f4a1420 s4-server: make server sockets a child of the task context
We previously allocated sockets as direct children of the event
context. That led to crashes if a service called
task_server_terminate(), as it left the socket open and handling
events for a dead protocol.

Making them a child of the task allows the task to terminate and take
all its sockets with it.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-15 10:19:34 +11:00
Kai Blin
4ffdf09623 netlogon.idl: Switch to explicit constants to remove dependency on nbt.idl 2010-10-23 10:17:05 +00:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Stefan Metzmacher
081f8883ba s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze
2008-12-17 11:04:45 +01:00
Sam Liddicott
7d8f3cdbfc Let ntvfs request transport close via ntvfs_request state
[I can't swear that this covers all the smb2 cases, there are some reply
functions that I can't trace properly]

Add NTVFS_ASYNC_STATE_CLOSE bit to ntvfs_request->async_states->state
so that the ntvfs layer can signify that the client transport should
be closed, most useful for proxy servies, and most likely due to a
forwarding transport having been closed.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-05 12:52:13 +01:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Andrew Tridgell
63685c7d02 record highest seq number in SMB2 to check for seqnum going backwards 2008-09-24 18:10:23 -07:00
Stefan Metzmacher
8623e2cc4c smb2srv: correctly hold the signing state per session
metze
(This used to be commit 5b3ba3f355)
2008-07-28 14:09:45 +02:00
Stefan Metzmacher
5e4b8d6e51 smb_server/smb: prepare multi fragmented nttrans requests
metze
(This used to be commit 36a39b92d7)
2008-07-07 20:59:19 +02:00
Andrew Tridgell
e97cf207fa added server side SMB2 signing
(This used to be commit 8e919dcb08)
2008-06-06 22:10:30 -07:00
Andrew Tridgell
e870cfec9f Convert SMB and SMB2 code to use a common buffer handling structure
This converts our SMB and SMB2 code to use a common structure "struct
request_bufinfo" for information on the buffer bounds of a packet,
alignment information and string handling. This allows us to use a
common backend for SMB and SMB2 code, while still using all the same
string and blob handling functions.

Up to now we had been passing a NULL req handle into these common
routines from the SMB2 side of the server, which meant that we failed
any operation which did a bounds checked string extraction (such as a
RenameInformation setinfo call, which is what Vista uses for renaming
files)

There is still some more work to be done on this - for example we can
now remove many of the SMB2 specific buffer handling functions that we
had, and use the SMB ones.
(This used to be commit ca6d9be6cb)
2008-02-14 10:12:33 +11:00
Andrew Tridgell
ccc27e681c fixed up the .in side of SMB2 negprot
fixed the input side of the SMB2 negprot structure and parsers according to the documentation
(This used to be commit 55af8acc7b)
2008-02-12 12:54:44 +11:00
Jelmer Vernooij
b83a7a135f r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection.
(This used to be commit 7c00866423)
2007-12-21 05:47:47 +01:00
Jelmer Vernooij
bbdfbf8d9d r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a553054)
2007-12-21 05:47:20 +01:00
Jelmer Vernooij
6c999cd123 r26236: Remove more uses of global_loadparm or specify loadparm_context explicitly.
(This used to be commit 5b29ef7c03)
2007-12-21 05:47:15 +01:00
Jelmer Vernooij
166284d9c1 r24940: Fix undeclared warning.
(This used to be commit bbc4650871)
2007-10-10 15:03:40 -05:00
Jelmer Vernooij
8e2d624a58 r24937: Merge tests spoolss RPC callbacks.
(This used to be commit 9b256a0ca2)
2007-10-10 15:03:39 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
10498e8a72 r23044: - use uint32_t for handle id's
- include the session vuid in the SMB2 128-Bit wire handles
  as SMB2 oplock breaks doesn't include a TID or VUID in the header
  we need to make sure the handle is unique for the whole TCP connection

metze
(This used to be commit 7c29b8a7e6)
2007-10-10 14:52:44 -05:00
Andrew Tridgell
1b5c28a627 r18211: wct is not a size, so don't use size_t
this should fix a pile of printf format warnings
(This used to be commit fe209e360e)
2007-10-10 14:17:50 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Simo Sorce
9c66f601f1 r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
(This used to be commit a89cc346b9)
2007-10-10 14:10:18 -05:00
Stefan Metzmacher
8075ce63fd r17084: implement SMB2 Cancel in the server,
that makes it possible for clients to cancel
async requests, like NOTIFY...

metze
(This used to be commit eaccd3c435)
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
3b36a85798 r16950: remove the smb mid from the ntvfs layer and keep a list of pending
requests on the smbsrv_connection, to be able to match then on
ntcancel

metze
(This used to be commit 04f0d3d031)
2007-10-10 14:10:02 -05:00
Stefan Metzmacher
54fba07f01 r16923: remove unused substitude code
metze
(This used to be commit ea88c8c99e)
2007-10-10 14:10:01 -05:00
Stefan Metzmacher
2a3bcdb530 r16450: fix the build...
metze
(This used to be commit 316f3312d2)
2007-10-10 14:09:16 -05:00
Stefan Metzmacher
f8dc3bbf9f r16410: remove some warnings of talloc_steal() usage without target
I only commit this as this is used in a global macro

tridge: we should try to get rid of this warning without using
	(void)talloc_steal(ctx, ptr);
	everywhere!!!

metze
(This used to be commit 3f8ce6d680)
2007-10-10 14:09:13 -05:00
Stefan Metzmacher
594ae8f9e1 r16023: we don't need a global variable here...
noticed by the Mac OS 10 linker

metze
(This used to be commit 5928112cbc)
2007-10-10 14:08:51 -05:00
Andrew Tridgell
f6c9fbbc50 r15799: fixed the problem with BASE-DISCONNECT after the recent memory leak
was fixed
(This used to be commit 09a9c7fdff)
2007-10-10 14:08:22 -05:00
Andrew Tridgell
00e772d747 r15796: this talloc_reference() was causing a memory leak on every NTVFS
request. The problem is that the talloc_free() in
smbsrv_send_reply_nosign() frees this reference, but doesn't free the
memory iself, thus leaving it attached to the connection context.

Metze, what was the idea behind this reference? If we need it, then we
need a corresponding talloc_free() to go with it.
(This used to be commit 2e105a32c7)
2007-10-10 14:08:21 -05:00
Stefan Metzmacher
e9cf630ec7 r15745: - reorder the elements of smbsrv_request
- move the SMB specific elements to the end

metze
(This used to be commit 0be887c7c6)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
9ef33f5f5c r15734: This is a major change to the NTVFS subsystem:
- to use a struct ntvfs_handle instead of a uint16_t fnum.
  (to make it independend from the frontend protocol)
- the allocation of handles now is provided by the frontend
  (smbsrv_*) via callbacks and not by each backend module
- this also makes sure that file handles are only passed
  to the ntvfs subsystem when the tcon and session matches,
  so modules can rely on this and need to check this.
- this allows multiple modules in the ntvfs module chain
  to allocate file handles. This can be used for virtual
  files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"...
- also this will make SMB2 with 128 bit file handles possible

metze
(This used to be commit 287fc1c22d)
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
316269a075 r14739: keep the last request time for the smbsrv_connection,
smbsrv_session and smbsrv_tcon for management tools

metze
(This used to be commit 2c87f210e9)
2007-10-10 13:59:18 -05:00
Stefan Metzmacher
ad06a8bd65 r14736: - the ntvfs subsystem should not know about smb_server.h
- the process module subsystem should not know about smb_server.h
- the smb_server module should not know about process models

metze
(This used to be commit bac95bb8f4)
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
61fa658ebc r14541: separate smbsrv_request and ntvfs_request,
with this it's now possible to write a
ntvfs_test programm like the vfstest in samba3

also smb2 support will be possible later

metze
(This used to be commit 7253153691)
2007-10-10 13:58:41 -05:00
Jelmer Vernooij
5b0051e032 r14511: Install more headers
(This used to be commit e1f896948f)
2007-10-10 13:57:35 -05:00
Stefan Metzmacher
d3087451c4 r14487: split smbsrv_request into two parts, one will be moved to ntvfs_request
but I don't to get the commit to large, to I'll do this tomorrow...

metze
(This used to be commit 10e627032d)
2007-10-10 13:57:32 -05:00
Stefan Metzmacher
2e7df84576 r14456: don't access the smbsrv_tcon inside the ntvfs modules
metze
(This used to be commit 5709c1c4e1)
2007-10-10 13:57:26 -05:00
Stefan Metzmacher
5555e28cab r14447: remove unused stuff
metze
(This used to be commit 4df843658f)
2007-10-10 13:57:26 -05:00
Stefan Metzmacher
86497db611 r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request,
   but it's the first step...)
- rename ntvfs_openfile() -> ntvfs_open()
- fix the talloc hierachie in some places in the ntvfs_map_*() code

metze
(This used to be commit ed9ed1f48f)
2007-10-10 13:56:55 -05:00
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
(This used to be commit ba62880f5b)
2007-10-10 13:52:05 -05:00
Andrew Bartlett
941c1566e5 r13403: Try to better handle a case where SPNEGO isn't available (allow us to
emulate the behaviour of XP standalone if required).

Andrew Bartlett
(This used to be commit 7f821097fb)
2007-10-10 13:51:53 -05:00
Jelmer Vernooij
5c8447773f r12801: Some more include/ cleanups (remove unused macros + move files
to specific dirs)
(This used to be commit 243cf760b0)
2007-10-10 13:49:57 -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