Blob Blame History Raw
diff -up authconfig-6.2.8/authinfo.py.myhostname authconfig-6.2.8/authinfo.py
--- authconfig-6.2.8/authinfo.py.myhostname	2016-06-16 14:41:10.561950544 +0200
+++ authconfig-6.2.8/authinfo.py	2016-06-16 14:41:17.425104198 +0200
@@ -1336,6 +1336,7 @@ class AuthInfo:
 		self.enableWinbind = None
 		self.enableWINS = None
 		self.enableMDNS = None
+		self.enableMyhostname = None
 		self.preferDNSinHosts = None
 		self.enableSSSD = None
 		self.enableIPAv2 = None
@@ -1442,7 +1443,7 @@ class AuthInfo:
 		("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"),
@@ -2048,6 +2049,8 @@ class AuthInfo:
 						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:
@@ -3671,6 +3674,8 @@ class AuthInfo:
 				hosts += " nis"
 			if not self.preferDNSinHosts:
 				hosts += " dns"
+			if self.enableMyhostname:
+				hosts += " myhostname"
 
 			# Read in the old file.
 			for line in f.file:
@@ -4221,6 +4226,7 @@ class AuthInfo:
 		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)