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

332 Commits

Author SHA1 Message Date
Kai Blin
7204dc9708 s4 dns: Negotiate GSSAPI-based TKEYs
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri Aug 31 10:38:35 CEST 2012 on sn-devel-104
2012-08-31 10:38:35 +02:00
Christian Ambach
18c152f8aa lib/param: move enum dns_update_settings to lib/param 2012-08-06 18:07:52 +02:00
Andrew Bartlett
b8815dc23d lib/param: Create a seperate server role for "active directory domain controller"
This will allow us to detect from the smb.conf if this is a Samba4 AD
DC which will allow smarter handling of (for example) accidentially
starting smbd rather than samba.

To cope with upgrades from existing Samba4 installs, 'domain
controller' is a synonym of 'active directory domain controller' and
new parameters 'classic primary domain controller' and 'classic backup
domain controller' are added.

Andrew Bartlett
2012-06-15 09:18:33 +02:00
Michael Adam
abe4798398 s4:dns-server: remove an extra blank line from handle_question() 2012-06-06 19:37:13 +02:00
Kai Blin
f3df2988ba s4 dns: Correctly handle A questions for CNAMEs
When an A/AAAA lookup is made for a name that actually is a CNAME
record, we need to return the CNAME record, and then do the A/AAAA
lookup for the name the CNAME points at.

This still fails for CNAMEs pointing at records for domains we need to
ask our forwarders for.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Jun  6 15:23:55 CEST 2012 on sn-devel-104
2012-06-06 15:23:55 +02:00
Kai Blin
6a1ad76c5e s4-dns: Use W_ERROR_HAVE_NO_MEMORY in create_response_rr 2012-05-30 00:38:00 +02:00
Kai Blin
9d128bbb62 s4-dns: Use proper talloc hierarchy for NS records in create_response_rr 2012-05-30 00:38:00 +02:00
Kai Blin
ffc568eb42 s4-dns: Use proper talloc hierarchy for AAAA records in create_response_rr 2012-05-30 00:37:59 +02:00
Volker Lendecke
d5ce36b148 s4-dns: Remove sync dns_process
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:59 +02:00
Volker Lendecke
d4998ccce7 s4-dns: Make the TCP dns server async
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:58 +02:00
Volker Lendecke
230f933bab s4-dns: Make the UDP dns server async
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:58 +02:00
Volker Lendecke
4dbbd304e6 s4-dns: Remove sync dns_server_process_query
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:58 +02:00
Volker Lendecke
2b6b7c64e1 s4-dns: Make dns_process_send asyn
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:57 +02:00
Volker Lendecke
28b5219ad9 s4-dns: Remove unused sync ask_forwarder wrapper
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:57 +02:00
Volker Lendecke
03b35211ab s4-dns: Make dns_server_process_query async
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:56 +02:00
Volker Lendecke
e2c1a8b87a s4-dns: Make ask_forwarder async
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:56 +02:00
Volker Lendecke
6cdbce266b s4-dns: Create a proper talloc hierarchy in create_response_rr
Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:55 +02:00
Volker Lendecke
1171c562f6 s4-dns: Add debug output for unmappable WERROR to DNS errcode
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:55 +02:00
Volker Lendecke
0b2743c71e s4-dns: Fix some typos
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:54 +02:00
Volker Lendecke
da74d5462d s4-dns: Remove some break; statements
We fall through implicitly, and that pattern is used elsewhere in Samba as
well.

Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:54 +02:00
Volker Lendecke
577a065f21 s4-dns: Fix an unlikely potential memleak
If state was alloc'ed to NULL, in_packet to != NULL and out_packet to NULL, we
leak in_packet.

Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:53 +02:00
Volker Lendecke
1bdaf4b31b s4-dns: Use talloc_asprintf_append_buffer in create_response_rr
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:53 +02:00
Volker Lendecke
1bbdf224bb s4-dns: Add some NULL checks to create_response_rr
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-30 00:37:52 +02:00
Amitay Isaacs
f52afa955e dlz_bind9: Make the talloc destructor static and return 0.
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu May 24 03:32:50 CEST 2012 on sn-devel-104
2012-05-24 03:32:47 +02:00
Amitay Isaacs
34eab45cba dlz_bind9: Fix the named crash on reloading named
When reloading zones, named first creates new zone instance and then shuts down
the old instance. Since ldb layer, keeps the same LDB open, talloc_free() on samdb
handle, causes talloc "access after use" error.

