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

556 Commits

Author SHA1 Message Date
Jeremy Allison
1e4868d251 Reduce debug log level from 0 -> 7 on non-critical message.
Jeremy.
2009-09-24 17:44:45 -07:00
Volker Lendecke
8a17cd810f Make gencache more stable
This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.
2009-07-15 10:55:20 +02:00
Volker Lendecke
5a9ca3db03 Fix bug 4699: Remove pidfile on clean shutdown 2009-06-18 16:17:57 -07:00
Björn Jacke
28e121a19b s3:nmbd: fix typo 2009-05-28 12:22:41 +02:00
Marc VanHeyningen
a4887e250b s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new
connection forks a child that immediately panics causing smbd to
coredump.  This seems unnecessarily harsh; with this code change we
now catch that error and merely log a message about it and exit
without the core dump.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 13:16:17 -07:00
Jeremy Allison
6610327770 Fix Coverity bug #902, uninitialized variable.
Jeremy.
2009-04-23 02:02:28 -07:00
Andrew Bartlett
4786a493f7 Solve some of the conflict between Samba3 and Samba4 push_string
This renames push_string in Samba3 into push_string_base and
push_string_check for the two different use cases.

This should allow push_string to be imported from Samba4, using it's
calling conventions.
2009-04-14 12:11:00 +10:00
Jeremy Allison
94ba56b2bd Fix bug #6224 - nmbd waits 5 minutes at startup before checking if it needs to run elections
Fix logic bug that causes nmbd to wait 5 minutes before
looking for a master browser. This one is *old* :-). Thanks
for Simo for bugging me on this.
Jeremy.
2009-03-26 12:28:40 -07:00
Stefan Metzmacher
3b73cdb412 s3:nmbd: implement a MAILSLOT => CLDAP proxy for NETLOGON_SAMLOGON requests
This will be used as part a the franky setup, where nmbd will forward
the MAILSLOT requests to the local samba4 CLDAP server.

"nmbd_proxy_logon:cldap_server = 127.0.0.1" would configure
and activate this feature.

metze
2009-03-21 10:44:42 +01:00
Jeremy Allison
5c63388f63 Fix bug #6186 - map readonly does not work
Jeremy.
2009-03-12 10:57:31 -07:00
Jeremy Allison
faa1100d22 More warning fixes for Solaris.
Jeremy.
2009-02-23 16:22:43 -08:00
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Aravind Srinivasan
83cf98f113 Have nmbd check all available interfaces for WINS before failing
When nmbd is acting as WINS, it picks the first interface's IP as WINS
server's IP. If the first interface's IP is zero, we will just quit
(even though we might have other interfaces with valid IPs).

This patch makes nmbd look at all interfaces and pick the first interface
with a valid IP as the WINS server's IP.
2009-02-04 20:26:50 -08:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Stefan Metzmacher
d361e332a8 s3:nmbd: handle SIG_TERM and SIGHUP via tevent
metze
2009-01-27 15:28:09 +01:00
Stefan Metzmacher
2630d4a252 s3:nmbd: as the sig_term() handler only sets a flag we don't need to block SIGTERM
The arguments of commit d98bea900e
are no longer valid.

metze
2009-01-27 15:28:09 +01:00
Stefan Metzmacher
e663df195c s3:nmbd: install the SIG_DFL handler for SIGTERM while we're waiting for interfaces
We should handle all 3 cases where we actively wait for interfaces
in the same way.

metze
2009-01-27 15:28:08 +01:00
Stefan Metzmacher
4d413381a2 s3:nmbd: we don't need to call message_dispatch() anymore it's event triggered now
metze
2009-01-22 12:37:31 +01:00
Stefan Metzmacher
048f8dba14 s3: always call run_events() before and after sys_select()
And always setup the fd events.

