Blame SOURCES/authconfig-6.2.8-nss-myhostname.patch

5a47a8
diff -up authconfig-6.2.8/authinfo.py.myhostname authconfig-6.2.8/authinfo.py
5a47a8
--- authconfig-6.2.8/authinfo.py.myhostname	2016-06-16 14:41:10.561950544 +0200
5a47a8
+++ authconfig-6.2.8/authinfo.py	2016-06-16 14:41:17.425104198 +0200
5a47a8
@@ -1336,6 +1336,7 @@ class AuthInfo:
5a47a8
 		self.enableWinbind = None
5a47a8
 		self.enableWINS = None
5a47a8
 		self.enableMDNS = None
5a47a8
+		self.enableMyhostname = None
5a47a8
 		self.preferDNSinHosts = None
5a47a8
 		self.enableSSSD = None
5a47a8
 		self.enableIPAv2 = None
5a47a8
@@ -1442,7 +1443,7 @@ class AuthInfo:
5a47a8
 		("enableOdbcbind", "b"), ("enableNIS3", "b"), ("enableNIS", "b"),
5a47a8
 		("enableLDAPbind", "b"), ("enableLDAP", "b"), ("enableHesiodbind", "b"),
5a47a8
 		("enableHesiod", "b"), ("enableDBIbind", "b"), ("enableDBbind", "b"),
5a47a8
-		("enableCompat", "b"), ("enableWINS", "b"), ("enableMDNS", "b"),
5a47a8
+		("enableCompat", "b"), ("enableWINS", "b"), ("enableMDNS", "b"), ("enableMyhostname", "b"),
5a47a8
 		("enableNIS3", "b"), ("enableNIS", "b"), ("enableIPAv2", "b"),
5a47a8
 		("enableSSSD", "b"), ("preferDNSinHosts", "b"), ("implicitSSSD", "b")]),
5a47a8
 	SaveGroup(self.writePAM, None, [("pwqualityArgs", "c"), ("passwdqcArgs", "c"),
5a47a8
@@ -2048,6 +2049,8 @@ class AuthInfo:
5a47a8
 						self.setParam("enableWINS", True, ref)
5a47a8
 					if checkNSS(value, "mdns4_minimal [NOTFOUND=return]"):
5a47a8
 						self.setParam("enableMDNS", True, ref)
5a47a8
+					if checkNSS(value, "myhostname"):
5a47a8
+						self.setParam("enableMyhostname", True, ref)
5a47a8
 
5a47a8
 					nispos = checkNSS(value, "nis")
5a47a8
 					if nispos == None:
5a47a8
@@ -3671,6 +3674,8 @@ class AuthInfo:
5a47a8
 				hosts += " nis"
5a47a8
 			if not self.preferDNSinHosts:
5a47a8
 				hosts += " dns"
5a47a8
+			if self.enableMyhostname:
5a47a8
+				hosts += " myhostname"
5a47a8
 
5a47a8
 			# Read in the old file.
5a47a8
 			for line in f.file:
5a47a8
@@ -4221,6 +4226,7 @@ class AuthInfo:
5a47a8
 		print "nss_sss is %s by default" % formatBool(self.enableSSSD)
5a47a8
 		print "nss_wins is %s" % formatBool(self.enableWINS)
5a47a8
 		print "nss_mdns4_minimal is %s" % formatBool(self.enableMDNS)
5a47a8
+		print "myhostname is %s" % formatBool(self.enableMyhostname)
5a47a8
 		print "DNS preference over NSS or WINS is %s" % formatBool(self.preferDNSinHosts)
5a47a8
 		print "pam_unix is always enabled"
5a47a8
 		print " shadow passwords are %s" % formatBool(self.enableShadow)