[dev] cyrsql driver patch

Vilius Šumskas vilius at lnk.lt
Wed Apr 14 08:16:40 PDT 2004


Cituojama "Jason M. Felice" <jfelice at cronosys.com>:

> Quoting Vilius ?umskas <vilius at lnk.lt>:
>
>> Hi,
>>
>> i sent this patch a month ago, but it seems it wasn't submited. It 
>> fixes mail
>> home directory creation in newest cyrus version. Also addresses some other
>> compatibility issues with cyrus 2.2.3
>
> Committed, thanks!
>
> I don't know enough to do it yet, but if you'd like to fix the comments in
> cyrsql.php regarding the required table structure (it looks like it was just
> copied from the sql driver), that would be nice.

here we go.

--
    Vilius

-------------- next part --------------
Index: cyrsql.php
===================================================================
RCS file: /repository/framework/Auth/Auth/cyrsql.php,v
retrieving revision 1.28
diff -u -r1.28 cyrsql.php
--- cyrsql.php	14 Apr 2004 13:23:25 -0000	1.28
+++ cyrsql.php	14 Apr 2004 15:07:24 -0000
@@ -25,7 +25,7 @@
  * ====================
  *   'domain_field'    --  If set to anything other than 'none' this is used as
  *                         field name where domain is stored.
- *                         DEFAULT: NONE
+ *                         DEFAULT: 'domain_name'
  *   'encryption'      --  The encryption to use to store the password in the
  *                         table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
  *                         sha, ssha).
@@ -33,15 +33,15 @@
  *   'folders'         --  An array of folders to create under username.
  *                         DEFAULT: NONE
  *   'password_field'  --  The name of the password field in the auth table.
- *                         DEFAULT: 'user_pass'
+ *                         DEFAULT: 'password'
  *   'quota'           --  The quota (in kilobytes) to grant on the mailbox.
  *                         DEFAULT: NONE
  *   'table'           --  The name of the auth table in 'database'.
- *                         DEFAULT: 'horde_users'
+ *                         DEFAULT: 'accountuser'
  *   'unixhier'        --  The value of imapd.conf's unixhierarchysep setting.
  *                         Set this to true if the value is true in imapd.conf.
  *   'username_field'  --  The name of the username field in the auth table.
- *                         DEFAULT: 'user_uid'
+ *                         DEFAULT: 'username'
  *
  * Required by some database implementations:
  * ==========================================
@@ -52,12 +52,75 @@
  *
  * The table structure for the auth system is as follows:
  *
- * CREATE TABLE horde_users (
- *     user_uid   VARCHAR(255) NOT NULL,
- *     user_pass  VARCHAR(255) NOT NULL,
- *     PRIMARY KEY (user_uid)
+ * CREATE TABLE accountuser (
+ *     username    VARCHAR(255) BINARY NOT NULL DEFAULT '',
+ *     password    VARCHAR(32) BINARY NOT NULL DEFAULT '',
+ *     prefix      VARCHAR(50) NOT NULL DEFAULT '',
+ *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
+ *     UNIQUE KEY username (username)
+ * );
+ *
+ * CREATE TABLE adminuser (
+ *     username    VARCHAR(50) BINARY NOT NULL DEFAULT '',
+ *     password    VARCHAR(50) BINARY NOT NULL DEFAULT '',
+ *     type        INT(11) NOT NULL DEFAULT '0',
+ *     SID         VARCHAR(255) NOT NULL DEFAULT '',
+ *     home        VARCHAR(255) NOT NULL DEFAULT '',
+ *     PRIMARY KEY (username)
+ * );
+ *
+ * CREATE TABLE alias (
+ *     alias       VARCHAR(255) NOT NULL DEFAULT '',
+ *     dest        LONGTEXT,
+ *     username    VARCHAR(50) NOT NULL DEFAULT '',
+ *     status      INT(11) NOT NULL DEFAULT '1',
+ *     PRIMARY KEY (alias)
+ * );
+ *
+ * CREATE TABLE domain (
+ *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
+ *     prefix      VARCHAR(50) NOT NULL DEFAULT '',
+ *     maxaccounts INT(11) NOT NULL DEFAULT '20',
+ *     quota       INT(10) NOT NULL DEFAULT '20000',
+ *     transport   VARCHAR(255) NOT NULL DEFAULT 'cyrus',
+ *     freenames   ENUM('YES','NO') NOT NULL DEFAULT 'NO',
+ *     freeaddress ENUM('YES','NO') NOT NULL DEFAULT 'NO',
+ *     PRIMARY KEY (domain_name),
+ *     UNIQUE KEY prefix (prefix)
  * );
  *
+ * CREATE TABLE domainadmin (
+ *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
+ *     adminuser   VARCHAR(255) NOT NULL DEFAULT ''
+ * );
+ *
+ * CREATE TABLE search (
+ *     search_id   VARCHAR(255) NOT NULL DEFAULT '',
+ *     search_sql  TEXT NOT NULL,
+ *     perpage     INT(11) NOT NULL DEFAULT '0',
+ *     timestamp   TIMESTAMP(14) NOT NULL,
+ *     PRIMARY KEY (search_id),
+ *     KEY search_id (search_id)
+ * );
+ *
+ * CREATE TABLE virtual (
+ *     alias       VARCHAR(255) NOT NULL DEFAULT '',
+ *     dest        LONGTEXT,
+ *     username    VARCHAR(50) NOT NULL DEFAULT '',
+ *     status      INT(11) NOT NULL DEFAULT '1',
+ *     KEY alias (alias)
+ * );
+ *
+ * CREATE TABLE log (
+ *     id          INT(11) NOT NULL AUTO_INCREMENT,
+ *     msg         TEXT NOT NULL,
+ *     user        VARCHAR(255) NOT NULL DEFAULT '',
+ *     host        VARCHAR(255) NOT NULL DEFAULT '',
+ *     time        DATETIME NOT NULL DEFAULT '2000-00-00 00:00:00',
+ *     pid         VARCHAR(255) NOT NULL DEFAULT '',
+ *     PRIMARY KEY (id)
+ * );
+ *	       	   	     
  *
  * $Horde: framework/Auth/Auth/cyrsql.php,v 1.28 2004/04/14 13:23:25 eraserhd Exp $
  *


More information about the dev mailing list