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

564 Commits

Author SHA1 Message Date
Andrew Bartlett
589a42e2da s4:auth Change auth_generate_session_info to take an auth context
The auth context was in the past only for NTLM authentication, but we
need a SAM, an event context and and loadparm context for calculating
the local groups too, so re-use that infrustructure we already have in
place.

However, to avoid problems where we may not have an auth_context (in
torture tests, for example), allow a simpler 'session_info' to be
generated, by passing this via an indirection in gensec and an
generate_session_info() function pointer in the struct auth_context.

In the smb_server (for old-style session setups) we need to change the
async context to a new 'struct sesssetup_context'.  This allows us to
use the auth_context in processing the authentication reply .

Andrew Bartlett
2010-04-14 10:30:51 +10:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
b0fb567f04 s4-waf: more dependencies on talloc
these are needed so we can support a system talloc without using the
bundled talloc.h
2010-04-06 20:27:13 +10:00
Andrew Tridgell
b9aa63887c s4-waf: cleanup use of LIBPOPT vs popt dependency 2010-04-06 20:27:13 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
6f15ea31c2 build: install samba in sbin 2010-04-06 20:26:55 +10:00
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Andrew Tridgell
b60da39da6 s4: added a simple implementation of bin/samba -b
this shows the config paths. Useful for debugging --enable-fhs
2010-03-29 21:34:29 +11:00
Andreas Schneider
a6f25fc635 s3-smbd: Don't close stdout if we want to log to stdout. 2010-03-26 14:48:54 +01:00
Andrew Tridgell
789d67c499 s4-smbd: use tevent_re_initialise()
This fixes a crash bug on startup
2010-03-26 21:13:55 +11:00
Stefan Metzmacher
ae049c49df s4:libcli/wrepl: rewrite the low level request handling to use tevent_queue and tstream_context
metze
2010-03-07 17:12:39 +01:00
Andreas Schneider
81bb8f67fa s4-smb: Migrate named_pipe_server to tsocket.
This is an improved version of commit 69d5cea2e5,
which was reverted by commit 71c20f703b.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-26 08:57:31 +01:00
Andrew Tridgell
781ad038c9 s4-krb5: propogate errors from a lot more kerberos functions
We need to be able to give sensible error messages when a kerberos
calls fails. This propogates the kerberos error up the stack to the
caller.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-26 13:59:16 +11:00
Simo Sorce
71c20f703b Revert "s4-smb: Migrate named_pipe_server to tsocket."
This reverts commit 69d5cea2e5.

This commit causes issues with the RPC server, revert it until we find the
exact issue and possibly have a torture test to avoid it happening again.
Found playing with w2k8r2 and forest trusts.
2010-02-24 18:35:47 -05:00
Simo Sorce
1203de99b1 s4:schannel merge code with s3
After looking at the s4 side of the (s)channel :) I found out that it makes
more sense to simply make it use the tdb based code than redo the same changes
done to s3 to simplify the interface.

Ldb is slow, to the point it needs haks to pre-open the db to speed it up, yet
that does not solve the lookup speed, with ldb it is always going to be slower.

Looking through the history it is evident that the schannel database doesn't
really need greate expanadability. And lookups are always done with a single
Key. This seem a perfet fit for tdb while ldb looks unnecessarily complicated.

The schannel database is not really a persistent one. It can be discared during
an upgrade without causing any real issue. all it contains is temproary session
data.
2010-02-23 12:46:50 -05:00
Andreas Schneider
69d5cea2e5 s4-smb: Migrate named_pipe_server to tsocket. 2010-02-23 13:48:21 +01:00
Andreas Schneider
95a0ab5f11 s4-smbd: Remove obsolete singal type cast from the thread process model. 2010-02-23 12:23:44 +01:00
Brad Hards
1e986c1cb3 More spelling fixes across source4/
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:38 +01:00
Matthias Dieter Wallnöfer
eed65ed337 s4:server.c - use always "return" instead of "exit" in the "binary_smbd_main" function
Just to be consistent - no functional change
2010-02-13 18:24:07 +01:00
Andrew Tridgell
f69135e0e9 s4-smbd: fix crash in notify code on client termination
We need to free the lp_ctx after we free the event context, otherwise
the teardown code in the notify backend dies when it tries to use the
iconv_convenience ptr

