| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes quite a bit of code. All reasonable systems have /dev/urandom
these days. Linux, Solaris and the BSDs do. In case we find a system
without /dev/urandom, we will have to go hunting in other libraries.
The main reason for this is speed: On Ubuntu 14.04 doing direct reads from
/dev/urandom is 2-3 times faster than our md4 based code. On virtualized
FreeBSD 10 the difference is even larger.
My first approach was to use fopen/fread. It was even faster, but less
than twice as fast. So I thought we could save the additional complexity
when having to deal with throwing away buffers when forking and the
additional memory footprint per process.
With this simple generate_random_buffer it will be easier to adapt new
syscalls to get randomness.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 13 04:25:39 CEST 2015 on sn-devel-104
|
|
|
|
|
| |
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
|
|
|
|
|
| |
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11180
The issue has been found with nss_wrapper debug output running:
samba4.ntvfs.cifs.krb5.base.lock
In the case here, we fork a child and close the fd without resetting
the pipe fd variable. Then the fd was used to open the nss_wrapper
hosts file which got the same fd. We forked again in the process model
called close() on the re-used fd (of the pipe variable) again without
nss_wrapper noticing. Now Samba opened the secrets tdb and got
the same fd as nss_wrapper was using for the hosts file and next
nss_wrapper tried to parse a TDB ...
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We replace this with a pipe between parent and child, and then watch
for a read event in the parent to indicate that the child has gone away.
The removal of signal(SIGCHLD, SIG_IGN) requires us to then call
waitpid(). We can't do that in a main loop as we want to get the exit
status to the legitimate waitpid calls in routines like
samba_runcmd_*().
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
| |
|
|
|
|
|
| |
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 12 09:21:15 CEST 2012 on sn-devel-104
|
| |
|
| |
|
|
|
|
|
| |
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 13:21:13 CET 2010 on sn-devel-104
|
|
|
|
|
|
|
|
|
| |
this also removes the event_context parameter from process model
initialisation. It isn't needed, and is confusing when a process model
init can be called from more than one place, possibly with different
event contexts.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
|
|
|
|
|
| |
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
|
|
|
|
|
|
| |
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.
metze
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
|
|
|
|
|
|
|
|
| |
multiple event contexts
It is NEVER valid to free an event context that anybody else may have
a reference to, and never normally valid to have two 'live' at once.
We must instead call tevent_re_initialise() to wipe clean an existing
pointer.
Andrew Bartlett
|
|
|
|
| |
This fixes a crash bug on startup
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
This will be used to allow us to cancel any pending transactions
after a fork.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
metze
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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 e566a2f308ac6fb4b526a744f7059b565670aea5)
|
|
|
|
| |
(This used to be commit 873941d8a8dca8e7ace83f9af9939e4264f78c96)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 35313c0aa3fbfdd943edfb7bafd7645b1a0c54e9)
|
|
|
|
| |
(This used to be commit 18cd08623eaad7d2cd63b82ea5275d4dfd21cf00)
|
|
|
|
| |
(This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c)
|
|
|
|
| |
(This used to be commit 97443169378c18f9a7c522749a37f4f850a1305f)
|
|
|
|
| |
(This used to be commit ad64b3baa4a5383c603d17ae75c33083af4690bb)
|
|
|
|
| |
(This used to be commit b9e3a4862e267be39d603fed8207a237c3d72081)
|
|
|
|
| |
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
|
|
|
|
|
|
| |
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 fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
|
|
|
|
|
|
|
|
|
|
|
| |
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 2365abaa991d57d68c6ebe9be608e01c907102eb)
|
|
|
|
|
| |
metze
(This used to be commit 59fe6cfaba2eb39cb5ff33110e830c4c9b21fb95)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 4826f1735197c2a471d771495e6d4c1051b4c471)
|
|
|
|
| |
(This used to be commit 8143de855c0b65346b2d8e59ecdb78952927de4a)
|
|
|
|
|
|
|
|
|
| |
prototype
but --with-setproctitle wasn't used
metze
(This used to be commit 0754154f5154e8285608c7f17e15aa223f04adea)
|
|
|
|
|
| |
metze
(This used to be commit 35936fd4743554bb4ba9b2f61ec3651762189bee)
|
|
|
|
| |
(This used to be commit 555ca1df1c57e5798e75b19f66b62b253a066e21)
|
|
|
|
| |
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
|
|
|
|
|
|
|
|
| |
- 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 bac95bb8f4ad35a31ee666f5916ff9b2f292d964)
|
|
|
|
|
|
|
|
|
| |
- add set_title hook to the process models
- use setproctitle library in process_model standard if available
- the the title for the task servers and on connections
metze
(This used to be commit 526f20bbecc9bbd607595637c15fc4001d3f0c70)
|
|
|
|
| |
(This used to be commit 2d655f05285a86bb1bbb882e4dd843def15c9dfa)
|
|
|
|
|
| |
metze
(This used to be commit 21bc072c7addafc6f692fb8e998bd4dd9ab88b49)
|
|
|
|
| |
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
|
|
|
|
|
|
|
| |
the old event context in the standard process modal child.
Andrew Bartlett
(This used to be commit 0f52a9ab071c181c7f764adc8be83e162e649931)
|
|
|
|
|
|
|
|
|
|
|
| |
good, as it is probably a resource constraint, so if we just try again
we will spin (as the incoming socket will still be readable). Using a
sleep(1) solves this by throtting smbd until the resource constraint
goes away.
if the resource constraint doesn't go away, then at least smbd won't
be spinning chewing cpu
(This used to be commit 7a5a9da477186b5e4fdb34ec64cc97915de4fd8e)
|