metze
2009-01-22 12:37:29 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Michael Adam
99ef38c84f s3:put the browse list into cache_dir, not lock_dir.
Michael
2009-01-16 01:02:23 +01:00
Michael Adam
26e5e4f6fd s3:nmbd: don't leak state_path() to talloc_tos() in wins_write_database()
Michael
2009-01-16 01:02:21 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
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-15 22:56:01 +01:00
Jeremy Allison
907f085296 Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Steven Danneman
4a578ec50b Covert several persistant tdb files to use state_path() instead of lock_path() 2009-01-12 17:46:15 -08:00
Steven Danneman
7b02e05eb6 Audit usage of get_dyn_STATEDIR() and replace with state_path()
The state directory is now run-time configurable through loadparm, so all
references to it should be done through state_path() or lp_statedir().
2009-01-12 17:46:14 -08:00
Stefan Metzmacher
c34d5f445a s3:events: change event_add_timed() prototype to match samba4
metze
2009-01-05 15:07:35 +01:00
Bo Yang
022e2f8199 clean event context after child is forked.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-01-05 15:07:31 +01:00
Volker Lendecke
bb8ca0fdbf Make cli_negprot return NTSTATUS instead of bool 2008-12-19 10:28:30 +01:00
Tim Prouty
2efacde8c4 s3: fix a few "shadows a global declaration" warnings 2008-11-03 14:44:38 -08:00
Jelmer Vernooij
fe36fe8c3e Use common net utility code (address and sockaddr manipulation). 2008-10-23 20:41:15 +02:00
Jelmer Vernooij
d6a5476ee7 Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
2008-10-23 19:53:15 +02:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Günther Deschner
81fde58551 s3-nbt: remove double nbt netlogon opcodes.
Guenther
2008-09-25 20:11:55 +02:00
Günther Deschner
f51e1f4f93 fix build warning.
Guenther
(This used to be commit a75055be5f)
2008-08-20 22:12:24 +02:00
Jeremy Allison
f23a6b7c93 Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
reported by Ted Percival <ted@midg3t.net>.
Jeremy.
(This used to be commit ab06efccf3)
2008-08-19 17:30:30 -07:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Michael Adam
9b9948134e nmbd: add support for delayed initial samlogon packages.
The hosts or networks configured with "init logon delayed hosts"
have their initial samlogon packages (empty username) delayed
by the value configured with "init logon delay" (defaulting
to 100 milliseconds).

This gives the administrator some control over what clients would
consider the preferred logon server: they choose the server that
repsonds most quickly.

Michael
(This used to be commit d52b9beede)
2008-08-09 01:15:58 +02:00
Michael Adam
33e3e94e0c nmbd_packets: make queue_packet() public.
Michael
(This used to be commit 363eb90ce8)
2008-08-09 01:15:58 +02:00
Michael Adam
7ec1678d60 nmbd: untangle logic in nmbd_messaging_context() slightly.
Michael
(This used to be commit 3baf9eb6a2)
2008-06-26 12:31:11 +02:00
Michael Adam
c1562aae9b nmbd: don't panic if messaging_init() fails - return NULL instead.
Michael
(This used to be commit e6a403209c)
2008-06-26 12:31:11 +02:00
Volker Lendecke
0c4093a234 Fix CLEAR_IF_FIRST handling of messages.tdb
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 4f4781c6d1)
2008-04-23 22:18:26 +02:00
Günther Deschner
bcbac69d1a cldap: avoid duplicate definitions so remove ads_cldap.h.
Guenther
(This used to be commit 538eefe22a)
2008-04-21 20:21:40 +02:00
Stefan Metzmacher
384282c35f nmbd: create the messaging conntext earlier
metze
(This used to be commit 056ff094ad)
2008-04-18 15:00:19 +02:00
Stefan Metzmacher
c5d1a3c710 nmbd: call reinit_after_fork() in all needed cases
metze
(This used to be commit f68829ff14)
2008-04-18 15:00:19 +02:00
Stefan Metzmacher
e21b283d67 dbwrap: wait for tdb2 change notifies in smbd, nmbd and winbindd
metze
(This used to be commit 64450cc1e4)
2008-04-12 09:14:10 +02:00
Jeremy Allison
f85c4b6905 Fix bug #5386, don't keep printing the same waiting
error message.
Jeremy.
(This used to be commit 12e6818df1)
2008-04-11 17:41:49 -07:00
Jeremy Allison
948ebaf033 Fix the last reported debian problem with nmbd not waiting
until interfaces come up.
Jeremy.
(This used to be commit 59a2f0873c)
2008-04-10 08:56:34 -07:00
Jeremy Allison
f3d4cb5efa Fix for termination problems when no interfaces found - bug #5267.
Jeremy.
(This used to be commit 4b03f4eb2d)
2008-03-27 14:23:20 -07:00