Fixes bug 7053
2010-02-13 23:12:29 +11:00
Andrew Tridgell
89b6a80e72 s4-dns: added a dns update task
This task watches for changes in the list of DCs, and creates a bind9
formatted file that grants update permission to all DCs, plus to the
administration, and machines update for their own names.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-11 21:04:14 +11:00
Andrew Tridgell
a894eeab77 s4-debug: lower the verbosity of a couple of common log messages 2010-01-09 21:59:34 +11:00
Andrew Tridgell
278d2f75ba s4-smbd: setup the default event contexts for other process models 2010-01-08 13:03:05 +11:00
Andrew Tridgell
dcbba583d9 s4-event: added s4_event_context_set_default()
we're still not weaned off event_context_find()
2010-01-08 13:03:02 +11:00
Stefan Metzmacher
a06e5cdb99 s4: Happy New Year 2010
metze
2010-01-04 08:42:49 +01:00
Stefan Metzmacher
500f55ca92 s4:smbd: hold tsocket_addresses on the stream_connection
metze
2009-12-24 17:38:33 +01:00
Andrew Tridgell
890e7719cf s4-ldb: move the tdb_reopen_all() calls to ldb_wrap.c 2009-10-23 14:52:18 +11:00
Andrew Tridgell
a7cc448dc2 s4-server: call the ldb_wrap_fork_hook() after a fork()
This will be used to allow us to cancel any pending transactions
after a fork.
2009-10-23 14:52:18 +11:00
Andrew Tridgell
33756d6374 s4-server: pre-open the main ldb databases in the server
By pre-opening these databases and leaving them open, we allow the new
ldb_wrap_connect() code to share the ldb context between users.
2009-10-23 14:52:18 +11:00
Matthias Dieter Wallnöfer
dedd32d323 s4:server.c - add linespace (only cosmetic) 2009-09-20 22:17:35 +02:00
Andrew Tridgell
72c60db126 s4-smbd: removed unnecessary includes 2009-09-19 14:11:58 -07:00
Andrew Tridgell
7c807de6b8 s4-smbd: minimise includes in smbd/ and smb_server 2009-09-19 14:11:54 -07:00
Andrew Tridgell
e9a589feac s4-server: kill main daemon if a task fails to initialise
When one of our core tasks fails to initialise it can now ask for the
server as a whole to die, rather than limping along in a degraded
state.
2009-09-18 18:05:55 -07:00
Stefan Metzmacher
bb0644175a s4:service_named_pipe: accept delegated credentials
metze
2009-09-18 20:34:41 +02:00
Andrew Tridgell
61facf4266 s4-kcc: add a very simple KCC
A KCC is a 'Knowledge Consistency Checker', a fancy name for a daemon
that works out who will replicate with who in a AD domain. This
implements an extremely simple KCC task that just wants to replicate
with everyone :-)
2009-09-11 22:13:45 +10:00
Andrew Tridgell
c271dc998b ensure that child tasks die when the parent dies
Previously we relied on process groups and SIGTERM to ensure that
child tasks died in the standard process model when the parent task
died. This doesn't work when the server is run in interactive mode, as
in that case we don't call become_daemon() and don't get a separate
process group.

The fix is to have a pipe held open by the parent server process, and
inherited by child tasks. If the parent exits then the write side of
the pipe is implicitly closed, which causes an event in the child
tasks that causes them to exit
2009-08-07 17:24:48 +10:00
Andrew Tridgell
cfc0cabb27 prime the sam ldb schema in the parent samba process
While testing the use of the standard process model with 'make test' I
found that testing was much slower (by several times) with the
standard model than with the single model. The primary problem was
that each SMB connection would open a new sam ldb context, and all of
those would reload the full AD schema.

The fix is to pre-open the SAM during server startup, before any child
processes are forked. This sets up the global schema context which is
inherited by all connections.

The standard model is still slower at make test than the single model,
but not by nearly as much. I am working on further reducing the gap.
2009-08-07 17:24:48 +10:00
Volker Lendecke
4b3e89c2e7 Fix Coverity 911: FORWARD_NULL. Metze, please check! 2009-05-02 13:14:14 +02:00
Stefan Metzmacher
fe9b552023 s4:smbd: depend on NAMED_PIPE_AUTH_TSTREAM...
metze
2009-05-01 17:42:09 +02:00
Stefan Metzmacher
2ae92c7599 s4:smbd: add support for named_pipe_auth level 2 in service_named_pipe...
metze
2009-05-01 17:42:06 +02:00
Stefan Metzmacher
6ef1442360 s4:smbd: the name of the binary is "samba" now
metze
2009-03-21 10:44:40 +01:00
Steven Danneman
116ce19b10 Moved become_daemon() and close_low_fds() to shared util lib 2009-02-20 16:30:12 -08:00
Stefan Metzmacher
d9c30894a1 s4:service_stream: s/private/private_data
metze
2009-02-02 13:09:00 +01:00
Stefan Metzmacher
1441e87e24 s4:service_task: s/private/private_data
metze
2009-02-02 13:08:59 +01:00
Stefan Metzmacher
29cc638c2c s4:smbd: s/private/private_data
metze
2009-02-02 13:08:36 +01:00
Stefan Metzmacher
a83feb2fe3 s4:auth: move make_server_info_netlogon_validation() function arround
metze
2009-01-21 13:36:11 +01:00
Jelmer Vernooij
da656c2e87 Use AS_HELP_STRING() in a couple more places. 2009-01-15 21:22:34 +01:00
Stefan Metzmacher
47d532fa68 s4:smbd: convert to tevent_* api
metze
2009-01-03 19:58:57 +01:00
Stefan Metzmacher
5fa0d3d568 s4:socket: use a socket_wrapper aware function to auto close the fd event for sockets
metze
2009-01-03 19:58:53 +01:00
Stefan Metzmacher
8b81e7c7c6 Happy New Year!
metze
2009-01-02 09:45:14 +01: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
e36d64728f s4:cluster: remove old/broken ctdb code
We don't need a full copy of ctdb...
If we want to readd cluster support,
we should just use a ctdb client library.

