Index: hosting.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.module,v
retrieving revision 1.99
diff -u -u -r1.99 hosting.module
--- hosting.module	17 Apr 2009 16:21:08 -0000	1.99
+++ hosting.module	29 Apr 2009 19:44:27 -0000
@@ -233,6 +233,7 @@
   if ($values['db_server']['db_passwd']) {
     $db_server->db_passwd = $values['db_server']['db_passwd'];
   }
+  $db_server->db_resolve_dns = $values['db_server']['db_resolve_dns'];
   node_save($db_server);
   
   $web_server = node_load($platform->web_server);
Index: hosting.wizard.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.wizard.inc,v
retrieving revision 1.30
diff -u -u -r1.30 hosting.wizard.inc
--- hosting.wizard.inc	15 Apr 2009 18:34:16 -0000	1.30
+++ hosting.wizard.inc	29 Apr 2009 19:44:27 -0000
@@ -374,6 +374,8 @@
   unset($form['db_user']);
   $form['db_details']['db_passwd'] = $form['db_passwd'];
   unset($form['db_passwd']);
+  $form['db_details']['db_resolve_dns'] = $form['db_resolve_dns'];
+  unset($form['db_resolve_dns']);
 
   return hosting_wizard_form('provision/db', $form);
 }
@@ -388,6 +390,7 @@
   if ($values['db_passwd']) {
     $node->db_passwd = $values['db_passwd'];
   }
+  $node->db_resolve_dns = $values['db_resolve_dns'];
   node_save($node); 
 }
 
Index: db_server/hosting_db_server.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/db_server/hosting_db_server.drush.inc,v
retrieving revision 1.1
diff -u -u -r1.1 hosting_db_server.drush.inc
--- db_server/hosting_db_server.drush.inc	7 Apr 2009 00:29:52 -0000	1.1
+++ db_server/hosting_db_server.drush.inc	29 Apr 2009 19:44:27 -0000
@@ -8,6 +8,7 @@
   }
   if ($task->ref->type == 'site') {
     $task->options['db_id'] = $task->ref->db_server;
+    $task->options['db_resolve_dns'] = $task->ref->db_resolve_dns;
   }
 }
 
Index: db_server/hosting_db_server.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/db_server/hosting_db_server.install,v
retrieving revision 1.2
diff -u -u -r1.2 hosting_db_server.install
--- db_server/hosting_db_server.install	15 Oct 2008 06:49:25 -0000	1.2
+++ db_server/hosting_db_server.install	29 Apr 2009 19:44:27 -0000
@@ -11,8 +11,18 @@
         db_type longtext NOT NULL, 
         db_user longtext NOT NULL,
         db_passwd longtext NOT NULL,
+        db_resolve_dns tinyint NOT NULL default '0',
         PRIMARY KEY  (vid)
       ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
       break;
   }
 }
+
+/**
+ * Add the db_resolve_dns column
+ */
+function hosting_db_server_update_1() {
+  $ret = array();
+  $ret[] = update_sql("ALTER TABLE {hosting_db_server} ADD COLUMN db_resolve_dns tinyint NOT NULL default '0'");
+  return $ret;
+}
Index: db_server/hosting_db_server.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/db_server/hosting_db_server.module,v
retrieving revision 1.24
diff -u -u -r1.24 hosting_db_server.module
--- db_server/hosting_db_server.module	7 Apr 2009 00:29:52 -0000	1.24
+++ db_server/hosting_db_server.module	29 Apr 2009 19:44:27 -0000
@@ -151,6 +151,13 @@
     '#weight' => 10
   );
 
+  $form['db_resolve_dns'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Resolve hosts in usernames'),
+    '#description' => t('If this setting is on, webserver hostnames will be resolved to their IP address before being used to create the SQL user. This configuration is required on high end servers that very often disable name-based lookups to improve performance. If your server is started with --skip-name-resolve or --skip-networking, that is your case and you need to enable this setting.'),
+    '#default_value' => $node->db_resolve_dns,
+    '#required' => FALSE,
+  );
   return $form;
 }
 
@@ -168,9 +175,9 @@
  * Implementation of hook_insert().
  */
 function hosting_db_server_insert($node) {
-  db_query("INSERT INTO {hosting_db_server} (vid, nid, db_type, db_user, db_passwd) 
-      VALUES (%d, %d, '%s', '%s', '%s')", 
-        $node->vid, $node->nid, $node->db_type, $node->db_user, $node->db_passwd);
+  db_query("INSERT INTO {hosting_db_server} (vid, nid, db_type, db_user, db_passwd, db_resolve_dns) 
+      VALUES (%d, %d, '%s', '%s', '%s', %d)", 
+           $node->vid, $node->nid, $node->db_type, $node->db_user, $node->db_passwd, $db->db_resolve_dns);
 }
 
 /**
@@ -186,10 +193,10 @@
   }
   else {
     db_query("UPDATE {hosting_db_server} SET 
-                  db_type = '%s', db_user = '%s', db_passwd = '%s'
+                  db_type = '%s', db_user = '%s', db_passwd = '%s', db_resolve_dns = %d
               WHERE 
                   vid = %d", 
-                  $node->db_type, $node->db_user, $node->db_passwd, $node->vid);
+                  $node->db_type, $node->db_user, $node->db_passwd, $node->db_resolve_dns, $node->vid);
   }
 }
 
@@ -208,7 +215,7 @@
  * Implementation of hook_load().
  */
 function hosting_db_server_load($node) {
-  $additions = db_fetch_object(db_query('SELECT db_type, db_user, db_passwd FROM {hosting_db_server} WHERE vid = %d', $node->vid));
+  $additions = db_fetch_object(db_query('SELECT db_type, db_user, db_passwd, db_resolve_dns FROM {hosting_db_server} WHERE vid = %d', $node->vid));
   return $additions;
 }
 
@@ -230,6 +237,12 @@
     '#value' => filter_xss($node->db_user),
   );
 
+  $node->content['db_resolve_dns'] = array(
+    '#type' => 'item',
+    '#title' => t('Resolve hosts in usernames'),
+    '#value' => $node->db_resolve_dns ? t("Yes") : t("No"),
+  );
+
   $node->content['sites_view'] = array(
     '#type' => 'item',
     '#title' => t("Sites"),
