Index: Auth/Auth/cyrsql.php
===================================================================
RCS file: /repository/framework/Auth/Auth/cyrsql.php,v
retrieving revision 1.46
diff -u -r1.46 cyrsql.php
--- Auth/Auth/cyrsql.php	3 Jul 2005 04:04:15 -0000	1.46
+++ Auth/Auth/cyrsql.php	15 Jul 2005 14:50:41 -0000
@@ -172,6 +172,9 @@
         $admin_params = array('admin_user' => $params['cyradmin'],
                               'admin_password' => $params['cyrpass'],
                               'dsn' => $params['imap_dsn']);
+        if (!empty($this->_params['unixhier'])) {
+            $admin_params['userhierarchy'] = 'user/';
+        }
         $this->_admin = &new IMAP_Admin($admin_params);
     }
 
Index: IMAP/IMAP/Admin.php
===================================================================
RCS file: /repository/framework/IMAP/IMAP/Admin.php,v
retrieving revision 1.9
diff -u -r1.9 Admin.php
--- IMAP/IMAP/Admin.php	23 Jun 2005 19:37:01 -0000	1.9
+++ IMAP/IMAP/Admin.php	15 Jul 2005 14:50:41 -0000
@@ -78,6 +78,10 @@
             }
         } else {
             $this->_ref = substr($this->_params['dsn'], 0, strpos($this->_params['dsn'], '}') + 1);
+            $this->_params['hostspec'] = substr($this->_params['dsn'], 1, strpos($this->_params['dsn'], ':') - 1);
+            $this->_params['port'] = substr($this->_params['dsn'], strlen($this->_params['hostspec']) + 2, strpos($this->_params['dsn'], '/') - strlen($this->_params['hostspec']) - 2);
+            $dumb = substr($this->_params['dsn'], strpos($this->_params['dsn'], '/') + 1);
+            $this->_params['protocol'] = substr($dumb, 0, -1);
         }
     }
 
