summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_dnsupdate
Commit message (Collapse)AuthorAgeFilesLines
* samba_dnsupdate: fix "samba-tool" fallback error handlingAndrew Bartlett2017-06-101-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Extend possible server list to all NS servers for the zoneAndrew Bartlett2017-06-101-29/+69
| | | | | | | | This should eventually be removed, but for now this unblocks samba_dnsupdate operation in existing domains that have lost the original Samba DC Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupate: Try to get ticket to the SOA, not the NS serversAndrew Bartlett2017-06-101-3/+5
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Make nsupdate use the server given by the SOA recordAndrew Bartlett2017-06-101-3/+16
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Ensure we only force "server" under resolv_wrapperAndrew Bartlett2017-06-101-1/+12
| | | | | | | | | | | | This ensures that nsupdate can use a namserver in /etc/resolv.conf that is a cache or forwarder, rather than the AD DC directly. This avoids a regression from forcing the nameservers to the /etc/resolv.conf nameservers in e85ef1dbfef4b16c35cac80c0efc563d8cd1ba3e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Do not rewrite krb5.conf in selftestAndreas Schneider2017-04-291-4/+7
| | | | | | | | | | | | | | The samba_dnsupdate script is responsible to provision the DNS entries. The private krb5.conf uses dns lookups to find the KDC to acquire a Kerberos ticket. Obviously this will fail because currently we are are in the process of adding the DNS entries for the KDC. If we are inside of selftest we need to use the krb5.conf created by selftest itself. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* samba_dnsupdate: Remove extra argument from debugGarming Sam2017-04-131-1/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Add additional debuggingGarming Sam2017-03-281-0/+4
| | | | | | | | | | Tests are still flapping, because it claims it needs a cache rebuild. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Mar 28 00:04:54 CEST 2017 on sn-devel-144
* samba_dnsupdate: Raise after the error count is incrementedGarming Sam2016-11-221-1/+1
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Nov 22 05:59:40 CET 2016 on sn-devel-144
* samba_dnsupdate: cmd._run doesn't have ExceptionsGarming Sam2016-11-221-1/+7
| | | | | | | It returns a return code of -1 instead. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Revert "source4/scripting: add an option to samba_dnsupdate to add ns records."Andrew Bartlett2016-06-271-10/+0
| | | | | | | | | | | | | | This reverts a totally unnecessary change to samba_dnsupdate. The self test environment does the correct things with NS records now. This reverts commit af08cb2eee9dc9fabad6ca62ca11728209297222. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jun 27 04:13:04 CEST 2016 on sn-devel-144
* source4/scripting: add an option to samba_dnsupdate to add ns records.Richard Sharpe2016-06-211-0/+10
| | | | | | | | | | | | Add a --add-ns option to samba_dnsupdate and use that, but only when --use-file has been specified, to add an NS record to the file produced. This allows us to make progress in the self tests and is an interim fix. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Rowland Penny <repenny241155@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 21 00:51:02 CEST 2016 on sn-devel-144
* selftest: Always set up a resolv.conf and use it in samba_dnsupdateAndrew Bartlett2016-06-161-1/+1
| | | | | | | This allows samba_dnsupdate to be tested without resolv_wrapper. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Give the administrator more detail when DNS lookups failAndrew Bartlett2016-06-161-3/+16
| | | | | | | This avoids treating server errors identically to name-not-present status values Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Implement RPC <ZONE> prefix in dns_update_listAndrew Bartlett2016-06-161-20/+34
| | | | | | | | | | | This allows us to update the stub records as well as the zone itself. Based on a proposed syntax by metze. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Simplify logic and add more verbose debuggingAndrew Bartlett2016-06-161-36/+40
| | | | | | | By reducing the intendation this code is a little clearer Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Allow admin to force a particular IP into samba_dnsupdateAndrew Bartlett2016-06-161-8/+19
| | | | | | | | | | | This should help in deployements beyind NAT. It will also help in testing. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Add a mode that calls samba-tool dns, rather than nsupdateAndrew Bartlett2016-06-161-14/+145
| | | | | | | This mode is more likely to work when we change hostname or IP Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Work around a bug in nsupdateAndreas Schneider2016-06-161-0/+5
| | | | | | | | | The doio_send() function of bind fails on a short write with sendmsg(). See https://bugzilla.redhat.com/show_bug.cgi?id=1250921 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Fix typo in -no-substitutions nameGarming Sam2016-06-161-1/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Simplify logic and add more verbose debuggingAndrew Bartlett2015-12-151-3/+4
| | | | | | | By reducing the intendation this code is a little clearer Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Expand output when --verbose is setAndrew Bartlett2015-12-151-1/+26
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* samba_dnsupdate: Allow the tool to work in 'make test'.Andreas Schneider2014-12-181-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_dnsupdate: Always fill out the nameservers of a dns object.Andreas Schneider2014-12-181-3/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Move dnspython to third_party.Jelmer Vernooij2014-11-121-1/+1
| | | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 12 22:40:53 CET 2014 on sn-devel-104
* samba_dnsupdate: Look for ForestDnsZones in the right placeAndrew Bartlett2014-09-271-1/+3
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Sep 27 22:09:29 CEST 2014 on sn-devel-104
* s4:samba_dnsupdate: provide more substitution variables e.g. IF_RODCStefan Metzmacher2014-08-261-0/+57
| | | | | | | | | This will make the dns_update_list more flexible. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't try to be smart when verifying NS recordsStefan Metzmacher2014-08-261-19/+0
| | | | | | | | | | | We can't rely on the DNS delegation to be correct in the parent domain. What we really want is to check if we already have registered ourself as a NS record in our own domain. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: cache the already registered recordsStefan Metzmacher2014-08-261-16/+101
| | | | | | | | | | | This way we can delete records which are not used anymore. E.g. if the ip address changed. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: fix dnsobj.__str__()Stefan Metzmacher2014-08-261-5/+5
| | | | | | | | | We should not implicitly use the global variable 'd'. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_dnsupdate: don't lower case the registered namesStefan Metzmacher2014-08-261-5/+5
| | | | | | | | | This matches Windows... Bug: https://bugzilla.samba.org/show_bug.cgi?id=9831 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Avoid leaking temp file if an exception is raisedJean Raby2013-04-111-1/+5
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Apr 11 06:06:03 CEST 2013 on sn-devel-104
* Remove incomplete check for IPv6 link-local addresses.Landon Fuller2013-03-021-3/+1
| | | | | | | | | | | | | This has been superceded by a check for link-local addresses in get_interfaces() Signed-Off-By: Landon Fuller <landonf@bikemonkey.org> Reviewed-By: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 08:38:54 CET 2013 on sn-devel-104
* samba_dnsupdate: set KRB5_CONFIG for nsupdate commandBjörn Baumbach2013-01-091-4/+5
| | | | | | | | | Let nslookup use krb5.conf, which is set in our KRB5_CONFIG. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-python: Various formatting fixes.Jelmer Vernooij2012-09-271-5/+10
| | | | | | * Trailing whitespace * use of "==" where "is" should be used * double spaces
* samba_dnsupdate: Safely update/create names for Samba3 targets as wellAndrew Bartlett2012-09-261-4/+14
| | | | | | | | | | This avoids unlocked writes to the dns_hosts_file, and may fix some of our issues on the build farm where large numbers of tests fail due to failed name resolution. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 26 05:48:25 CEST 2012 on sn-devel-104
* samba_dnsupdate: Move to using tmpfile/rename to keep the dns_hosts_file ↵Andrew Bartlett2012-09-261-3/+10
| | | | | | | | consistent This may be the cause of some of the large failure modes on the build farm. Andrew Bartlett
* samba_dnsupdate: Mention contents of invalid line when encountering parsing ↵Jelmer Vernooij2012-03-131-2/+5
| | | | | | error. Bug: https://bugzilla.samba.org/show_bug.cgi?id=8809
* samba_dnsupdate: Raise proper exception when getting unexpected DNS reply.Jelmer Vernooij2012-03-131-2/+1
|
* samba_dnsupdate: Use docstrings, which show up nicely in API docs.Jelmer Vernooij2012-03-131-21/+17
|
* s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDCAndrew Bartlett2011-12-071-5/+11
|
* s4-dns: added --no-credentials option to samba_dnsupdateAndrew Tridgell2011-11-221-3/+10
| | | | | | | | this is for a user who is doing DNS updates via key files rather than GSSAPI. This allows the update to go through without a kerberos error Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Nov 22 06:34:59 CET 2011 on sn-devel-104
* s4-dns: started adding support for auto-creation of NS glue recordAndrew Tridgell2011-09-221-1/+37
| | | | | when we create a new subdomain we need to create a NS glue record in the parent domain pointing at our subdomain
* s4-dns: cope with duplicate entries in dns_update_listAndrew Tridgell2011-08-251-1/+5
| | | | | | this is needed for when DNSFOREST and DNSDOMAIN are the same Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS nameAndrew Tridgell2011-08-251-3/+3
|
* s4-dns: fixed base search on domain NCAndrew Tridgell2011-08-251-1/+1
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-samba_dnsupdate: set environment via the env parameterMatthieu Patou2011-06-221-1/+1
| | | | | I faced a situation where the os.environ("KRB5CCNAME") = ... didn't seems to be effective
* s4-param Remove 'sam database' parameterAndrew Bartlett2011-06-061-1/+1
| | | | | | This now just relies on the private dir parameter, which remains. Andrew Bartlett
* s4-ipv6: don't add link local addresses to DNSAndrew Tridgell2011-06-061-1/+3
| | | | these make no sense as DNS addresses
* s4-ipv6: added IPv6 support to samba_dnsupdateAndrew Tridgell2011-06-061-7/+31
|