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

34 Commits

Author SHA1 Message Date
Amitay Isaacs
0c8a10ecb0 dlz_bind9: Fix handling of TXT records with multiple quoted strings 2012-03-02 00:24:50 +11:00
Amitay Isaacs
f5b041fc04 dlz_bind9: This fixes the problem with adding/deleting rdataset
Fix commit 169db33303. This change
allowed for LDB records without dnsRecord attribute to exist to
prevent large number of deleted records.

This change fixes the handling of missing dnsRecord attribute
and correctly deleting dnsRecord attribute.
2012-03-02 00:24:49 +11:00
Amitay Isaacs
1a70332f95 dlz_bind9: Fix the log message level 2012-02-21 23:08:35 +11:00
Amitay Isaacs
169db33303 dlz_bind9: Do not remove LDB record in subrdataset and delrdataset
This fixes the problem of large number of deleted records in DNS
partitions due to frequent dynamic dns updates from windows
clients. The typical pattern for dynamic update get converted
into subrdataset() followed by addrdataset().  If there are no
dnsRecord attributes left as a result of sub/delrdataset(),
leave the LDB entry for dns name as is. The subsequent
addrdataset() would add the dnsRecord attribute without
re-creating the same entry.
2012-02-21 18:24:30 +11:00
Amitay Isaacs
dc4ef9b57b dlz_bind9: for authenticated user, set the AUTHENTICATED USERS sid in token 2012-01-25 10:01:45 +11:00
Amitay Isaacs
6a1201a67b dlz_bind9: create session info from PAC using auth context
This fixes the creation of session info from PAC, after changes
in gensec code.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Jan  4 01:59:09 CET 2012 on sn-devel-104
2012-01-04 01:59:09 +01:00
Andrew Bartlett
dbbb626dc0 s4-dns Use match-by-key in GSSAPI server if principal is not specified
This allows dlz_bind9 to match on exactly the same key as bind9 itself

Andrew Bartlett

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Dec  7 02:20:10 CET 2011 on sn-devel-104
2011-12-07 02:20:10 +01:00
Amitay Isaacs
b9f4febd40 dlz_bind9: Add command line options for URL and debug
To specify debug level, use -d <level> in named.conf.
To specify sam db, use -H <path/to/sam.ldb> in named.conf.

The default log level is set to 0. The log level specified in smb.conf
is not used. To set log level, use -d option.
2011-12-07 10:43:52 +11:00
Amitay Isaacs
de9a4ca831 dlz_bind9: Set debugging output to stderr 2011-12-07 10:43:52 +11:00
Amitay Isaacs
ce19bfcc6b dlz_bind9: Use client supplied credentials for DNS record update
This creates the DNS records with correct owner and group settings.
2011-12-07 10:43:31 +11:00
Amitay Isaacs
d3d365daab dlz_bind9: For creating a child entry, use only SEC_ADS_CREATE_CHILD
The member servers in AD do not have access to modify the parent, but
do have access to create child DNS records.
2011-12-07 10:41:26 +11:00
Amitay Isaacs
7ac5c5061e dlz_bind9: Added access check to verify dynamic update
This creates session info from kerberos ticket and verifies if
the signer has write access to a particular DN corresponding
to the name in dynamic update.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-11-29 16:00:36 +11:00
Amitay Isaacs
dcc5a7e1f2 dlz_bind9: Use the sam database in dns/ as default
This change is introduced to access samdb copy directly, rather
than over ildap. The advantage is that the samba server does not
need to be running for bind9 to start.
2011-11-29 16:00:36 +11:00
Stefan Metzmacher
ebcf45b550 s4:dlz_bind9: add no memory checks
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 17 14:07:25 CEST 2011 on sn-devel-104
2011-10-17 14:07:24 +02:00
Stefan Gohmann
d9558fdc34 s4:dlz_bind9: Copy dn before changing in b9_has_soa
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-17 12:36:50 +02:00
Stefan Gohmann
c88195fbe3 s4:dlz_bind9: add missing earch bases for windows 2000 domains
By default the samba4 dlz_bind9 backend searches under
CN=MicrosoftDNS,DC=DomainDnsZones and CN=MicrosoftDNS,DC=ForestDnsZones.

In my samba4 test setup all DNS zones are under CN=MicrosoftDNS,CN=System.
After adding the attached patch it works fine for me.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-17 12:36:49 +02:00
Matthias Dieter Wallnöfer
bbf28703a4 s4:"ldb_connect" calls - proof for "!= LDB_SUCCESS"
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Andrew Bartlett
67905b41a9 s4-param Rename private_path() -> lpcfg_private_path()
This is consistent with lock_path()