metze
2008-12-29 14:46:09 +01:00
Jelmer Vernooij
1feab85be6 Rename samba-socket -> samba_socket to fix a couple more compiler
warnings.
2008-12-24 00:15:43 +01:00
Jelmer Vernooij
c023828962 Fix missing symbols issues when building with shared libraries. 2008-12-22 21:03:09 +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
Jelmer Vernooij
0f04beff33 Rename dom_sid.idl -> server_id.idl (since it no longer actually contains the dom_sid). No longer include it from security.idl. 2008-12-16 15:36:18 +01:00
Stefan Metzmacher
21aa4ea6b9 s4: smbd: implement stream_socket_named_pipe()
For now implement just a very simple protocol
to negotiate the transport session info.

We may need to pass more info later,
e.g. client ip or name...

metze
2008-11-06 21:39:13 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
aaa3e0425d Fix includes. 2008-10-15 02:52:10 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Jelmer Vernooij
2400b1fea2 Fix segfault. 2008-09-30 04:22:54 +02:00
Jelmer Vernooij
2ba4a79210 Eliminate another global_loadparm. 2008-09-30 03:20:46 +02:00
Andrew Tridgell
59847fd6b6 log stream termination 2008-09-24 18:10:23 -07:00
Jelmer Vernooij
6a689c23e8 Rename smbd -> samba.
This reverts commit 05ea5e23cf.

Conflicts:

	source4/smbd/server.c
2008-09-24 03:16:15 +02:00
Stefan Metzmacher
1d92b2211c s4: allways initialize the process model before it's used
metze
2008-09-22 18:16:09 +02:00
Stefan Metzmacher
bee2b6c3a3 process incoming connections and fork a samba3 in inetd mode 2008-09-22 04:38:06 +02:00
Jelmer Vernooij
05ea5e23cf Revert "Rename smbd -> samba."
This reverts commit 0e9008be35.
2008-09-21 21:32:40 +02:00
Jelmer Vernooij
0e9008be35 Rename smbd -> samba. 2008-09-21 21:26:40 +02:00
Jelmer Vernooij
7111645d3c Use single copy of tdb in both samba3 and samba4. 2008-09-16 15:16:31 +02:00
Stefan Metzmacher
197c25487e smbd: make sure the parent smbd stays alive forever
The problem was that the parent smbd doesn't have
any event when the process model standard was in use.

Now we always add an fd event for stdin, but may not
ask for any events to trigger.

metze
(This used to be commit fa6c00734c)
2008-06-20 11:03:12 +02:00
Andrew Bartlett
00bde569b7 Fix segfault caused by talloc_free() being called while still processing
The problem here was that with the packet code set to serialise, we
can have multiple packets 'processing' at once, and previously the
second packet (allowed because we are spining on an event context down
the stack) would clear the flag.

Andrew Bartlett
(This used to be commit 3378911124)
2008-06-19 17:59:57 +10:00
Simo Sorce
2daf2897d5 Use a custom init function for samba4 that sets a samba4
specific debug function.
By default do not debug, this is the most appropriate action for a library
as we cannot assume what stderr is use for in the main app.
The main app is responsible to set ev_debug_stderr if they so desire.
(This used to be commit e566a2f308)
2008-06-14 13:00:53 -04:00
Jelmer Vernooij
21a11373e0 Fix prototype for pthread process model.
(This used to be commit 280c411613)
2008-06-14 12:14:27 +02:00
Andrew Bartlett
baa2dffdf3 Bring up the ntp signing deamon
This starts ntp_signd at startup, and fixes some build issues.

Andrew Bartlett
(This used to be commit cb0dcd5c3d)
2008-05-28 13:21:26 +10:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
137ec6e340 Use variables for source directory in a couple more places.
(This used to be commit 2860a7db59)
2008-05-18 19:46:09 +02:00
Jelmer Vernooij
4f0db42958 Use variables for source directory in a couple more places.
(This used to be commit 56bb2907c6)
2008-05-18 19:41:33 +02:00
Stefan Metzmacher
250478d044 smbd: pass down lp_ctx to stream_new_connection_merge()
metze
(This used to be commit 91e9062265)
2008-05-17 02:15:18 +02:00
Stefan Metzmacher
626b2da5a9 smbd: add session_info to struct stream_connection
NULL represents an anoymous connection, as that's
cheaper than always calling auth_anonymous_session_info(),
That means if the caller wants to use the transport layer
session_info he should call auth_anonymous_session_info()
to create the session info.

