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

621 Commits

Author SHA1 Message Date
Günther Deschner
ab36d597e7 s3-messages: make ndr_messaging.h part of messages.h.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
b2af281e50 s3-messages: only include messages.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
2473c2fb1b s3-libsmb: put namequery headers to nmblib.h
We might find a better name for it and merge other namequery related things as
well here...

Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Volker Lendecke
66c968068d s3: Fix Coverity ID 2331: RESOURCE_LEAK 2011-03-27 11:25:33 +02:00
Andrew Tridgell
7aef9c3fe0 s3-config: say which config file we failed to open
saves having to strace it to work that out
2011-03-23 12:19:29 +11:00
Andrew Tridgell
580997ede0 fault: get fault.c ready for use by s4
this moves the s3 specific dumpcore code into source3/lib/dumpcore.c,
and uses a function pointer to setup which smb_panic call to use
2011-03-23 11:03:57 +11:00
Andrew Tridgell
c8297073db s3-fault: removed the cont_fn from fault_setup()
cont_fn() was supposed to be a way to continue after a seg fault. It
could never be called however, as smb_panic() from fault_report()
could never return, as dump_core() never returns at the end of
smb_panic()

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Mar 22 05:07:58 CET 2011 on sn-devel-104
2011-03-22 05:07:58 +01:00
Günther Deschner
7a91282c9f s3-libsmb: only include rap client when needed.
Guenther
2011-03-15 21:16:35 +01:00
Günther Deschner
8643683dd8 s3-server_id: only include server_id where needed.
Guenther
2011-03-02 12:12:31 +01:00
Volker Lendecke
ada2a5a245 s3: Use poll in nmbd 2011-02-28 16:40:19 +01:00
Volker Lendecke
e9f552925d s3: Fix a typed-punned warning
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Feb 14 11:46:50 CET 2011 on sn-devel-104
2011-02-14 11:46:50 +01:00
Volker Lendecke
8af7400d55 s3: Fix some nonempty blank lines 2011-02-06 16:44:56 +01:00
Günther Deschner
50be0b2c1e s3: Remove superfluous ;
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 15:44:21 CET 2011 on sn-devel-104
2011-02-02 15:44:21 +01:00
Stefan Metzmacher
19d3779274 Revert "s3:events: Call all ready fd event handlers on each iteration of the main loop"
This reverts commit 455fccf86b.

I'll add a more generic fix for this problem.

metze
2011-01-31 16:16:09 +01:00
Björn Baumbach
617e342a14 s3-nmbd: Fix bug #7875
nmbd --port didn't work

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan  7 17:44:08 CET 2011 on sn-devel-104
2011-01-07 17:44:08 +01:00
Günther Deschner
3294ccbb6d netlogon: move netlogon helpers to ../libcli/netlogon.
Guenther
2011-01-07 15:02:24 +01:00
Volker Lendecke
2672101cc4 s3: Remove some unused code 2011-01-07 13:28:07 +01:00
Volker Lendecke
dab6a35f4c s3: Limit the number of unexpected clients to 200
DoS protection like the max winbind clients. Settable by
nmbd:unexpected_clients
2011-01-07 13:28:07 +01:00
Volker Lendecke
5297f3fcff s3: Make nmbd listen on the unexpected socket 2011-01-07 13:28:04 +01:00
Volker Lendecke
4de4703bb9 s3: Fix some nonempty blank lines
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan  5 16:03:24 CET 2011 on sn-devel-104
2011-01-05 16:03:24 +01:00
Jeremy Allison
30d29e64cb All calls to event_add_to_select_args() call GetTimeOfDay() and
pass this in as the &now parameter. Push this call inside of
event_add_to_select_args() to the correct point so it doesn't
get called unless needed.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 23 01:08:11 CET 2010 on sn-devel-104
2010-12-23 01:08:11 +01:00
Jeremy Allison
52f2520648 Fix the unexpected.tdb database problem. Change nmbd to store the
transaction id of packets it was requested to send via a client, and
only store replies that match these ids. On the client side change
clients to always attempt to ask nmbd first for name_query and
node_status calls, and then fall back to doing socket calls if
we can't talk to nmbd (either nmbd is not running, or we're not
root and cannot open the messaging tdb's). Fix readers of unexpected.tdb
to delete packets they've successfully read.

