root/alternc/tags/0.9.7/install/upgrades/0.9.3.sql

Revision 660, 2.0 kB (checked in by anarcat, 3 years ago)

[project @ alternc: changeset 2005-05-16 17:32:11 by anarcat]
Ne plus créer les grants avec \_ au lieu de _ car ceci était un
workaround pour un problème de sécu qui est maintenant réglé dans
mysql. Corriger les tables à l'upgrade. Référence:
http://www.debian.org/security/2005/dsa-707

Original author: anarcat
Date: 2005-05-16 17:32:12

Line 
1 -- add support for .it
2 INSERT IGNORE INTO tld VALUES ('it', 1);
3 INSERT IGNORE INTO tld VALUES ('ws', 1);
4
5 -- remove the old "estelle" default mx in older tables
6 ALTER TABLE `domaines` MODIFY `mx` varchar(64) DEFAULT NULL;
7 ALTER TABLE `domaines_standby` MODIFY `mx` varchar(64) DEFAULT NULL;
8
9 -- add the new variable table
10 --
11 -- if comment is null, then the variable is internal and will not show
12 -- up in the generic configuration panel
13 CREATE TABLE IF NOT EXISTS variable (
14   name varchar(48) NOT NULL default '',
15   value longtext NOT NULL,
16   comment mediumtext NULL,
17   PRIMARY KEY  (name),
18   KEY name (name)
19 ) TYPE=MyISAM;
20
21 -- hosting_tld: only used, for now, in bureau/admin/adm_*add.php
22 INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('hosting_tld', 0,
23 'This is a FQDN that designates the main hostname of the service.
24
25 For example, hosting_tld determines in what TLD the "free" user domain
26 is created. If this is set to "example.com", a checkbox will appear in
27 the user creation dialog requesting the creator if he wants to create
28 the domain "username.example.com".
29
30 If this is set to 0 or a "false" string, it will be ignored.');
31
32 -- Adding the sasl field that will receive the cleartext password for SASL smtp auth.
33 ALTER TABLE `mail_users` ADD `sasl` VARCHAR( 255 ) NOT NULL ;
34
35 -- As of Mysql-server 4.0 on sarge, we should grant any right to the debian sys maint :
36 GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint' WITH GRANT OPTION;
37
38 -- USE mysql;
39
40 -- In AlternC 0.9.3, the GRANTS were created with the wrong Db
41 -- pattern: the underscores were not escaped.
42
43 -- this allowed the user to create extra tables not under alternc's
44 -- quota controls since the underscore is a wildcard in MySQL.
45
46 -- the database creation and deletion code has been update, so the
47 -- grants themselves need to be modified otherwise the AlternC
48 -- deletion code will fail and produce evil errors
49 -- UPDATE `db` set `Db` = REPLACE(`Db`,'_','\_') WHERE `Db` REGEXP '[^\\]_';
50
51
52 -- make sure this has an effect at all.
53 -- FLUSH PRIVILEGES;
54
Note: See TracBrowser for help on using the browser.