Andrew Bartlett
2011-04-29 16:38:14 +10:00
Andrew Tridgell
74493af86f s4-dns: renamed DNS_TYPE_ZERO to DNS_TYPE_TOMBSTONE
we now know that these are tombstone records, with a timestamp

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Matthias Dieter Wallnöfer
aa759de6b3 s4:dns_server/dlz_bind9.c - initialise "ret" variables 2011-01-12 19:52:20 +01:00
Andrew Tridgell
987b49c8e2 dns: fixed dns record format
based on new WSPP docs from Bryan Burgin

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec 22 04:45:46 CET 2010 on sn-devel-104
2010-12-22 04:45:46 +01:00
Andrew Tridgell
901f34840b s4-dns: set dwSerial and dwFlags
we are waiting on full docs on these, but this is better than zero

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Dec 21 12:05:51 CET 2010 on sn-devel-104
2010-12-21 12:05:51 +01:00
Andrew Tridgell
f2dea305f4 s4-dns: fixed name comparison in bind9 module
we need to compare without the trailing '.'

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-21 11:18:20 +01:00
Andrew Tridgell
8466027bf9 s4-dns: return the local hostname as the SOA authority
this is done by all DCs in the domain to ensure that updates go to the
right place
2010-12-21 11:18:19 +01:00
Andrew Tridgell
da5c328b4b s4-dns: disable segfault handling in dlz_bind9
we don't want bind9 calling the Samba segv handler
2010-12-21 11:18:19 +01:00
Andrew Tridgell
8c04657600 s4-dns: fixed a crash bug in dlz_bind9 code
we need to keep el_ctx for the next part of the loop
2010-12-21 02:42:37 +01:00
Andrew Tridgell
4a1ce3b4b9 s4-dns: implemented parsing and storing of DNS records from bind
DNS updates from nsupdate against our ldb SAM now work

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec 15 12:36:46 CET 2010 on sn-devel-104
2010-12-15 12:36:46 +01:00
Andrew Tridgell
74f8c9ccf8 s4-dns: added basic DLZ writeable support to dlz_bind9
this implements the expanded DLZ update driver API, allowing for bind9
to send dynamic updates to the Samba DLZ driver.

This change also adds support for exporting all DNS zones in the SAM
database, which also means we now correctly separate the _msdcs zone
from the main zone.
2010-12-15 21:48:15 +11:00
Andrew Tridgell
18177f1e52 s4-dns: use ldb hooks for samba extensions in dlz_bind9
this avoids linking dlz_bind9 directly to heimdal, which allows a
RTLD_DEEPBIND in ldb module loading to find the right kerberos version

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-08 05:26:06 +01:00
Andrew Tridgell
591e18a12c s4-dns: allow a remote ldap server to be used with dlz_bind9
this allows for configs like this:

dlz "Samba zone" {
	database "dlopen /usr/lib/samba/modules/bind9/dlz_bind9.so
	-H ldap://10.0.0.4 -Uadministrator@v2.tridgell.net%penguin -k no";
};
2010-12-08 05:26:05 +01:00
Andrew Tridgell
5845cc94a9 s4-dns: return the correct TTL
I've now patched the bind9 sdlz layer to cope with multiple TTLS on a
name/type pair

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Dec  6 08:12:11 CET 2010 on sn-devel-104
2010-12-06 08:12:11 +01:00
Andrew Tridgell
49e0aef3cb s4-dns: support Samba command line options to the dlz_bind.so module
this allows setting of Samba command line options in named.conf
2010-12-06 17:24:52 +11:00
Andrew Tridgell
c60ce7503c s4-dns: added flags support for dlz_bind9
this will allow us to set the THREADSAFE flag if we make this
threadsafe. For now we don't set that flag, and let bind9 do the
locking for us.
2010-12-06 17:24:52 +11:00
Andrew Tridgell
9f6f1b0098 s4-dns: a dlz module for bind9
this module can be loaded into bind9 if bind9 has been built with the
--with-dlz-dlopen option. It provides access bind9 access to the
DNS records in SAMDB.

You can then start bind9 with this in named.conf:

dlz "Samba zone" {
	database "dlopen /usr/lib/samba/modules/bind9/dlz_bind9.so";
};

See http://git.samba.org/tridge/bind9.git for a bind9 tree with the
dlz_dlopen driver. See also the discussion on the bind-workers mailing
list

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Dec  6 05:48:30 CET 2010 on sn-devel-104
2010-12-06 05:48:30 +01:00