Do not grant all privileges to operators by default

This commit is contained in:
Dmitriy Simushev 2013-04-26 10:47:32 +00:00
parent 2d08fda940
commit 081c4a88a2

View File

@ -93,7 +93,7 @@ $dbtables = array(
"idisabled" => "int DEFAULT 0",
"vcavatar" => "varchar(255)",
"vcjabbername" => "varchar(255)",
"iperm" => "int DEFAULT 65535",
"iperm" => "int DEFAULT 0", /* Do not grant all privileges by default */
"dtmrestore" => "int NOT NULL DEFAULT 0",
"vcrestoretoken" => "varchar(64)",
),
@ -254,6 +254,7 @@ function create_table($id, $link)
if ($id == "${mysqlprefix}chatoperator") {
// Create First Administrator
// Grant all privileges by default only for First Administrator
mysql_query(
"INSERT INTO ${mysqlprefix}chatoperator ( " .
"vclogin, " .
@ -261,14 +262,16 @@ function create_table($id, $link)
"vclocalename, " .
"vccommonname, " .
"vcavatar, " .
"vcemail " .
"vcemail, " .
"iperm " .
") values ( " .
"'admin', " .
"MD5(''), " .
"'', " .
"'Administrator', " .
"'Administrator', " .
"''" .
"'', " .
"65535" .
")",
$link
);