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

168 Commits

Author SHA1 Message Date
Amitay Isaacs
1f55865f28 s4-dns: Fix format string vulnerability in an error message (bug #9354)
Also, fixes few comments.

Thanks to Bruno Rohée <bruno@rohee.org> for reporting and patch fix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Kai Blin <kai@samba.org>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sun Nov  4 16:58:13 CET 2012 on sn-devel-104
2012-11-04 16:58:13 +01:00
Stefan Metzmacher
a9a38415e5 s4:dns_server: fix formatting difference compared to v4-0-test
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 24 10:12:51 CEST 2012 on sn-devel-104
2012-10-24 10:12:51 +02:00
Andrew Bartlett
83d34bb2bb dns_server: Try and use the dns-SERVER account if we were configured with it 2012-10-17 11:09:17 +02:00
Matthieu Patou
2c3a8081ea s4-dns: Fix the comments about ignoring zones in internal server
Acked-By: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sat Oct 13 12:37:53 CEST 2012 on sn-devel-104
2012-10-13 12:37:53 +02:00
Amitay Isaacs
d70f3644a4 s4-dns: dlz_bind9: Ignore zones that are not used by BIND9 DLZ plugin
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2012-10-09 10:36:32 +11:00
Matthieu Patou
4b83c43ac2 s4-dns: fix a warning
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Oct  8 10:45:41 CEST 2012 on sn-devel-104
2012-10-08 10:45:40 +02:00
Matthieu Patou
ffab1d7cb2 s4-dns: Ignore zones that shouldn't be returned currently
RootDNSServers should never be returned (Windows DNS server don't)
..TrustAnchors should never be returned as is, (Windows returns
TrustAnchors) and for the moment we don't support DNSSEC so we'd better
not return this zone.
2012-10-07 22:11:48 -07:00
Matthieu Patou
f4b9007faf s4-dns: fix a non handled memory out of memory
Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Tue Oct  2 09:43:52 CEST 2012 on sn-devel-104
2012-10-02 09:43:52 +02:00
Kai Blin
81805222ec s4 dns: Fix return code for deleted records
This fixes bug #9225. We already had a test for this scenario, but the test wasn't
correct. This patch fixes the test, and also fixes the bug.

Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sun Sep 30 13:09:14 CEST 2012 on sn-devel-104
2012-09-30 13:09:14 +02:00
Kai Blin
ecb4a8a824 s4 dns: Get rid of deprecated allocation result check 2012-09-30 10:44:03 +02:00
Matthias Dieter Wallnöfer
5f973631b6 s4:dns_server - introduce the wildcard binding feature
We need the wildcard binding feature otherwise we might get bound to a
private interface in case of multiple interfaces and no "interfaces"
parameter in smb.conf.

Code taken from source4/ldap_server/ldap_server.c

Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Sun Sep 23 23:44:03 CEST 2012 on sn-devel-104
2012-09-23 23:44:03 +02:00
Andrew Bartlett
1627fcda3e dns_server: Remove parameter 'dns recursive queries' and base this on 'dns forwarder'
This simplifies a very common configuration.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-09-12 16:51:29 +02:00
Stefan Metzmacher
9583366d1e s4:dns_server: remove wrong and unused dsdb_check_access_on_dn() check
metze
2012-09-12 16:51:29 +02:00
Andrew Bartlett
61a07df824 dns_server: Attempt to SET and UNSET the sessionInfo to match the incoming user
This avoids re-opening the DB as the correct user, but applies all the right ACLs
and resulting owner.

This needs a bit more testing...

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Kai Blin <kai@samba.org>
2012-09-12 16:51:29 +02:00
Kai Blin
cf3aab61fa s4 dns: Improve logging of delegated dns updates 2012-09-12 16:51:29 +02:00
Kai Blin
8ba8020586 s4 dns: Make debug output less noisy
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri Sep  7 00:31:56 CEST 2012 on sn-devel-104
2012-09-07 00:31:56 +02:00
Kai Blin
319b239dc4 s4 dns: Check if signing user is allowed to update records
This should fix bug #9142
2012-09-06 22:43:05 +02:00
Andrew Bartlett
52f0dedc1a selftest: Add tests for the dlz_bind9 module
This will help ensure that we do not break the fundemental loading etc.

From here, it should be easy to extend this to more comprehensive tests.

Andrew Bartlett
2012-09-06 15:22:26 +10:00
Kai Blin
5e492f8d32 s4 dns: Allow configuring signed updates
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed Sep  5 20:42:46 CEST 2012 on sn-devel-104
2012-09-05 20:42:46 +02:00
Kai Blin
2b17566e89 s4 dns: Make sure to remember incoming tkey name 2012-09-05 19:08:33 +02:00
Kai Blin
53f602c374 s4 dns: Verify incoming TSIG signatures 2012-09-05 19:02:17 +02:00
Kai Blin
7fe5e2cdcb s4 dns: Handle GSS-TSIG signature creation 2012-09-05 19:02:17 +02:00
Kai Blin
956f41bddf s4 dns: When we got a TKEY, we need to remember which key to use for signing 2012-09-05 19:02:17 +02:00
Kai Blin
e81d026576 s4 dns: TKEY record needs to remember incoming algorithm
Samba3 (and older windows versions) use gss.microsoft.com, win7 (and the RFC) use gss-tsig
2012-09-05 19:02:17 +02:00
Kai Blin
c0e6a4b1b0 s4 dns: Move dns_find_tkey to an extra file 2012-09-05 19:02:16 +02:00
Andreas Schneider
58d8d9440f s4-dns: Fix linking the dns service.
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep  5 18:40:00 CEST 2012 on sn-devel-104
2012-09-05 18:40:00 +02:00
Kai Blin
558fa4c45a s4 dns: Revert erroneous push from wrong branch
I've pushed the wrong branch for this, sorry about that.

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed Sep  5 14:10:54 CEST 2012 on sn-devel-104
2012-09-05 14:10:54 +02:00
Kai Blin
2311a2c9f5 s4 dns: Allow configuring signed updates
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed Sep  5 10:45:22 CEST 2012 on sn-devel-104
2012-09-05 10:45:22 +02:00
Kai Blin
b5dd26cc69 s4 dns: Make sure to remember incoming tkey name 2012-09-05 08:41:24 +02:00
Kai Blin
140a8d86ac more tsig_verify stuff 2012-09-05 08:41:24 +02:00
Kai Blin
17c91b5db0 drop me 2012-09-05 08:41:24 +02:00
Kai Blin
cf4333b0cd hack: dns_sign_tsig correct memcpy 2012-09-05 08:41:23 +02:00
Kai Blin
a0c2453405 HACK remove debug statement 2012-09-05 08:41:23 +02:00
Kai Blin
f3e44c390c s4 dns: Verify incoming TSIG signatures 2012-09-05 08:41:23 +02:00
Kai Blin
fc9de26497 s4 dns: Handle GSS-TSIG signatures 2012-09-05 08:41:23 +02:00
Kai Blin
c256566aa9 s4 dns: Store TKEYs in a ringbuffer
This stops us from potentially being DoSed by tons of TKEYs

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri Aug 31 22:46:01 CEST 2012 on sn-devel-104
2012-08-31 22:46:01 +02:00
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