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

326 Commits

Author SHA1 Message Date
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +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
Andrew Tridgell
98e4393df9 s4-dsdb: create a static system_session context
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
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
e9a589feac s4-server: kill main daemon if a task fails to initialise
When one of our core tasks fails to initialise it can now ask for the
server as a whole to die, rather than limping along in a degraded
state.
2009-09-18 18:05:55 -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
Jelmer Vernooij
6ace18904d Fix more unresolved symbols. 2009-06-02 18:05:41 +02:00
Andrew Tridgell
ae1c2415e2 fix uninitialised use of samctx 2009-06-01 13:42:51 +10:00
Andrew Bartlett
6ef65389fd Don't use crossRef records to find our own domain
A single AD server can only host a single domain, so don't stuff about
with looking up our crossRef record in the cn=Partitions container.
We instead trust that lp_realm() and lp_workgroup() works correctly.

Andrew Bartlett
2009-05-26 12:37:09 +10: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
e08dfe008e s4:dgram: s/private/private_data
metze
2009-02-02 13:08:48 +01: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
cd5e43b327 nbt_server: fix crash bug, the wins client interface may not have a nbtsock
metze
(from samba4wins tree 8035601da7c7e8b65fe1d82c2654c412fa169338)
2009-01-19 07:05:50 +01:00
Stefan Metzmacher
a5b3975cf7 nbt_server: redirect incoming response packets to the correct interface
We may send requests packets (WACK challenges or similar things)
via a different udp socket than the socket we receive the
matching response. We need to setup an unexpected handler
on the nbt sockets and redirect responses to the correct
nbt_socket. (By redirect I mean we use the correct
nbt_socket structure, we're *not* resending the packet
with sendto() via the kernel...)

metze
(from samba4wins tree 7ce8e705e5a9aabb787d17fbec7a078d9d6780dc)
2009-01-19 07:05:44 +01:00
Stefan Metzmacher
c97df0d892 nbt_server: add some debug messages which show the used interfaces addresses
metze
(from samba4wins tree 8eb30add7c95672a85b4084b4a3dbfa78db820c4)
2009-01-19 07:05:26 +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
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
c023828962 Fix missing symbols issues when building with shared libraries. 2008-12-22 21:03:09 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
218f482fbf Use common strlist implementation in Samba 3 and Samba 4. 2008-10-12 00:56:56 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Volker Lendecke
af1c802791 The IRIX compiler does not like embedded unnamed unions 2008-10-02 08:09:25 +02:00
Jelmer Vernooij
6a689c23e8 Rename smbd -> samba.
This reverts commit 05ea5e23cf.

Conflicts:

	source4/smbd/server.c
2008-09-24 03:16:15 +02:00
Simo Sorce
508527890a Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
The previous ldb_search() interface made it way too easy to leak results,
and being able to use a printf-like expression turns to be really useful.
2008-09-23 18:17:46 -04:00
Günther Deschner
a1a92688ba s4-nbt: use ../libcli/nbt
Guenther
2008-09-23 09:37:24 +02:00
Günther Deschner
13a3971438 s4-nbt: use private_data instead of private.
Guenther
2008-09-23 09:37:24 +02:00
Jelmer Vernooij
05ea5e23cf Revert "Rename smbd -> samba."
This reverts commit 0e9008be35.
2008-09-21 21:32:40 +02:00
Jelmer Vernooij
0e9008be35 Rename smbd -> samba. 2008-09-21 21:26:40 +02:00
Stefan Metzmacher
69964a24d7 nbt_server/wins: don't force wins_ldb as shared_module
metze
(This used to be commit 861b79c91f)
2008-06-30 09:25:31 +02:00
Andrew Bartlett
6f55742b4c Rework samdb handling for 'netlogon' packets.
Don't reopen the samdb for every netlogon packet, and use the
system_session(), as we must access data not available to anonymous.
Perhaps we should consider a 'authenticated but not system' token, if
we want more control on this.

Andrew Bartlett
(This used to be commit d10c9b71ea)
2008-06-30 12:22:50 +10:00
Stefan Metzmacher
be46118091 nbt_server/wins: add forward declaration for struct event_context
metze
(This used to be commit 5ff4ffd162)
2008-06-27 09:46:24 +02:00