diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess.configext 2013-06-18 22:42:43.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess 2013-06-18 22:42:56.000000000 -0400 @@ -0,0 +1 @@ +enabled diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess.configext 2013-06-18 22:43:11.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess 2013-06-18 22:43:31.000000000 -0400 @@ -0,0 +1 @@ +disabled diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias.configext 2012-09-06 02:10:40.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias 2013-06-18 22:38:48.000000000 -0400 @@ -1,6 +1,39 @@ # phpmyadmin -Alias /phpmyadmin /usr/share/phpMyAdmin +{ +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); +if (("$adminaccess" eq "enabled") || ("$multiaccess" eq "enabled")) + { + $OUT .= "Alias /phpmyadmin /usr/share/phpMyAdmin\n"; + } + else + { + $OUT .= "# phpMyAdmin Admin access disabled\n"; + } +if ("$multiaccess" eq "enabled") + { + $OUT .= "Alias /phpmyadmin-multi /usr/share/phpMyAdmin\n"; + } + else + { + $OUT .= "# phpMyAdmin Multiuser access disabled\n"; + } +} + +{ +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); + +$OUT .= ' + AuthName "phpmyadmin" + AuthType Basic + AuthExternal pwauth + require user admin + +' if "$adminaccess" eq "enabled"; +} + SSLRequireSSL Options -Indexes @@ -8,7 +41,7 @@ Alias /phpmyadmin /usr/share/phpMyAdmin order deny,allow deny from all { -my $access = ($phpmyadmin{'access'} || 'private'); +my $access = ($phpmyadmin{'access'} || 'private'); if ("$access" eq "private") { $OUT .= " allow from $localAccess $externalSSLAccess"; @@ -18,7 +51,32 @@ if ("$access" eq "private") $OUT .= " allow from all"; } } - AuthName "phpmyadmin" + Satisfy all + AddType application/x-httpd-php .php .php3 + php_flag magic_quotes_gpc on + php_flag track_vars on + php_admin_value open_basedir /usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin:/tmp + + + + + SSLRequireSSL + Options -Indexes + AllowOverride None + order deny,allow + deny from all +{ +my $access = ($phpmyadmin{'access'} || 'private'); +if ("$access" eq "private") + { + $OUT .= " allow from $localAccess $externalSSLAccess"; + } + elsif ("$access" eq "public") + { + $OUT .= " allow from all"; + } +} + AuthName "phpMyadmin Scripts (Admin)" AuthType Basic AuthExternal pwauth require user admin @@ -28,3 +86,8 @@ if ("$access" eq "private") php_flag track_vars on + + order deny,allow + deny from all + + diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias.configext 2007-10-19 15:37:55.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias 2013-06-18 22:40:19.000000000 -0400 @@ -1,8 +1,17 @@ { $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); - if (($port eq "80") && ($haveSSL eq 'yes')) + if (($port eq "80") && ($haveSSL eq 'yes') && ("$adminaccess" eq "enabled" || "$multiaccess" eq "enabled")) { $OUT .= " RewriteRule ^/phpmyadmin(/.*|\$) https://%{HTTP_HOST}/phpmyadmin\$1 [L,R]\n"; } + + + if (($port eq "80") && ($haveSSL eq 'yes') && ( "$multiaccess" eq "enabled")) + { + $OUT .= " RewriteRule ^/phpmyadmin-multi(/.*|\$) https://%{HTTP_HOST}/phpmyadmin-multi\$1 [L,R]\n"; + } } + diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config.configext 2012-09-06 02:10:40.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2013-06-18 22:36:55.000000000 -0400 @@ -15,16 +15,129 @@ $cfg['Servers'][$i]['host'] = 'localhost $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; -$cfg['Servers'][$i]['auth_type'] = 'config'; -$cfg['Servers'][$i]['user'] = 'root'; -$cfg['Servers'][$i]['password'] = '{ -open (PW, "/etc/openldap/ldap.pw") + +# standalone or login mode +$scriptname=end(explode('/',$_SERVER['PHP_SELF'])); +$scriptpath=str_replace($scriptname,'',$_SERVER['PHP_SELF']); + + +# standalone login part +{ +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); + +if (("$adminaccess" eq "enabled")) +#|| ("$multiaccess" eq "enabled")) + { + $OUT .="if (\$scriptpath==\"/phpmyadmin/\" && \$_SERVER['PHP_AUTH_USER']=='admin')\n"; + $OUT .="{\n"; + $OUT .="\$cfg['Servers'][\$i]['auth_type'] = 'config';\n"; + $OUT .="\$cfg['Servers'][\$i]['user'] = 'root';\n"; + open (PW, "/etc/openldap/ldap.pw") || die "Could not read LDAP password.\n"; -my $pw = ; -chomp ($pw); -close PW; -$OUT .= "$pw"; -}'; + my $pw = ; + chomp ($pw); + close PW; + $OUT .="\$cfg['Servers'][\$i]['password'] = '$pw';\n"; + $OUT .="}"; + } +else + { + $OUT .="# standelaone admin configuration disabled"; + } +} +# end of standalone login part + + +# multiuser login part +{ +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); + + $OUT .="\n"; +if (("$multiaccess" eq "enabled") && ("$adminaccess" eq "enabled")) + { + $OUT .="if (\$scriptpath==\"/phpmyadmin-multi/\")\n"; + $OUT .="{\n"; + } +if (("$multiaccess" eq "enabled")) + { + $OUT .="\$cfg['Servers'][\$i]['auth_type'] = 'cookie';\n"; + my $secret = ${'httpd-admin'}{TKTAuthSecret} || "34322500-7330-4400-423A-3A00434F5245"; + $OUT .="\$cfg['blowfish_secret'] = '$secret'\n"; + } +else + { + $OUT .="# multiuser disabled\n"; + } +if (("$multiaccess" eq "enabled") && ("$adminaccess" eq "enabled")) + { + $OUT .="}\n"; + } + +} +# end of multiuser login part + + +$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings + // (this user must have read-only +$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user" + // and "mysql/db" tables). + // The controluser is also + // used for all relational + // features (pmadb) +$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only + // this db is displayed in left frame + // It may also be an array of db-names, where sorting order is relevant. +$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings +$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname + +$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features + // (see scripts/create_tables.sql) + // - leave blank for no support + // DEFAULT: 'phpmyadmin' +$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table + // - leave blank for no bookmark support + // DEFAULT: 'pma_bookmark' +$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc) + // - leave blank for no relation-links support + // DEFAULT: 'pma_relation' +$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields + // - leave blank for no display fields support + // DEFAULT: 'pma_table_info' +$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema + // - leave blank for no PDF schema support + // DEFAULT: 'pma_table_coords' +$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf + // - leave blank if you don't want to use this + // DEFAULT: 'pma_pdf_pages' +$cfg['Servers'][$i]['column_info'] = ''; // table to store column information + // - leave blank for no column comments/mime types + // DEFAULT: 'pma_column_info' +$cfg['Servers'][$i]['history'] = ''; // table to store SQL history + // - leave blank for no SQL query history + // DEFAULT: 'pma_history' +$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables + // are up to date. This prevents compatibility + // checks and thereby increases performance. +$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login +$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use + = ''; +$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults + = array(); +$cfg['Servers'][$i]['AllowNoPassword'] // Allow logins without a password. Do not change the FALSE + = FALSE; // default unless you're running a passwordless MySQL server +$cfg['Servers'][$i]['designer_coords'] // Leave blank (default) for no Designer support, otherwise + = ''; // set to suggested 'pma_designer_coords' if really needed +$cfg['Servers'][$i]['bs_garbage_threshold'] // Blobstreaming: Recommented default value from upstream + = 50; // DEFAULT: '50' +$cfg['Servers'][$i]['bs_repository_threshold'] // Blobstreaming: Recommented default value from upstream + = '32M'; // DEFAULT: '32M' +$cfg['Servers'][$i]['bs_temp_blob_timeout'] // Blobstreaming: Recommented default value from upstream + = 600; // DEFAULT: '600' +$cfg['Servers'][$i]['bs_temp_log_threshold'] // Blobstreaming: Recommented default value from upstream + = '32M'; // DEFAULT: '32M' + + /* End of servers configuration */ -?> diff -up smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory.configext smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory.configext 2013-05-29 23:01:52.000000000 -0400 +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory 2013-05-29 23:02:23.000000000 -0400 @@ -0,0 +1,16 @@ +/* + * Directories for saving/loading files from server + */ +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload'; +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save'; + +/* + * Disable the default warning that is displayed on the DB Details Structure + * page if any of the required Tables for the relation features is not found + */ +$cfg['PmaNoRelation_DisableWarning'] = TRUE; + + + +?> +