summaryrefslogtreecommitdiffstats
path: root/source3/nmbd
Commit message (Collapse)AuthorAgeFilesLines
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-181-1/+1
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* s3-libsmb: move protos to libsmb/proto.hGünther Deschner2011-05-062-0/+2
| | | | Guenther
* s3: only include tdb headers where needed.Günther Deschner2011-05-061-0/+1
| | | | Guenther
* More simple const fixes.Jeremy Allison2011-05-054-12/+12
|
* More const compiler warning fixes.Jeremy Allison2011-05-055-28/+28
|
* Fix warning messages caused by addition of null check in fstrcpy macro.Jeremy Allison2011-05-043-6/+8
|
* Remove overmalloc_safe_strcpy - can be simple strlcpy.Jeremy Allison2011-05-042-2/+2
|
* Change safe_strcpy_base to strlcpy_base. Note the size doesn't change here ↵Jeremy Allison2011-05-041-1/+1
| | | | as the original macro auto-added the -1.
* Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1.Jeremy Allison2011-05-041-1/+1
|
* s3: only include smb profiling where needed.Günther Deschner2011-04-143-0/+3
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-301-1/+0
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-libsmb: put namequery headers to nmblib.hGünther Deschner2011-03-301-0/+1
| | | | | | | We might find a better name for it and merge other namequery related things as well here... Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-305-0/+5
| | | | Guenther
* s3: Fix Coverity ID 2331: RESOURCE_LEAKVolker Lendecke2011-03-271-0/+1
|
* s3-config: say which config file we failed to openAndrew Tridgell2011-03-231-1/+1
| | | | saves having to strace it to work that out
* fault: get fault.c ready for use by s4Andrew Tridgell2011-03-231-1/+1
| | | | | 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
* s3-fault: removed the cont_fn from fault_setup()Andrew Tridgell2011-03-221-10/+1
| | | | | | | | | | 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
* s3-libsmb: only include rap client when needed.Günther Deschner2011-03-151-0/+1
| | | | Guenther
* s3-server_id: only include server_id where needed.Günther Deschner2011-03-021-0/+1
| | | | Guenther
* s3: Use poll in nmbdVolker Lendecke2011-02-281-102/+113
|
* s3: Fix a typed-punned warningVolker Lendecke2011-02-141-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Feb 14 11:46:50 CET 2011 on sn-devel-104
* s3: Fix some nonempty blank linesVolker Lendecke2011-02-061-4/+3
|
* s3: Remove superfluous ;Günther Deschner2011-02-021-1/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Feb 2 15:44:21 CET 2011 on sn-devel-104
* Revert "s3:events: Call all ready fd event handlers on each iteration of the ↵Stefan Metzmacher2011-01-311-3/+3
| | | | | | | | | | main loop" This reverts commit 455fccf86b6544cd17a2571c63a88f8aebff3f74. I'll add a more generic fix for this problem. metze
* s3-nmbd: Fix bug #7875Björn Baumbach2011-01-071-2/+2
| | | | | | | | | 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
* netlogon: move netlogon helpers to ../libcli/netlogon.Günther Deschner2011-01-071-1/+1
| | | | Guenther
* s3: Remove some unused codeVolker Lendecke2011-01-072-18/+2
|
* s3: Limit the number of unexpected clients to 200Volker Lendecke2011-01-071-2/+4
| | | | | DoS protection like the max winbind clients. Settable by nmbd:unexpected_clients
* s3: Make nmbd listen on the unexpected socketVolker Lendecke2011-01-073-0/+27
|
* s3: Fix some nonempty blank linesVolker Lendecke2011-01-051-26/+25
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jan 5 16:03:24 CET 2011 on sn-devel-104
* All calls to event_add_to_select_args() call GetTimeOfDay() andJeremy Allison2010-12-231-5/+2
| | | | | | | | | | | 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
* Fix the unexpected.tdb database problem. Change nmbd to store theJeremy Allison2010-11-142-3/+8
| | | | | | | | | | | | | | | | | | | | | 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
* Move error reporting of messaging context creation fail intoJeremy Allison2010-11-141-15/+6
| | | | | | | | 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.
* s3-debug Convert from x_file to real file descriptors.Andrew Bartlett2010-11-021-2/+0
| | | | | | | | | | 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
* s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett2010-11-021-4/+7
| | | | | | | | 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
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-1/+1
| | | | | | | | | | | | | | 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
* Move talloc_enable_null_tracking() to the s3 daemonsVolker Lendecke2010-10-081-1/+7
|
* s3:events: Call all ready fd event handlers on each iteration of the main loopSteven Danneman2010-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* samba: share select wrappers.Günther Deschner2010-10-011-0/+1
| | | | Guenther
* Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on allJeremy Allison2010-09-271-1/+2
| | | | | | | | | | 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.
* s3-nmbd: move SYNC_DNS to nmbd.hGünther Deschner2010-09-201-0/+3
| | | | Guenther
* s3-nmbd: use NETLOGON_NT_VERSION_1 in LOGON_PRIMARY_RESPONSE.Günther Deschner2010-09-091-1/+1
| | | | Guenther
* s3-nmbd: use autogenerated marshalling for LOGON_SAM_LOGON_REQUEST.Günther Deschner2010-09-091-301/+94
| | | | Guenther
* s3-nmbd: use autogenerated marshalling for LOGON_PRIMARY_QUERY.Günther Deschner2010-09-091-109/+33
| | | | | | Couldn't find any reproducer for a short request, so removing it for now. Guenther
* s3-nmbd: use autogenerated marshalling for LOGON_REQUEST.Günther Deschner2010-09-091-47/+29
| | | | Guenther
* s3-nmbd: handle source_name in one location in nmbd_process_logon().Günther Deschner2010-09-091-5/+4
| | | | Guenther
* s3-nmbd: use nbt_netlogon_packet in process_logon_packet().Günther Deschner2010-09-091-5/+24
| | | | Guenther
* s3-nmbd: fix indentation in process_logon_packet().Günther Deschner2010-09-081-523/+519
| | | | | | purely cosmetic, no code change. Guenther
* s3-nmbd: remove trailing whitespace in nmbd_processlogon.cGünther Deschner2010-09-081-9/+9
| | | | Guenther