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

190 Commits

Author SHA1 Message Date
Michael Adam
476672b647 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-06 21:48:17 +01:00
Volker Lendecke
052b9a53b7 Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jun 19 01:05:17 CEST 2015 on sn-devel-104
2015-06-19 01:05:17 +02:00
Stefan Metzmacher
b3e33ea5bf s4:nbt_server: avoid str_list related const warning
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:45 +01:00
Andrew Bartlett
0927b0b01a s4:nbt_server/wins: make use explicit use of the top level event context
Andrew Bartlett

Change-Id: I4b8e5c16bd03a038da6527cfb4c91fc874626b18
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-05-13 00:08:12 +02:00
Garming Sam
1fb1f6bc0d lib/param: handle non-constant strings properly by passing in a memory context
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: Ic6bb1c709defd2b0f35fc7b877da0badca385776
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:06 +13:00
Stefan Metzmacher
72dec3c1f1 s4:nbt_server: avoid talloc_reference()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-12 16:48:51 +12:00
Andrew Bartlett
a056238bcd s4-nbt_server: remove unused winsdb_get_seqnumber()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 10 08:21:41 CET 2012 on sn-devel-104
2012-02-10 08:21:41 +01:00
Andrew Bartlett
5954a37997 lib/param: Remove parameters for wins and spoolss databases
This removes the smb.conf parameters per-database, replacing these
with hard-coded database names in well known (and configurable)
directories.

The wins.ldb is now always in the "state dir", rather than being in
both state and lock dir (ie, a bug).

Less smb.conf parameters means less parameters to try and sync up
between the loadparm subsystems.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 18 05:39:54 CEST 2011 on sn-devel-104
2011-10-18 05:39:54 +02:00
Simo Sorce
c84caabf8c s4:misc: remove last usage of legacy event_ fn names
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Aug 14 00:38:13 CEST 2011 on sn-devel-104
2011-08-14 00:38:13 +02:00
Stefan Metzmacher
110bf317d8 s4:winsdb: place wins.ldb in "state dir" instead of "lock dir"
It's not only a cache as we also support static records.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 16:16:45 CEST 2011 on sn-devel-104
2011-07-12 16:16:45 +02:00
Andrew Bartlett
d4ef70a764 param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()
Jermey started this in 1997 with 0aa493cc03

(avoiding the duplicate function makes it easier to generate the
struct loadparm_globals).

Andrew Bartlett
2011-07-02 12:31:34 +10:00
Andrew Tridgell
e14538d939 s4-wins: ensure we only use IPv4 for WINS owner 2011-06-08 04:56:04 +02:00
Andrew Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett
2011-05-08 12:57:04 +02:00
Andrew Bartlett
209d47c100 s4-param Rename lock_path() -> lpcfg_lock_path()
This avoids a conflict with the source3/ lock_path()
2011-04-29 16:38:14 +10:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Matthias Dieter Wallnöfer
96c1cd762d s4:introduce casts before outputs of "time_t" variables
Otherwise we are getting warnings on "NetBSD".
2010-11-28 16:38:16 +01:00
Andrew Tridgell
9103047782 s4-ldb: enable version checking in dsdb ldb modules 2010-11-01 13:05:04 +00:00
Andrew Tridgell
7eb2eed156 s4-dsdb: convert the rest of the ldb modules to the new module type 2010-11-01 18:55:19 +11:00
Matthias Dieter Wallnöfer
38438c3061 s4:nbt_server - fix a LDB counter type
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Oct 19 14:05:13 UTC 2010 on sn-devel-104
2010-10-19 14:05:13 +00:00
Stefan Metzmacher
e3a0463414 libcli/nbt: convert nbt_name_register_wins_send/recv to tevent_req
metze
2010-10-18 15:36:15 +00:00
Stefan Metzmacher
12c38806af s4:nbt_server/winsclient: add a nbtd_wins_register_state
We now keep the nbtd_wins_register_state around between
nbt_name_register_wins_send() and nbt_name_register_wins_recv()

metze
2010-10-18 15:36:15 +00:00
Stefan Metzmacher
43fb7f1698 libcli/nbt: convert nbt_name_refresh_wins_send/recv to tevent_req
metze
2010-10-18 15:36:15 +00:00
Stefan Metzmacher
5f19a24c50 s4:nbt_server/winsclient: add a nbtd_wins_refresh_state
We now keep the nbtd_wins_refresh_state around between
nbt_name_refresh_wins_send() and nbt_name_refresh_wins_recv()

metze
2010-10-18 15:36:15 +00:00
Stefan Metzmacher
2ae3bb0b16 s4:nbt_server/wins: fix compiler warnings
metze
2010-10-18 15:36:15 +00:00
Jelmer Vernooij
93126b3315 samdb: Add flags argument to samdb_connect(). 2010-10-10 23:08:49 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
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>
2010-07-16 18:24:27 +10:00
Andrew Tridgell
fae84f98e3 libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
2010-03-26 17:36:02 +11:00
Brad Hards
1e986c1cb3 More spelling fixes across source4/
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:38 +01:00
Andrew Tridgell
3ae75a4248 s4: use LDB_TYPESAFE_QSORT() instead of ldb_qsort() 2010-02-13 22:36:12 +11:00
Stefan Metzmacher
ea7ec4fb30 s4:winsserver: reject name registrations with a scope length > 237
This matches Windows 2008 behavior. Name releases are just ignored.