This should fix a long standing problem of unexpected.tdb
growing out of control in noisy NetBIOS envioronments with
lots of bradcasts, yet still allow unprivileged client apps
to work mostly as well as they already did (nmblookup for
example) in an environment when nmbd isn't running.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sun Nov 14 05:22:45 UTC 2010 on sn-devel-104
2010-11-14 05:22:45 +00:00
Jeremy Allison
781c4aabb8 Move error reporting of messaging context creation fail into
the daemons themselves. Allows client utilities to silently
fail to create a messaging context due to access denied on the
messaging tdb (which I need for the following patch).

Jeremy.
2010-11-14 04:39:05 +00:00
Andrew Bartlett
e64dfdcc71 s3-debug Convert from x_file to real file descriptors.
X_FILE does not gain us anything in this use case, we want our log
messages on disk, not in a buffer, and we don't gain anything from the
X_FILE api.  I discussed the matter with tridge, who feels that to use
FILE in the first place was a mistake, and that X_FILE isn't any
better, but was a stop-gap to avoid issues on solaris.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Steven Danneman
455fccf86b s3:events: Call all ready fd event handlers on each iteration of the main loop
Previously, only one fd handler was being called per main message loop
in all smbd child processes.

In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run.  Obviously this is arbitrary and could cause unfairness.

Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.

In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.

I then changed the main loop in smbd child processes to iterate
run_events().  This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call.  I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.

This required a signature change to run_events() but all other callers
should have no change in their behavior.  I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.

Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
2010-10-01 13:31:33 -07:00
Günther Deschner
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
Jeremy Allison
f98d217514 Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.

Jeremy.
2010-09-27 17:18:54 -07:00
Günther Deschner
d0a6c32add s3-nmbd: move SYNC_DNS to nmbd.h
Guenther
2010-09-20 14:10:34 -07:00
Günther Deschner
9f4c1a2a7b s3-nmbd: use NETLOGON_NT_VERSION_1 in LOGON_PRIMARY_RESPONSE.
Guenther
2010-09-09 23:14:08 +02:00
Günther Deschner
71b95703f9 s3-nmbd: use autogenerated marshalling for LOGON_SAM_LOGON_REQUEST.
Guenther
2010-09-09 23:07:11 +02:00
Günther Deschner
36d7efa75a s3-nmbd: use autogenerated marshalling for LOGON_PRIMARY_QUERY.
Couldn't find any reproducer for a short request, so removing it for now.

Guenther
2010-09-09 23:07:11 +02:00
Günther Deschner
bfda968e07 s3-nmbd: use autogenerated marshalling for LOGON_REQUEST.
Guenther
2010-09-09 23:07:11 +02:00
Günther Deschner
f002b7fa1b s3-nmbd: handle source_name in one location in nmbd_process_logon().
Guenther
2010-09-09 23:07:11 +02:00
Günther Deschner
5fc7d14b06 s3-nmbd: use nbt_netlogon_packet in process_logon_packet().
Guenther
2010-09-09 23:07:11 +02:00
Günther Deschner
958df10a44 s3-nmbd: fix indentation in process_logon_packet().
purely cosmetic, no code change.

Guenther
2010-09-08 19:34:29 +02:00
Günther Deschner
ed68eb768b s3-nmbd: remove trailing whitespace in nmbd_processlogon.c
Guenther
2010-09-08 19:34:21 +02:00
Björn Jacke
8833adb04f s3/nmbd: tidy up debug message: ttl isn't a hex value 2010-09-07 20:29:13 +02:00
Günther Deschner
c217790918 s3-nmbd: move nmbd proto out of main proto.h
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
728fba1233 s3-nmbd: include svcctl.h where needed.
Guenther
2010-08-06 15:43:36 +02:00
Andreas Schneider
ce2a086119 s3-popt: Only include popt-common.h when needed. 2010-08-05 12:08:31 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Volker Lendecke
7f0e6df883 s3: Pass the new server_id through reinit_after_fork 2010-07-04 17:29:23 +02:00
Volker Lendecke
b3194be286 s3: Fix some type-punned warnings 2010-07-04 16:41:14 +02:00
Volker Lendecke
b01958b0bd s3: Remove serverid_[de]register_self
This removes some deep references to procid_self()
2010-07-04 16:41:14 +02:00
Andreas Schneider
459a1d58b1 s3-nmbd: Leave the sync function if there are no syncs.
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Günther Deschner
bcd4077be6 s3: remove unused librpc/ndr/sid.c.
Guenther
2010-06-03 01:07:17 +02:00