metze
(This used to be commit 3777d0307b)
2008-05-17 01:54:18 +02:00
Jelmer Vernooij
b5d84a74d1 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
2008-04-08 03:45:06 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Jelmer Vernooij
39b2fc37f2 Add context pointer to secrets functions.
(This used to be commit 873941d8a8)
2008-04-01 15:26:00 +02:00
Jelmer Vernooij
f41b9a9dde Rename libsamba-config to libsamba-hostconfig.
(This used to be commit c46b7e90e3)
2008-04-01 15:08:30 +02:00
Jelmer Vernooij
fb6fdfce37 Fix the build.
(This used to be commit f2e4974471)
2008-03-08 17:02:40 +01:00
Jelmer Vernooij
2bf39edc9d Push SOVERSION and VERSION out of perl code.
(This used to be commit 0ba8ac6a14)
2008-03-08 15:28:12 +01:00
Jelmer Vernooij
6cf92e604d Fix the build.
(This used to be commit 49ef8d0c19)
2008-03-04 13:06:08 +01:00
Jelmer Vernooij
b29d47edcf Move object file lists to the Makefile.
(This used to be commit a7e6d2a183)
2008-03-03 18:25:28 +01:00
Jelmer Vernooij
d8d9a6ef04 Move manpage management out of the perl build system.
(This used to be commit 1dd6bea507)
2008-02-29 14:12:23 +01:00
Jelmer Vernooij
c8011b5d09 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/scripting/python/config.mk
(This used to be commit 0ac0ea660a)
2008-02-29 12:45:46 +01:00
Jelmer Vernooij
2ba62662f8 Remove sDefault as static variable.
(This used to be commit 16f36ce499)
2008-02-28 20:04:58 +01:00
Jelmer Vernooij
5374be2acb More share_init to more apprioriate place.
(This used to be commit 9901355176)
2008-02-28 18:06:23 +01:00
Jelmer Vernooij
649f820998 Set lp_ctx properly.
(This used to be commit 5d274f19ae)
2008-02-27 19:37:04 +01:00
Jelmer Vernooij
c8af9559dc Move manpage management out of the perl build system.
(This used to be commit a660ab262e)
2008-02-26 15:11:47 +01:00
Stefan Metzmacher
3fa76092e6 Happy New Year 2008! :-)
metze
(This used to be commit a601ecff4e)
2008-02-22 14:08:13 +01:00
Jelmer Vernooij
0020793515 Fix static module list generation for ldb.
(This used to be commit 92c1c0e913)
2008-02-20 03:40:44 +01:00
Stefan Metzmacher
3a0cfad223 prefork: also reload stuff in the client processes
metze
(This used to be commit 36012c386b)
2008-02-06 14:44:20 +01:00
Andrew Bartlett
24d0587752 Clarify nomaclature of socket names in process_single and process_prefork
Fix talloc_steal in both cases to steal connected socket (from accept)
onto it's private structure, rather than stealing the bound socket.

Remove termination code from the prefork modal, we want the process to
still stay around, to serve future clients.

Andrew Bartlett and David Disseldorp
(This used to be commit 07590d893e)
2008-02-05 14:51:01 +11:00
Andrew Bartlett
0f8eeb81ec Remove useless layer of indirection, where every service called
task_service_init() manually.  Now this is called from service.c for
all services.

Andrew Bartlett
(This used to be commit 9c9a4731ca)
2008-02-04 21:58:29 +11:00
Andrew Bartlett
b3c5fbec47 Remaining changes to implement the prefork process model
To use, run 'smbd -M prefork'

By default, only the smb service is preforked.  4 children are
created, and all listen for new connections.  The Linux Kernel 'wake
one' behaviour should ensure that only one is given the oportunity to
accept.  We need to look into the ideal number of worker children, as
well as load balancing behaviours.

To change, set:

prefork children : smb = 6

valid service names (smb in this example) match those in 'server services'.

Andrew Bartlett and David Disseldorp
(This used to be commit 35313c0aa3)
2008-02-04 17:59:16 +11:00
Andrew Bartlett
3d5594e74d Rework process_single.c to take advantage of cluster_id() now taking an additional argument.
Andrew Bartlett and David Disseldorp
(This used to be commit c961e7d74e)
2008-02-04 17:53:01 +11:00
Andrew Bartlett
77f71c1b65 Rework cluster_id() to take an additional argument, as we need
<node>.<pid>.<fd> to be unique in a prefork process environment.

Andrew Bartlett and David Disseldorp
(This used to be commit 931994a7f1)
2008-02-04 17:51:38 +11:00
Andrew Bartlett
23d681caf9 Rework service init functions to pass down service name. This is
needed to change prefork behaviour based on what service is being
started.