metze
2010-02-01 15:23:33 +01:00
Matthias Dieter Wallnöfer
230f387312 s4:nbt_server/wins/winsdb - Fix "const" warning 2009-10-30 12:37:33 +01:00
Andrew Tridgell
4ad0397d8a s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.

The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
2009-10-23 14:52:17 +11:00
Matthias Dieter Wallnöfer
ba7707176d s4:winsdb - Substitute LDB result numbers with constants 2009-10-16 14:06:24 +02:00
Andrew Tridgell
7bcc0b2966 s4-winsrepl: don't put in attributes with no elements
Empty attributes are no longer allowed by ldb. This also fixes the
error checking in winsdb_message()

This fixes the samba4.nbt.winsreplication test
2009-10-16 11:56:40 +11:00
Andrew Tridgell
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07:00
Andrew Tridgell
e2d4ae1510 fixed several places that unnecessarily take a reference to the event context
These references were triggering the ambiguous talloc_free errors from
the recent talloc changes when the server is run using the 'standard'
process model instead of the 'single' process model. I am aiming to
move the build farm to use the 'standard' process model soon, as part
of an effort to make our test environment better match the real
deployment of Samba4.

The references are not needed as the way that the event context is
used is as the 'top parent', so when the event context is freed then
all of the structures that were taking a reference to the event
context were actually freed as well, thus making the references
redundent.
2009-08-07 17:24:48 +10:00
Jelmer Vernooij
4657f52c06 Fix build with system LDB. 2009-06-18 01:21:35 +02:00
Andrew Bartlett
524a79b735 s4:nbtd Use str_list_make_single() to turn iname->wins_server into a list 2009-05-14 05:56:59 +10:00
Stefan Metzmacher
5f13710ced s4:irpc: avoid c++ reserved word 'private'
metze
2009-02-01 00:17:20 +01:00
Stefan Metzmacher
06a24497dc s4:nbt_server/wins/: fix compiler warnings in winsdb.c
metze
2009-02-01 00:17:18 +01:00
Simo Sorce
d4aeed879b Fix all other modules to use ldb_module.h instead of ldb_private.h
The only 2 modules escaping the rule so far are rootdse and partitions
2009-01-30 17:07:25 -05:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Stefan Metzmacher
afd405dd90 nbt_server/wins: winsdb_handle() can be static
metze
(from samba4wins tree ba45b14b48f62eb1668509738f83fa17a4ce95fd)
2009-01-19 07:05:54 +01:00
Stefan Metzmacher
2973af5111 nbt_server/wins: add some const
metze
(from samba4wins tree e54b2d3ddbf338fe5d9802724e76f320fd4423e5)
2009-01-19 07:05:54 +01:00
Stefan Metzmacher
2dcac3c5e6 nbt_server/wins: use talloc_zero() to create struct winsdb_handle
metze
(from samba4wins tree 0f2995f77ab092d71e539c2473c94956f9c253fb)
2009-01-19 07:05:54 +01:00
Stefan Metzmacher
e1c968afd8 winsserver: add "wreplsrv:propagate name releases" option
Add an option to propagate name releases directly.
This make the results for #1C name queries more consistent
among all servers.

It's off by default to match windows.

metze
(from samba4wins tree 166e9fdffb9f4e26513c3b4ec1f6f168ecbe18f8)
2009-01-19 07:05:52 +01:00
Stefan Metzmacher
fb64b12be5 winsserver_release: update the expire time if only one address is released
We also take the ownership if the record isn't owned.
This matches windows...

metze
(from samba4wins tree d7b19339c0444cbe0989fcfa91a22323215d2f6b)
2009-01-19 07:05:52 +01:00
Stefan Metzmacher
780bc13736 winsdb: the we_are_owner in winsdb_lookup() needs to be per address
This fixes a bug where #1C addresses are registered with different
WINS-Servers and a merged #1C record.

metze
(from samba4wins tree 72e055394a0fd1f543be9c196b4179356a1033f6)
2009-01-19 07:05:50 +01:00
Stefan Metzmacher
ee8f481d94 winsserver: we need to ignore duplicated name register requests.
This fixes the following bug:

While we reply with a WACK response to a client.
Instead of waiting for the final reply some
windows client just resends the request using
the same name_trn_id in the nbt_name_packet.
We handled this as a new request and send a
WACK response (and the challenges) again.
Then the first request gets its final success
response, but the when we try to send the success
for the "second" request we notice that
the record was changed in between and we return
an error.

Windows 2003 (and I assume all other versions as well)
detect the packet is just a resent of a currently pending
request and ignores it.

So we now keep a list of all pending WINS name register
requests which result in a WACK response. On each incoming
name register request we search through the list to find
duplicate requests and ignore them. In theory we should
do that for all requests, but name register requests
are the only requests we response async and only
if we have to go via the WACK code path.

metze
(from samba4wins tree 382e7d384b70d03e9f81c7bb353afaed288d80f0)
2009-01-19 07:05:21 +01:00