ORG by HoLyCoW @ hlxbans

Zapy
Site Admin
Posts: 121
Joined: 01 Apr 2013, 15:52

ORG by HoLyCoW @ hlxbans

Postby Zapy » 25 Apr 2013, 23:03

There's a bug in the current setup script that prevents someone getting passed the Database configuration portion of the install -- even if the values are correct.

Starting with line 64 of ./install/functions.inc it says:
PHP:

Code: Select all

        if(stristr($v,$db_db)) {
            if(stristr($v,"ALL PRIVILEGES")) {
                $privileges = array("SELECT","INSERT","UPDATE","DELETE","CREATE");
                return $privileges;
            }
            if(stristr($v,"SELECT")) $privileges[]="SELECT";
            if(stristr($v,"INSERT")) $privileges[]="INSERT";
            if(stristr($v,"UPDATE")) $privileges[]="UPDATE";
            if(stristr($v,"DELETE")) $privileges[]="DELETE";
            if(stristr($v,"CREATE")) $privileges[]="CREATE";
        }

You have to remove the first "if" statement (I commented it out) to look like this:
The code should be changed as such in order for it to work when root is the only user:
PHP:

Code: Select all

        if(stristr($v,$db_db) || stristr($v,"*.*")) {
            if(stristr($v,"ALL PRIVILEGES")) {
                $privileges = array("SELECT","INSERT","UPDATE","DELETE","CREATE");
                return $privileges;
            }
            if(stristr($v,"SELECT")) $privileges[]="SELECT";
            if(stristr($v,"INSERT")) $privileges[]="INSERT";
            if(stristr($v,"UPDATE")) $privileges[]="UPDATE";
            if(stristr($v,"DELETE")) $privileges[]="DELETE";
            if(stristr($v,"CREATE")) $privileges[]="CREATE";
        }

You are looking for the database name from the output of the SHOW GRANTS query, but if the root user is the only user, then the database name will never show up because SHOW GRANTS shows *.* as the database name.

The MySQL documentation confirms that the results of the SHOW GRANTS query does not display the table name for root:

MySQL 5.5 Documentation
MySQL 5.1 Documenation
MySQL 5.0 Documenation
MySQL 3.23/4.0/4.1 Documentation
Project Leader for Amxbans.net from 2013
Head Community admin for Warzone Short Valley
Swedish Gaming Community since 2000
www.warzone.nu

Zapy
Site Admin
Posts: 121
Joined: 01 Apr 2013, 15:52

Re: ORG by HoLyCoW @ hlxbans

Postby Zapy » 25 Apr 2013, 23:03

This bug is fixed in the 6.0.4 release!
repost to linkback to users with older versions.
Project Leader for Amxbans.net from 2013
Head Community admin for Warzone Short Valley
Swedish Gaming Community since 2000
www.warzone.nu


Return to “Bugs”

Who is online

Users browsing this forum: No registered users and 1 guest