This patch keeps only single context (dlz_bind9_data) and uses reference counting
to decide when to actually free the context. Since samdb handle is reused, use
talloc_unlink() instead of talloc_free() on samdb handle.
2012-05-24 09:42:24 +10:00
Alexander Bokovoy
744f9910c8 libcli/dns: make 'clidns' private library out of DNS code in WAF build
After consolidating DNS resolver code to lib/addns, there is one piece
that still needs to be moved into a common DNS resolver library: DNS_HOSTS_FILE
subsystem. Unfortunately, direct move would require lib/addns to depend on
libcli/util/{ntstatus.h,werror.h} (provided by errors subsystem).

In addition, moving libcli/dns/* code to lib/addns/ would make conflicting
the dns_tkey_record struct. The conflict comes from source4/dns_server/ and is due
to use of IDL to define the struct. lib/addns/ library also provides its own definition
so we either need to keep them in sync (rewrite code in lib/addns/ a bit) or
depend on generated IDL headers.

Thus, making a private library and subsystem clidns is an intermediate step
that allows to buy some time fore refactoring.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Kai Blin
f01c6cf707 s4 dns: unify error handling when bailing out
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue May  8 15:48:25 CEST 2012 on sn-devel-104
2012-05-08 15:48:25 +02:00
Amitay Isaacs
246409e17e s4-dns: Build BIND DLZ modules with correct private library
This fixes rpath for samdb-common private library after make install.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon May  7 07:40:29 CEST 2012 on sn-devel-104
2012-05-07 07:40:29 +02:00
Matthieu Patou
e2a16909a1 dns server: move very verbose debug to higher level 2 -> 8 2012-04-29 07:35:09 +02:00
Andrew Bartlett
ee2642194c dlz_bind9: Also produce and install binary plugin for bind 9.9
Thanks to Alexander Bokovoy <ab@samba.org> for the fix!

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Apr 22 10:51:57 CEST 2012 on sn-devel-104
2012-04-22 10:51:57 +02:00
Amitay Isaacs
bbc98df743 dlz_bind9: Build shared libraries for both BIND versions 9.8 and 9.9
This adds #define BIND_VERSION_9_8 and keeps the current version as 9.9, so
shared libraries can be built for both BIND versions.
2012-04-16 11:16:34 +10:00
Amitay Isaacs
07677b2e43 dlz_bind9: changes to make dlz_bind9 work with BIND 9.9.0
The main changes are:
  DLZ_DLOPEN_VERSION changed from 1 to 2
  isc_boolean_t changed from bool to int
  dlz_lookup() now takes 2 additional arguments
2012-04-16 11:16:34 +10:00
Kai Blin
60eb1621d2 s4 dns: Allow updating PTR records.
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Fri Mar 30 19:26:52 CEST 2012 on sn-devel-104
2012-03-30 19:26:52 +02:00
Kai Blin
26f7a676f9 s4 dns: Only do recursive queries when allowed/desired
If recursive queries are switched off in smb.conf or the client doesn't ask for
recursion, don't recurse.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Mar 27 17:39:26 CEST 2012 on sn-devel-104
2012-03-27 17:39:26 +02:00
Kai Blin
06dd4d8ee1 s4 dns: Check smb.conf if we should allow recursion 2012-03-27 16:03:16 +02:00
Kai Blin
533b2e6612 s4 dns: Allow changing the dns operation flags in handlers 2012-03-27 16:03:16 +02:00
Kai Blin
8d9da67185 s4 dns: Only forward for zones we don't own 2012-03-27 16:03:16 +02:00
Kai Blin
a991391605 s4 dns: Forward questions we can't answer to another server
This makes use of libdns and currently hardcodes the forward server, but
it works. :)
2012-03-27 16:03:15 +02:00
Kai Blin
26a0e7a3f5 s4 dns: Test deleting records and fix a small bu
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sun Mar 11 02:27:45 CET 2012 on sn-devel-104
2012-03-11 02:27:45 +01:00
Kai Blin
1e6ef242ec s4 dns: Be less chatty during tests 2012-03-11 00:31:38 +01:00
Kai Blin
98ae3592ad s4 dns: Support TXT updates, add tests 2012-03-11 00:31:37 +01:00
Kai Blin
e6c6f49595 s4 dns: Support TXT queries 2012-03-11 00:31:37 +01:00
Kai Blin
9a93f43ceb s4 dns: Add support for PTR queries.
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Fri Mar  9 12:27:38 CET 2012 on sn-devel-104
2012-03-09 12:27:37 +01:00
Andrew Bartlett
1a8e7157e5 dlz_bind9: Log Samba DEBUG() messages to the bind9 logs 2012-03-08 10:14:05 +01:00
Kai Blin
c7f67142c0 s4 dns: Fix TCP handling in the DNS server
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Mar  6 21:17:19 CET 2012 on sn-devel-104
2012-03-06 21:17:18 +01:00
Amitay Isaacs
f5f17b19af dlz_bind9: Match PTR records as DNS names and not just strings
This fixes the dynamic update of PTR records.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Thu Mar  1 15:58:05 CET 2012 on sn-devel-104
2012-03-01 15:58:05 +01:00
Amitay Isaacs
78446b42b7 s4-dns: Fix handling of TXT DNS Record 2012-03-02 00:24:50 +11:00
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
Kai Blin
b1fdf4065e s4 dns: Allow updates based on smb.conf setting
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Dec 17 04:19:40 CET 2011 on sn-devel-104
2011-12-17 04:19:40 +01:00
Kai Blin
afa98bdc51 s4 dns: Add some debug output 2011-12-17 02:46:08 +01:00
Kai Blin
d8a499a27b s4 dns: Actually handle the update request 2011-12-17 02:46:08 +01:00
Kai Blin
c191ad7e13 s4 dns: Implement RFC-compatible update prescan 2011-12-17 02:46:08 +01:00
Kai Blin
02c9e18094 s4 dns: Update prerequisite checking conforming to RFC 2011-12-17 02:46:08 +01:00
Kai Blin
8b82bad006 s4 dns: Move record lookup to dns_utils.c 2011-12-17 02:46:08 +01:00
Kai Blin
0922953b10 s4 dns: Implement dns record comparison function 2011-12-17 02:46:08 +01:00
Kai Blin
db2573eadf s4 dns: Implement dns name equality check 2011-12-17 02:46:08 +01:00
Kai Blin
a00709eff1 s4 dns: Fix some typos in comments and a whitespace 2011-12-17 02:46:08 +01:00
Kai Blin
c01efc1207 s4 dns: Update requests with QCLASS != IN or ALL trigger NOTIMPLEMENTED errors
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Fri Dec  9 03:32:28 CET 2011 on sn-devel-104
2011-12-09 03:32:28 +01:00
Kai Blin
509acc71dd s4 dns: More explicitly use the first question of an update packet only 2011-12-09 01:59:28 +01:00
Kai Blin
3fbb76c119 s4 dns: Get rid of const qualifier for prereqs, we do need to allocate those 2011-12-09 01:59:28 +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
Kai Blin
468fa95df2 s4 dns: Reduce test output noise by upping log level for dns_name_packet logging
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Thu Nov 17 20:10:05 CET 2011 on sn-devel-104
2011-11-17 20:10:05 +01:00
Kai Blin
a243473b49 s4 dns: the opcode is called OPCODE_UPDATE in the RFC, not OPCODE_REGISTER 2011-11-04 15:51:59 +01:00
Kai Blin
57bf64b375 s4 dns: Handle QCLASS_NONE queries 2011-11-04 15:51:59 +01:00
Kai Blin
61913f8506 s4 dns: Support DNS_QTYPE_ALL queries 2011-11-04 15:51:58 +01:00
Geza Gemes
a0f7c990f4 s4:wscript - install the two missing files "dlz_bind9.so" and "named.conf.dlz"
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Oct 27 20:27:32 CEST 2011 on sn-devel-104
2011-10-27 20:27:32 +02: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
Kai Blin
1210b8abe7 dns: Do as BIND and MS DNS and drop quries with qdcount != 1
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Sep 28 03:37:22 CEST 2011 on sn-devel-104
2011-09-28 03:37:22 +02:00
Kai Blin
f98ebcf43f dns: The QCLASS is called IN, not IP 2011-09-28 02:02:36 +02:00
Andrew Tridgell
9f2a41eea8 s4-dns: when searching all partitions the NULL basedn is OK
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +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
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
Jelmer Vernooij
0b4eb47e27 source4/: Fix prototypes for all functions in various subsystems. 2011-03-19 03:20:05 +01: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
84ac1f8f6a s4-dns: dlz_bind9 doesn't need to link to gensec any more
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-08 05:26:06 +01: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
Matthias Dieter Wallnöfer
821c962d2a s4:dns_server/dns_update.c - remove unreachable statements 2010-11-29 14:48:13 +01:00
Jelmer Vernooij
13fd22f610 s4/dns: Build as shared module.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 15 00:57:27 UTC 2010 on sn-devel-104
2010-11-15 00:57:27 +00:00
Andrew Tridgell
ef7f4a1420 s4-server: make server sockets a child of the task context
We previously allocated sockets as direct children of the event
context. That led to crashes if a service called
task_server_terminate(), as it left the socket open and handling
events for a dead protocol.

Making them a child of the task allows the task to terminate and take
all its sockets with it.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-15 10:19:34 +11:00
Jelmer Vernooij
e28cec7817 ldbsamba: Lowercase library name. 2010-11-07 01:57:34 +01:00
Andrew Tridgell
679eba61ea s4-build: removed some unnecessary dependencies
based on running waf --symbol-check
2010-10-30 23:49:01 +11:00
Andrew Tridgell
046d38faa5 s4-smbd: don't initialise process models more than once
this also removes the event_context parameter from process model
initialisation. It isn't needed, and is confusing when a process model
init can be called from more than one place, possibly with different
event contexts.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-30 23:49:00 +11:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Matthias Dieter Wallnöfer
a60965b879 s4:dns_server - fix counter types 2010-10-23 16:37:29 +02:00
Kai Blin
72c8ccd408 s4 dns: Implement update record prescan logic
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Oct 23 10:58:18 UTC 2010 on sn-devel-104
2010-10-23 10:58:18 +00:00
Kai Blin
005a65660d s4 dns: Add stub checking if updates are allowed 2010-10-23 10:17:06 +00:00
Kai Blin
1e670dff6a s4 dns: Add a prerequisites check for updates 2010-10-23 10:17:06 +00:00
Kai Blin
cfa47965fe s4 dns: Switch to WERROR 2010-10-23 10:17:06 +00:00
Kai Blin
682a2e93da s4 dns: Split up the code into multiple files for easier development 2010-10-23 10:17:06 +00:00
Kai Blin
cebce2b9a4 s4 dns: More work on updates 2010-10-23 10:17:06 +00:00
Kai Blin
fb181752c5 s4 dns: Map between NTSTATUS and dns error codes 2010-10-23 10:17:06 +00:00
Kai Blin
a6305c4a16 s4 dns: Better error handling when parsing invalid or unknown records 2010-10-23 10:17:06 +00:00
Kai Blin
69a52290ce s4 dns: start handling update requests, return correct error codes 2010-10-23 10:17:06 +00:00
Kai Blin
063727a88b s4 dns: Handle CNAME records 2010-10-23 10:17:06 +00:00
Stefan Metzmacher
32a1b71ec8 s4 dns: Parse srv and soa records
Signed-off-by: Kai Blin <kai@samba.org>
2010-10-23 10:17:06 +00:00
Kai Blin
615857d989 s4 dns: Look up all names in the ldb database. 2010-10-23 10:17:06 +00:00
Kai Blin
678634abfb s4 dns: Look up records in the ldb database 2010-10-23 10:17:06 +00:00
Kai Blin
a7b833ec7e s4 dns: Reply to a name request with an A record.
The first real answer to a DNS request. Still uses hardcoded reply.
2010-10-23 10:17:05 +00:00
Kai Blin
719a6bbfed ndr dns: Add simple parser 2010-10-23 10:17:05 +00:00
Kai Blin
96195b2c0c s4 dns: Add a boilerplate DNS server implementation 2010-10-23 10:17:05 +00:00