summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-23More warning fixes for Solaris.Jeremy Allison1-7/+7
Jeremy.
2009-01-27s3:nmbd: handle SIG_TERM and SIGHUP via teventStefan Metzmacher1-48/+67
metze
2009-01-27s3:nmbd: as the sig_term() handler only sets a flag we don't need to block ↵Stefan Metzmacher1-3/+0
SIGTERM The arguments of commit d98bea900ee694cdba83149620c65bd7f8765f26 are no longer valid. metze
2009-01-27s3:nmbd: install the SIG_DFL handler for SIGTERM while we're waiting for ↵Stefan Metzmacher1-12/+4
interfaces We should handle all 3 cases where we actively wait for interfaces in the same way. metze
2009-01-22s3:nmbd: we don't need to call message_dispatch() anymore it's event ↵Stefan Metzmacher1-4/+0
triggered now metze
2009-01-15s3: make better use of ccache by not including version.h in every C-file.Michael Adam1-1/+1
version.h changes rather frequently. Since it is included via includes.h, this means each C file will be a cache miss. This applies to the following situations: * When building a new package with a new Samba version * building in a git branch after calling mkversion.sh after a new commit (i.e. virtually always) This patch improves the situation in the following way: * remove inlude "version.h" from includes.h * Use samba_version_string() instead of SAMBA_VERSION_STRING in files that use no other macro from version.h instead of SAMBA_VERSION_STRING. * explicitly include "version.h" in those files that use more macros from "version.h" than just SAMBA_VERSION_STRING. Michael
2009-01-05clean event context after child is forked.Bo Yang1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-11-03s3: fix a few "shadows a global declaration" warningsTim Prouty1-4/+4
2008-10-23Use sockaddr_storage only where we rely on the size, use sockaddrJelmer Vernooij1-2/+2
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
2008-10-18Use separate make variables for libutil and libcrypto.Jelmer Vernooij1-2/+2
2008-08-19Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 ↵Jeremy Allison1-2/+2
address reported by Ted Percival <ted@midg3t.net>. Jeremy. (This used to be commit ab06efccf31fbc899536d2681a2076e6dfd65b9e)
2008-08-13first cut at adding full transactions for ctdb to samba3Andrew Tridgell1-4/+0
(This used to be commit f91a3e0f7b7737c1d0667cd961ea950e2b93e592)
2008-06-26nmbd: untangle logic in nmbd_messaging_context() slightly.Michael Adam1-2/+5
Michael (This used to be commit 3baf9eb6a2cc6a4a153303b457d3a7067948495e)
2008-06-26nmbd: don't panic if messaging_init() fails - return NULL instead.Michael Adam1-1/+1
Michael (This used to be commit e6a403209c29bd2ec2242d654ad45276de02cb44)
2008-04-23Fix CLEAR_IF_FIRST handling of messages.tdbVolker Lendecke1-1/+1
We now open messages.tdb even before we do the become_daemon. become_daemon() involves a fork and an immediate exit of the parent, thus the parent_is_longlived argument must be set to false in this case. The parent is not really long lived :-) (This used to be commit 4f4781c6d17fe2db34dd5945fec52a7685448aec)
2008-04-18nmbd: create the messaging conntext earlierStefan Metzmacher1-3/+12
metze (This used to be commit 056ff094ad2c59992cfdb8b29696c08dab4113d7)
2008-04-18nmbd: call reinit_after_fork() in all needed casesStefan Metzmacher1-0/+5
metze (This used to be commit f68829ff14c457bfa98cb2ef9e8ec2e1a0b1d64d)
2008-04-12dbwrap: wait for tdb2 change notifies in smbd, nmbd and winbinddStefan Metzmacher1-0/+8
metze (This used to be commit 64450cc1e441355aa8925b7183e90872eeab20b1)
2008-04-11Fix bug #5386, don't keep printing the same waitingJeremy Allison1-3/+6
error message. Jeremy. (This used to be commit 12e6818df1c77810a59a2896f8c44c91fc24e7ae)
2008-03-27Fix for termination problems when no interfaces found - bug #5267.Jeremy Allison1-6/+15
Jeremy. (This used to be commit 4b03f4eb2da7a523967ace3d13e79406ade07d47)
2008-03-06Fix bug #5267 - nmbd shuts down when network interfaces go down.Jeremy Allison1-29/+39
Cause nmbd to wait for an interface, in a mode where SIGTERM will kills us (same way we wait on startup for an interface). Jeremy. (This used to be commit 5440c752ff270cc674d46f2dfa2ceb47dac030f6)
2008-01-24Fix Coverity ID 454Volker Lendecke1-1/+8
(This used to be commit 902d1d6709e47fbc8b538f28cb4364b006c431f8)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison1-7/+10
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-12-07Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison1-1/+1
Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy (This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
2007-11-19Remove pstring from nmbd.Jeremy Allison1-4/+6
Jeremy. (This used to be commit a317f70c229f7730279eaa323f7ebfd499257f76)
2007-11-15More pstring removal. This one was tricky. I had to addJeremy Allison1-0/+2
one horror (pstring_clean_name()) which will have to remain until I've removed all pstrings from the client code. Jeremy. (This used to be commit 1ea3ac80146b83c2522b69e7747c823366a2b47d)
2007-10-30start smbd, nmbd and winbindd with the same startup messageStefan Metzmacher1-2/+2
at debug level 0. metze (This used to be commit 95f76ae7a52c6b22db22d03fed6b0848d2a61bee)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-22/+43
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-20fix move to OPT_LOG_STDOUTStefan Metzmacher1-1/+1
metze (This used to be commit 97f47e39139cef738a5f02980a0792417e0d365e)
2007-10-19Fix the popt / bool issues. Some places we used BOOLJeremy Allison1-9/+32
where we meant int. Fix this. Thanks to metze for pointing this out. Jeremy. (This used to be commit 793a9d24a163cb6cf5a3a0aa5ae30e9f8cf4744a)
2007-10-19fix startup of smbd, nmbd, winbinddStefan Metzmacher1-11/+5
jra: POPT_ARG_VAL arguments need int values. I assume there're more places like this in the cmdline tools. Please fix this properly, as my commit is just a hack to get make test working again. in samba4 we have a workaround for this see smbd/server.c metze (This used to be commit 9cb1937fe8601e526b5c924930500e0a3b52abd5)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-17/+17
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-12/+43
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-31/+30
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke1-4/+11
This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker (This used to be commit 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
2007-10-10r24621: - deferr calling build_options();exit(0);Stefan Metzmacher1-1/+2
- use poptPrintUsage() to give the user more info metze (This used to be commit a95d9d1ef99d6a2f77a289f8d2011cae482821b1)
2007-10-10r24599: patch from Karolin Seeger <ks@sernet.de>:Stefan Metzmacher1-1/+9
smbd, nmbd and winbindd can be started with invalid options currently. The first patch attached would be a possible solution. It contains an exit if an invalid option has been used. The main problem is, that existing setups with wrong options or missing arguments in start scripts will break (which is the right behaviour from my point of view). metze (This used to be commit 8532e3182ab44d4ac84823e9798293f156192aaf)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-2/+2
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'mVolker Lendecke1-1/+1
doing this because for the clustering the marshalling is needed in more than one place, so I wanted a decent routine to marshall a message_rec struct which was not there before. Tridge, this seems about the same speed as it used to be before, the librpc/ndr overhead in my tests was under the noise. Volker (This used to be commit eaefd00563173dfabb7716c5695ac0a2f7139bb6)
2007-10-10r23015: Make message_(de)register static to messages.cVolker Lendecke1-17/+35
(This used to be commit a8082a3c7c3d1e68c27fc3bf42f3d44402cc6f9f)
2007-10-10r22908: All callers of message_init now also call messaging_init. Unify those.Volker Lendecke1-1/+0
(This used to be commit 330946ad2307ca34f0a8d068a0193fcb8a0d6036)
2007-10-10r22902: Add an event_context and a messaging_context to nmbd. Not used yet.Volker Lendecke1-1/+26
(This used to be commit 6d210fb8a13e93fe5b7bc160a343f74878dea727)
2007-10-10r22736: Start to merge the low-hanging fruit from the now 7000-line cluster ↵Volker Lendecke1-3/+3
patch. This changes "struct process_id" to "struct server_id", keeping both is just too much hassle. No functional change (I hope ;-)) Volker (This used to be commit 0ad4b1226c9d91b72136310d3bbb640d2c5d67b8)
2007-10-10r22417: Refactor the various daemon run-mode options to make the semanticsJames Peach1-30/+31
of the various flags explicit. (This used to be commit 19c929c6330a50f278ac322ac5fcb83d03734ea2)
2007-10-10r21064: The core of this patch isVolker Lendecke1-9/+9
void message_register(int msg_type, void (*fn)(int msg_type, struct process_id pid, - void *buf, size_t len)) + void *buf, size_t len, + void *private_data), + void *private_data) { struct dispatch_fns *dfn; So this adds a (so far unused) private pointer that is passed from message_register to the message handler. A prerequisite to implement a tiny samba4-API compatible wrapper around our messaging system. That itself is necessary for the Samba4 notify system. Yes, I know, I could import the whole Samba4 messaging system, but I want to do it step by step and I think getting notify in is more important in this step. Volker (This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
2007-10-10r19626: Coalesce usage of DUMP_CORE. Fix formatting on chdir error messageJames Peach1-2/+0
in core dump path. (This used to be commit 9a51fba71c5fa7082c331e1a78a98638d9aa06cf)
2007-10-10r16576: Fix Klocwork #2015. Possible null deref.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 9cbfaf62a3c4bb7d2e594e412449506ab0af4063)
2007-10-10r15700: Make nmbd udp sockets non-blocking to prevent problemJeremy Allison1-0/+4
with select returning true but no data being available. Fix for bug #3779. Jeremy. (This used to be commit e5787cf75b2e7d50f551f34f28d280c27b0aa134)