Andrew Bartlett and David Disseldorp
(This used to be commit 0d830580e3)
2008-02-04 17:48:51 +11:00
Jelmer Vernooij
03023c4f7d build: Demote a bunch of libraries to subsystems. This makes packaging easier and should also make it easier
to migrate to a new build system.
(This used to be commit 77b400764e)
2008-01-21 03:54:42 +01:00
Jelmer Vernooij
df408d056e r26672: Janitorial: Remove uses of global_loadparm.
(This used to be commit 18cd08623e)
2008-01-05 13:06:03 -06:00
Jelmer Vernooij
c13ae70731 r26580: Include sentinel in build.h, in case the list is empty.
(This used to be commit f1997dabed)
2007-12-24 01:51:07 -06:00
Jelmer Vernooij
be33f4c611 r26576: Allow the static module loading code to be used for the Python modules.
Simplify the way module initialization functions are handled.
(This used to be commit ba8be2dfc0)
2007-12-24 01:51:06 -06:00
Jelmer Vernooij
84b4763947 r26441: Remove global_loadparm uses.
(This used to be commit 32007c6277)
2007-12-21 05:50:09 +01:00
Jelmer Vernooij
d891c0c74a r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7ab)
2007-12-21 05:49:56 +01:00
Jelmer Vernooij
4b0199a549 r26409: Pass smb ports along.
(This used to be commit 2833f320de)
2007-12-21 05:49:42 +01:00
Jelmer Vernooij
f9948d18d7 r26400: Don't try to do character conversion before smb.conf has been parsed.
(This used to be commit 9faba28749)
2007-12-21 05:49:30 +01:00
Jelmer Vernooij
b65dba2245 r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94)
2007-12-21 05:49:01 +01:00
Jelmer Vernooij
5c4516fcf7 r26322: Fix include
(This used to be commit 9744316937)
2007-12-21 05:48:34 +01:00
Jelmer Vernooij
2f5ca872a8 r26313: Fix more uses of static loadparm.
(This used to be commit 6fd0d9d3b7)
2007-12-21 05:48:25 +01:00
Jelmer Vernooij
6901b3c64a r26278: Tallocify convenience table for iconv handles.
(This used to be commit ad64b3baa4)
2007-12-21 05:48:04 +01:00
Jelmer Vernooij
fc2f06d31b r26274: Some syntax fixes, remove more global_loadparm instances.
(This used to be commit 3809113d86)
2007-12-21 05:47:58 +01:00
Jelmer Vernooij
509e82e402 r26272: Remove global_loadparm in some more places.
(This used to be commit 1ab76ecc53)
2007-12-21 05:47:55 +01:00
Jelmer Vernooij
0184e5ef2d r26269: Fix a couple more references to global_loadparm.
(This used to be commit 1cb849dfba)
2007-12-21 05:47:49 +01:00
Jelmer Vernooij
ecea5ce245 r26260: Store loadparm context in gensec context.
(This used to be commit b9e3a4862e)
2007-12-21 05:47:34 +01:00
Jelmer Vernooij
ab69eb8d89 r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309)
2007-12-21 05:47:28 +01:00
Jelmer Vernooij
291ddf4336 r26237: Add loadparm context to the server service interface.
(This used to be commit 1386c5c925)
2007-12-21 05:47:15 +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
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aad)
2007-12-21 05:47:04 +01:00
Jelmer Vernooij
2fa338cdc9 r26226: Avoid more uses of global_loadparm.
(This used to be commit 6cbce47a3e)
2007-12-21 05:47:02 +01:00
Jelmer Vernooij
dc2273ba37 r26006: Improve some dependencies.
(This used to be commit 28f05bb5ef)
2007-12-21 05:45:41 +01:00
Andrew Bartlett
b45b8fa9c3 r25922: Make it easier to bind to a unix domain socket, without messing with
ports...

