[authconfig] add support for myhostname in nsswitch.conf hosts entry (#1151562)

Tomáš Mráz tmraz at fedoraproject.org
Tue Nov 4 09:18:33 UTC 2014


commit b6ce0097eaf1a588484f6044bb495263943bca3d
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Tue Nov 4 10:18:43 2014 +0100

    add support for myhostname in nsswitch.conf hosts entry (#1151562)

 authconfig-6.2.9-myhostname.patch |   46 +++++++++++++++++++++++++++++++++++++
 authconfig.spec                   |    7 +++++-
 2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/authconfig-6.2.9-myhostname.patch b/authconfig-6.2.9-myhostname.patch
new file mode 100644
index 0000000..7f95b03
--- /dev/null
+++ b/authconfig-6.2.9-myhostname.patch
@@ -0,0 +1,46 @@
+diff -r 182f8c072fdc authinfo.py
+--- a/authinfo.py	Mon Sep 29 15:36:09 2014 +0200
++++ b/authinfo.py	Tue Nov 04 10:14:03 2014 +0100
+@@ -1330,6 +1330,7 @@
+ 		self.enableWinbind = None
+ 		self.enableWINS = None
+ 		self.enableMDNS = None
++		self.enableMyhostname = None
+ 		self.preferDNSinHosts = None
+ 		self.enableSSSD = None
+ 		self.enableIPAv2 = None
+@@ -1437,7 +1438,7 @@
+ 		("enableOdbcbind", "b"), ("enableNIS3", "b"), ("enableNIS", "b"),
+ 		("enableLDAPbind", "b"), ("enableLDAP", "b"), ("enableHesiodbind", "b"),
+ 		("enableHesiod", "b"), ("enableDBIbind", "b"), ("enableDBbind", "b"),
+-		("enableCompat", "b"), ("enableWINS", "b"), ("enableMDNS", "b"),
++		("enableCompat", "b"), ("enableWINS", "b"), ("enableMDNS", "b"), ("enableMyhostname", "b"),
+ 		("enableNIS3", "b"), ("enableNIS", "b"), ("enableIPAv2", "b"),
+ 		("enableSSSD", "b"), ("preferDNSinHosts", "b"), ("implicitSSSD", "b")]),
+ 	SaveGroup(self.writePAM, None, [("pwqualityArgs", "c"), ("passwdqcArgs", "c"),
+@@ -2037,6 +2038,8 @@
+ 						self.setParam("enableWINS", True, ref)
+ 					if checkNSS(value, "mdns4_minimal [NOTFOUND=return]"):
+ 						self.setParam("enableMDNS", True, ref)
++					if checkNSS(value, "myhostname"):
++						self.setParam("enableMyhostname", True, ref)
+ 
+ 					nispos = checkNSS(value, "nis")
+ 					if nispos == None:
+@@ -3650,6 +3653,8 @@
+ 				hosts += " nis"
+ 			if not self.preferDNSinHosts:
+ 				hosts += " dns"
++			if self.enableMyhostname:
++				hosts += " myhostname"
+ 
+ 			# Read in the old file.
+ 			for line in f.file:
+@@ -4192,6 +4197,7 @@
+ 		print "nss_sss is %s by default" % formatBool(self.enableSSSD)
+ 		print "nss_wins is %s" % formatBool(self.enableWINS)
+ 		print "nss_mdns4_minimal is %s" % formatBool(self.enableMDNS)
++		print "myhostname is %s" % formatBool(self.enableMyhostname)
+ 		print "DNS preference over NSS or WINS is %s" % formatBool(self.preferDNSinHosts)
+ 		print "pam_unix is always enabled"
+ 		print " shadow passwords are %s" % formatBool(self.enableShadow)
diff --git a/authconfig.spec b/authconfig.spec
index 4a10cbb..a4be9f0 100644
--- a/authconfig.spec
+++ b/authconfig.spec
@@ -1,7 +1,7 @@
 Summary: Command line tool for setting up authentication from network services
 Name: authconfig
 Version: 6.2.9
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 ExclusiveOS: Linux
 Group: System Environment/Base
@@ -9,6 +9,7 @@ URL: https://fedorahosted.org/authconfig
 Source: https://fedorahosted.org/releases/a/u/%{name}/%{name}-%{version}.tar.bz2
 Patch1: authconfig-6.2.6-gdm-nolastlog.patch
 Patch2: authconfig-6.2.9-ldapuri-traceback.patch
+Patch3: authconfig-6.2.9-myhostname.patch
 Requires: newt-python, pam >= 0.99.10.0, python, libpwquality > 0.9
 Conflicts: pam_krb5 < 1.49, samba-common < 3.0, samba-client < 3.0
 Conflicts: nss_ldap < 254, sssd < 0.99.1
@@ -39,6 +40,7 @@ authentication schemes.
 %setup -q -n %{name}-%{version}
 %patch1 -p1 -b .nolastlog
 %patch2 -p1 -b .ldapuri
+%patch3 -p1 -b .myhostname
 
 %build
 %configure
@@ -121,6 +123,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/icons/hicolor/256x256/apps/system-config-authentication.*
 
 %changelog
+* Tue Nov  4 2014 Tomáš Mráz <tmraz at redhat.com> - 6.2.9-4
+- add support for myhostname in nsswitch.conf hosts entry (#1151562)
+
 * Thu Aug 21 2014 Tomáš Mráz <tmraz at redhat.com> - 6.2.9-3
 - fix traceback when backing up LDAP (#1131168)
 


More information about the scm-commits mailing list