The Samba-Bugzilla – Attachment 8644 Details for
Bug 9721
samba_upgradedns patch for robustness (do not guess addresses when just changing roles)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches cherry-picked from master
0001-scripting-samba_upgradedns-Only-look-for-IPv4-IPv6-a.patch (text/plain), 2.71 KB, created by
Andrew Bartlett
on 2013-03-14 08:51:37 UTC
(
hide
)
Description:
patches cherry-picked from master
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2013-03-14 08:51:37 UTC
Size:
2.71 KB
patch
obsolete
>From c0d3c12a4009b757dfe01e870b94b0a33247544e Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Fri, 28 Dec 2012 10:05:40 +1100 >Subject: [PATCH] scripting/samba_upgradedns: Only look for IPv4/IPv6 > addresses if we actually them > >This allows the script to be used to create/remove the samba-specific dns-SERVER account >when we do not need to create the in-directory partition. > >Andrew Bartlett > >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Thu Jan 10 20:56:50 CET 2013 on sn-devel-104 >(cherry picked from commit edbc26bca84ee77b5a9571ba8dc9416c0db25906) >--- > source4/scripting/bin/samba_upgradedns | 43 +++++++++++++++++----------------- > 1 file changed, 22 insertions(+), 21 deletions(-) > >diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns >index ba597cf..f389ef7 100755 >--- a/source4/scripting/bin/samba_upgradedns >+++ b/source4/scripting/bin/samba_upgradedns >@@ -278,27 +278,6 @@ if __name__ == '__main__': > logger.error("Cannot create AD based DNS for OS level < 2003") > sys.exit(1) > >- logger.info("Looking up IPv4 addresses") >- hostip = interface_ips_v4(lp) >- try: >- hostip.remove('127.0.0.1') >- except ValueError: >- pass >- if not hostip: >- logger.error("No IPv4 addresses found") >- sys.exit(1) >- else: >- hostip = hostip[0] >- logger.debug("IPv4 addresses: %s" % hostip) >- >- logger.info("Looking up IPv6 addresses") >- hostip6 = interface_ips_v6(lp, linklocal=False) >- if not hostip6: >- hostip6 = None >- else: >- hostip6 = hostip6[0] >- logger.debug("IPv6 addresses: %s" % hostip6) >- > domaindn = names.domaindn > forestdn = names.rootdn > >@@ -351,6 +330,28 @@ if __name__ == '__main__': > ncname = msg[0]['nCName'][0] > except Exception, e: > logger.info("Creating DNS partitions") >+ >+ logger.info("Looking up IPv4 addresses") >+ hostip = interface_ips_v4(lp) >+ try: >+ hostip.remove('127.0.0.1') >+ except ValueError: >+ pass >+ if not hostip: >+ logger.error("No IPv4 addresses found") >+ sys.exit(1) >+ else: >+ hostip = hostip[0] >+ logger.debug("IPv4 addresses: %s" % hostip) >+ >+ logger.info("Looking up IPv6 addresses") >+ hostip6 = interface_ips_v6(lp, linklocal=False) >+ if not hostip6: >+ hostip6 = None >+ else: >+ hostip6 = hostip6[0] >+ logger.debug("IPv6 addresses: %s" % hostip6) >+ > create_dns_partitions(ldbs.sam, domainsid, names, domaindn, forestdn, > dnsadmins_sid) > >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 9721
: 8644