Andrew Bartlett
(This used to be commit 70de473980)
2007-12-21 05:45:03 +01:00
Jelmer Vernooij
93224076fc r25535: Deal with events subsystem failures.
(This used to be commit fa6407984b)
2007-10-10 15:07:49 -05:00
Jelmer Vernooij
efa384375f r25454: Use standard bool types in a couple more places.
(This used to be commit 9243b551f3)
2007-10-10 15:07:38 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
9b009c9009 r25301: Merge my includes.h cleanups.
(This used to be commit 37425495f3)
2007-10-10 15:07:09 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
7a287e0704 r25028: Fix more warnings.
(This used to be commit 3aa7ee4a0d)
2007-10-10 15:05:41 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa)
2007-10-10 15:05:26 -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
Jelmer Vernooij
b409d4120f r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have
been working on for at least half a year now. Contains the following
improvements:

 * proper layering (finally!) for the registry library. Distinction is
   now made between 'real' backends (local, remote, wine, etc) and
   the low-level hive backends (regf, creg, ldb, ...) that are only used
   by the local registry backend
 * tests for all important hive and registry operations
 * re-enable RPC-WINREG tests (still needs more work though, as
							   some return values aren't checked yet)
 * write support for REGF files
 * dir backend now supports setting/reading values, creating keys
 * support for storing security descriptors
 * remove CREG backend as it was incomplete, didn't match the data model
   and wasn't used at all anyway
 * support for parsing ADM files as used by the policy editor (see lib/policy)
 * support for parsing PREG files (format used by .POL files)
 * new streaming interface for registry diffs (improves speed and memory usage
	for regdiff/regpatch significantly)

   ... and fixes a large number of bugs in the registry code
(This used to be commit 7a1eec6358)
2007-10-10 15:02:34 -05:00
Andrew Bartlett
dfa4e5f784 r24631: Fix up format warnings, found on my Fedora 7 x86_64 workstation.
Andrew Bartlett
(This used to be commit 3d74d178bf)
2007-10-10 15:02:27 -05:00
Stefan Metzmacher
1035a6696d r24623: add back '-D' option to smbd
metze
(This used to be commit 5ecc1311a1)
2007-10-10 15:02:26 -05:00
Andrew Tridgell
b5c4c5f420 r24276: don't mark a stream readable until after the messaging setup is
complete. This is needed because messaging setup with ctdb involve
events, and we don't want a SMB packet to be processed on this stream
until after the stream structure is fully setup
(This used to be commit 8e378051e5)
2007-10-10 15:01:34 -05:00
Andrew Bartlett
3c097f3afb r23960: Don't destory the 'reason' for terminating the service before printing it.
Andrew Bartlett
(This used to be commit 18d2680f35)
2007-10-10 15:01:11 -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
Andrew Tridgell
4ace7950d4 r23702: fixed a "falling back to select" error in the standard process
model. It's much cleaner to get the event system to close the fd,
especially with the complexity of forks
(This used to be commit d1b710f09c)
2007-10-10 14:59:05 -05:00
Andrew Bartlett
80ae1c2a2a r23695: By not using the NULL context for these large structures, we don't
falsely report them as leaked.

Andrew Bartlett
(This used to be commit e3eb6c2cf6)
2007-10-10 14:59:02 -05:00
Stefan Metzmacher
aec9320dc2 r23288: give more info...
metze
(This used to be commit 7fae261a49)
2007-10-10 14:53:08 -05:00
Stefan Metzmacher
35ffca8932 r22403: this dependencies should be private
metze
(This used to be commit c3cc03ffb2)
2007-10-10 14:51:14 -05:00
Andrew Tridgell
5abd69f99d r22242: ctdb init now takes a process model
(This used to be commit ec611774da)
2007-10-10 14:50:45 -05:00
Jelmer Vernooij
bedf53f9e0 r21669: Fix --enable-dso build
(This used to be commit 7cf9d07c88)
2007-10-10 14:49:07 -05:00
Andrew Tridgell
864e228f50 r20895: enable ctdb backend at startup (if configured)
(This used to be commit e73063a0c6)
2007-10-10 14:43:47 -05:00
Andrew Tridgell
1cd4339b9a r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
  struct server_id server_id;

which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa99)
2007-10-10 14:37:23 -05:00
Stefan Metzmacher
29add39b4b r20449: Happy New Year!
metze
(This used to be commit dbabec6338)
2007-10-10 14:35:46 -05:00
Jelmer Vernooij
c81f2930a2 r19676: Fix some more dependencies.
(This used to be commit 8768bec81f)
2007-10-10 14:25:29 -05:00
Stefan Metzmacher
fff74b4bca r19675: the process model don't depend on heimdal anymore
and only have private depdendencies

metze
(This used to be commit f37c9f4d92)
2007-10-10 14:25:29 -05:00
Stefan Metzmacher
a779d288a8 r19643: make process_model thread compile again
metze
(This used to be commit f02f7ed19d)
2007-10-10 14:25:24 -05:00
Stefan Metzmacher
0671e54079 r19610: fix the build
metze
(This used to be commit 59fe6cfaba)
2007-10-10 14:25:04 -05:00
Andrew Bartlett
3c1e780ec7 r19604: This is a massive commit, and I appologise in advance for it's size.
This merges Samba4 with lorikeet-heimdal, which itself has been
tracking Heimdal CVS for the past couple of weeks.

This is such a big change because Heimdal reorganised it's internal
structures, with the mechglue merge, and because many of our 'wishes' have been granted:  we now have DCE_STYLE GSSAPI, send_to_kdc hooks and many other features merged into the mainline code.  We have adapted to upstream's choice of API in these cases.

In gensec_gssapi and gensec_krb5, we either expect a valid PAC, or NO
PAC.  This matches windows behavour.  We also have an option to
require the PAC to be present (which allows us to automate the testing
of this code).

