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

300 Commits

Author SHA1 Message Date
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
Andrew Bartlett
f67156fc92 Extend the 'netlogon' CLDAP and NBT implementation.
This now handles checking if the user exists, including validating the
ACB mask on the user.

This would be a nasty security hole, if Kerberos did not already
expose this information anonymously...

Andrew Bartlett
(This used to be commit 441b286c00)
2008-05-21 12:37:36 +10:00
Andrew Bartlett
fdec7fdaf5 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 7594f79db6)
2008-05-21 12:13:45 +10:00
Andrew Bartlett
58375fdff0 Further tests show NTLOGON and NETLOGON to be identical.
I can't tell the difference between the NTLOGON and NETLOGON behaviour
on these pipes, and this 'exception' turned out to be alignment
dependent, not pipe dependent.

Andrew Bartlett
(This used to be commit bf1b99aff2)
2008-05-21 10:18:21 +10:00
Andrew Bartlett
52f0af3990 Fix irpc GetDC requests.
We would return NT_STATUS_NO_LOGON_SERVERS in all cases, which was
less than helpful.

Andrew Bartlett
(This used to be commit 5dfa316b36)
2008-05-20 15:28:26 +10:00
Andrew Bartlett
acba9bc702 Fix number of arguments to IRPC getdc callback.
Andrew Bartlett
(This used to be commit 8753ced2f4)
2008-05-20 14:52:57 +10:00
Andrew Bartlett
aa90730e0c Revert addition of 'mailslot' parameter.
It turns out that the mailslot name (and a useful private prointer) is
provided in the struct dgram_mailslot_handler.

Andrew Bartlett
(This used to be commit e17804b885)
2008-05-20 11:54:50 +10:00
Andrew Bartlett
343fea32cc Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
Fix config.mk due to changing syntax.

Conflicts:

	source/libcli/config.mk
	source/nbt_server/config.mk
(This used to be commit 6a1c76f29f)
2008-05-20 08:03:35 +10:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Andrew Bartlett
fd0d47b746 Handle netbios domains in the CLDAP server too.
This commit also fixes a number of issues found by the NBT-DGRAM and
LDAP-CLDAP tests.

Andrew Bartlett
(This used to be commit 8f99a4b94e)
2008-05-17 20:53:29 +10:00
Andrew Bartlett
4f557d7954 Show that the NTLOGON and NETLOGON mailslots are *very* similar.
Rework the mailslot infrustructure to cope, passing down the mailslot
name so that we can implement both in the same callback function.

Andrew Bartlett
(This used to be commit 89fdd77891)
2008-05-17 13:24:29 +10:00
Andrew Bartlett
b0f3441516 Make the IRPC GetDC request use SAM_LOGON packets.
This also moves the request to the new netlogon structures.

Andrew Bartlett
(This used to be commit 7ed4ba8d1a)
2008-05-17 12:43:42 +10:00
Jelmer Vernooij
cc9c4aaa8d Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/Makefile
	source/auth/config.mk
	source/auth/gensec/config.mk
	source/build/m4/public.m4
	source/build/make/python.mk
	source/build/make/rules.mk
	source/build/smb_build/header.pm
	source/build/smb_build/main.pl
	source/build/smb_build/makefile.pm
	source/dsdb/config.mk
	source/dsdb/samdb/ldb_modules/config.mk
	source/kdc/config.mk
	source/lib/events/config.mk
	source/lib/events/events.c
	source/lib/ldb/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/util/config.mk
	source/libcli/smb2/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/nbt_server/config.mk
	source/ntptr/ntptr_base.c
	source/ntvfs/posix/config.mk
	source/ntvfs/sysdep/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/rpc_server/service_rpc.c
	source/scripting/ejs/config.mk
	source/scripting/python/config.mk
	source/smb_server/config.mk
	source/smbd/server.c
	source/torture/config.mk
	source/torture/smb2/config.mk
	source/wrepl_server/config.mk
(This used to be commit 13bbd42068)
2008-04-25 10:04:20 +01:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Jelmer Vernooij
e9017ba418 Use _OBJ_FILES variables in a couple more places.
(This used to be commit 92856d5054)
2008-04-14 17:22:58 +02:00
Jelmer Vernooij
b5d84a74d1 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
2008-04-08 03:45:06 +02:00
Jelmer Vernooij
f41b9a9dde Rename libsamba-config to libsamba-hostconfig.
(This used to be commit c46b7e90e3)
2008-04-01 15:08:30 +02:00
Jelmer Vernooij
fb6fdfce37 Fix the build.
(This used to be commit f2e4974471)
2008-03-08 17:02:40 +01:00
Jelmer Vernooij
b29d47edcf Move object file lists to the Makefile.
(This used to be commit a7e6d2a183)
2008-03-03 18:25:28 +01:00
Jelmer Vernooij
c8011b5d09 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/scripting/python/config.mk
(This used to be commit 0ac0ea660a)
2008-02-29 12:45:46 +01:00
Jelmer Vernooij
b5bd663690 Fix use of realpath, fix init functions for ldb.
(This used to be commit ca510136d2)
2008-02-25 20:40:37 +01:00
Jelmer Vernooij
c38c2765d1 Remove yet more uses of global_loadparm.
(This used to be commit e01c1e87c0)
2008-02-21 17:17:37 +01:00
Jelmer Vernooij
5f9abf527a Remove more global_loadparm uses.
(This used to be commit 4d6fd9381f)
2008-02-21 16:18:23 +01:00
Jelmer Vernooij
39a817d310 Fix use of some modules (needed _PUBLIC_).
(This used to be commit ce332130ea)
2008-02-20 04:33:43 +01:00
Jelmer Vernooij
16109a40c0 Use struct-based rather than function-based initialization for ldb modules everywhere.
(This used to be commit 85c96a3258)
2008-02-20 01:54:32 +01:00