NetworkManager r3942 - trunk/system-settings/src



Author: dcbw
Date: Tue Aug 12 20:21:03 2008
New Revision: 3942
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3942&view=rev

Log:
Require only one . in hostname

Modified:
   trunk/system-settings/src/dbus-settings.c

Modified: trunk/system-settings/src/dbus-settings.c
==============================================================================
--- trunk/system-settings/src/dbus-settings.c	(original)
+++ trunk/system-settings/src/dbus-settings.c	Tue Aug 12 20:21:03 2008
@@ -649,7 +649,7 @@
 	guint32 count = 0;
 
 	/* do some minimal hostname validation:
-	 * 1) must have at least two '.'
+	 * 1) must have at least one '.'
 	 * 2) must not start with '.'
 	 * 3) must not have two '.' in succession
 	 */
@@ -663,7 +663,7 @@
 		}
 	} while (*p++);
 
-	if (count < 2 || malformed || (*hostname == '.')) {
+	if (count < 1 || malformed || (*hostname == '.')) {
 		error = g_error_new (NM_SYSCONFIG_SETTINGS_ERROR,
 		                     NM_SYSCONFIG_SETTINGS_ERROR_INVALID_HOSTNAME,
 		                     "%s",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]