This also includes a restructure of how the kerberos dependencies are
handled, due to the fallout of the merge.

Andrew Bartlett
(This used to be commit 4826f17351)
2007-10-10 14:25:03 -05:00
Jelmer Vernooij
5a6e2bc9ae r19573: Move secrets.o into param/ (subsystems haven't been integrated yet).
(This used to be commit 8143de855c)
2007-10-10 14:24:55 -05:00
Jelmer Vernooij
2eeb0e5f28 r19569: Require that all public header files have a destination path. Fix
places where this was currently not the case.
(This used to be commit 3894497a23)
2007-10-10 14:24:53 -05:00
Jelmer Vernooij
1b4b2a291d r19539: Move pidfile to smbd/
(This used to be commit eefa64cbe3)
2007-10-10 14:24:46 -05:00
Jelmer Vernooij
4fa24df98d r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
(This used to be commit 7a01235067)
2007-10-10 14:24:41 -05:00
Andrew Tridgell
fb1d60363e r18806: fixed two spelling errors
(This used to be commit f11112d7f0)
2007-10-10 14:19:13 -05:00
Andrew Tridgell
660964f133 r18805: make error message match function name
(This used to be commit e46d8ed53f)
2007-10-10 14:19:12 -05:00
Andrew Tridgell
f793748f43 r18360: better handling of child process killing in standard mode
(This used to be commit 6a2144caab)
2007-10-10 14:18:18 -05:00
Jelmer Vernooij
873749f218 r18168: Use {NULL} rather than POPT_TABLEEND, which is not always available.
(This used to be commit 8b622c5ded)
2007-10-10 14:17:45 -05:00
Jelmer Vernooij
a59706f721 r18121: Simplify m4 code, hopefully fix Samba4 build problems.
(This used to be commit 1adf65b4d7)
2007-10-10 14:17:35 -05:00
Andrew Tridgell
b7477fb388 r18117: first steps in making samba4 use libreplace
(This used to be commit c079cedb08)
2007-10-10 14:17:34 -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
Stefan Metzmacher
8a3f6a7912 r17227: don't call a function which takes some nonoptional args
with NULL.

metze
(This used to be commit 3711b968ad)
2007-10-10 14:10:22 -05:00
Simo Sorce
c504a8269c r17209: Add dependency over the new share configuration module into smbd
Should fix some build farm machine
(This used to be commit 15b8fafb99)
2007-10-10 14:10:19 -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
Andrew Bartlett
ba07fa43d0 r17197: This patch moves the encryption of bulk data on SASL negotiated security
contexts from the application layer into the socket layer.

This improves a number of correctness aspects, as we now allow LDAP
packets to cross multiple SASL packets.  It should also make it much
easier to write async LDAP tests from windows clients, as they use SASL
by default.  It is also vital to allowing OpenLDAP clients to use GSSAPI
against Samba4, as it negotiates a rather small SASL buffer size.

This patch mirrors the earlier work done to move TLS into the socket
layer.

Unusual in this pstch is the extra read callback argument I take.  As
SASL is a layer on top of a socket, it is entirely possible for the
SASL layer to drain a socket dry, but for the caller not to have read
all the decrypted data.  This would leave the system without an event
to restart the read (as the socket is dry).

As such, I re-invoke the read handler from a timed callback, which
should trigger on the next running of the event loop.  I believe that
the TLS code does require a similar callback.

In trying to understand why this is required, imagine a SASL-encrypted
LDAP packet in the following formation:

+-----------------+---------------------+
| SASL  Packet #1 | SASL Packet #2      |
----------------------------------------+
| LDAP Packet #1       | LDAP Packet #2 |
----------------------------------------+

In the old code, this was illegal, but it is perfectly standard
SASL-encrypted LDAP.  Without the callback, we would read and process
the first LDAP packet, and the SASL code would have read the second SASL
packet (to decrypt enough data for the LDAP packet), and no data would
remain on the socket.

Without data on the socket, read events stop.  That is why I add timed
events, until the SASL buffer is drained.

Another approach would be to add a hack to the event system, to have it
pretend there remained data to read off the network (but that is ugly).

In improving the code, to handle more real-world cases, I've been able
to remove almost all the special-cases in the testnonblock code.  The
only special case is that we must use a deterministic partial packet
when calling send, rather than a random length.  (1 + n/2).  This is
needed because of the way the SASL and TLS code works, and the 'resend
on failure' requirements.

Andrew Bartlett
(This used to be commit 5d7c9c12cb)
2007-10-10 14:10:18 -05:00
Jelmer Vernooij
ff39a8ea88 r15580: (Hopefully) fix pthreads process model
(This used to be commit 8d95bf14b9)
2007-10-10 14:05:59 -05:00
Jelmer Vernooij
53f005f6aa r15572: Trim build/m4/rewrite.m4 a bit more, remove unused tests.
(This used to be commit d72c5c8f75)
2007-10-10 14:05:58 -05:00
Jelmer Vernooij
b00c236906 r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on.
(This used to be commit 0654739166)
2007-10-10 14:05:07 -05:00
Jelmer Vernooij
620d759f49 r15298: Fix the build using a few hacks in the build system.
Recursive dependencies are now forbidden (the build system
will bail out if there are any).

I've split up auth_sam.c into auth_sam.c and sam.c. Andrew,
please rename sam.c / move its contents to whatever/wherever you think suits
best.
(This used to be commit 6646384aaf)
2007-10-10 14:05:04 -05:00
Stefan Metzmacher
d12e9c4c3b r15277: - fix the build on netbsd, where stdlib.h has the setproctitle() prototype
but --with-setproctitle wasn't used

metze
(This used to be commit 0754154f51)
2007-10-10 14:05:01 -05:00
Jelmer Vernooij
0d5587b5d1 r15274: Drop default EXT_LIB_ prefix for external libraries. Fixes issues with local
(empty) libpopt.a overriding global one
(This used to be commit 2f06305e53)
2007-10-10 14:05:00 -05:00
Stefan Metzmacher
7ffe0fcaee r15273: fix setproctitle support
metze
(This used to be commit 35936fd474)
2007-10-10 14:05:00 -05:00
Jelmer Vernooij
82f1955314 r15223: Move heimdal's -I parameters from the global list of includes to
the subsystems in question
(This used to be commit 2fbb4d91fa)
2007-10-10 14:04:20 -05:00
Jelmer Vernooij
c175e066b2 r15212: Simplify setproctitle code
(This used to be commit 555ca1df1c)
2007-10-10 14:04:19 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
James Peach
6ab33938d5 r15186: Introduce ISDOT and ISDOTDOT macros for testing whether a filename is
"." for "..". These express the intention better that strcmp or strequal
and improve searchability via cscope/ctags.
(This used to be commit 7e4ad7e8e5)
2007-10-10 14:04:14 -05:00
Stefan Metzmacher
e54c6cbc41 r15182: make stuff more portable
metze
(This used to be commit 2b0ce388a4)
2007-10-10 14:04:13 -05:00
Jelmer Vernooij
5bcc0986ea r15179: Detect setproctitle if it is in libc. Patch by Timur Bakevey
(This used to be commit 3ebdae4217)
2007-10-10 14:04:13 -05:00
Volker Lendecke
fce0dcf245 r15100: Port the bugfix for #3569 to Samba4
(This used to be commit 5f1d52f232)
2007-10-10 14:04:09 -05:00
Jelmer Vernooij
a454456820 r14997: Fix build of static libraries. Libraries build fine now, but linking doesn't
work yet.
(This used to be commit d3106699db)
2007-10-10 14:03:59 -05:00
Stefan Metzmacher
ed56a2c147 r14890: fix the usage of popt...
I don't know why this causes problems on my laptop today...

anyway we have done this change in smbtorture month ago...

metze
(This used to be commit ad84a69db2)
2007-10-10 14:00:12 -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
Jelmer Vernooij
184955ffd7 r14572: Give libraries saner names, remove some .pc files, make some things
subsystems in case a library doesn't make sense.
(This used to be commit ed382873fd)
2007-10-10 13:58:49 -05:00
Jelmer Vernooij
c06acda7d5 r14571: More improvements on shared library support in Samba. Only ldb is left now...
(This used to be commit e71cca7f0c)
2007-10-10 13:58:49 -05:00
Jelmer Vernooij
9565c70898 r14567: Make some more functions public.
(This used to be commit 8e84e6cb6b)
2007-10-10 13:58:48 -05:00
Jelmer Vernooij
c84cfc0ecc r14554: Write out header dependencies. This means all C files affected will be
rebuilt when a header file is changed. It also means parallel builds work now.

It will take a minute or so to generate all the dependency information,
but there should be no need to rebuild that information later on, unless
a file changes.

This behaviour is only enabled when building in developer mode
(--enable-developer) and requires a GNU make (or compatible). In all other
cases, the file 'static_deps.mk' is included, which contains some basic
hardcoded dependency information.
(This used to be commit eb435386f0)
2007-10-10 13:58:45 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Stefan Metzmacher
32b0bb64bc r14205: move smb specific stuff out of includes.h (finally!!!:-)
all this changes really help ccache to speed up the samba4 build:-)

metze
(This used to be commit 180a79d103)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
f829ca548b r14100: print out the title with the thread specific debug messages
metze
(This used to be commit defc9438d1)
2007-10-10 13:56:50 -05:00
Stefan Metzmacher
2239cb4ec4 r14095: disable setproctitle support by default
--with-setproctitle enables it

metze
(This used to be commit fb9e7d176a)
2007-10-10 13:56:50 -05:00