/[smecontribs]/rpms/smeserver-phpmyadmin/contribs8/smeserver-phpmyadmin-3.5.2.2-configext.patch
ViewVC logotype

Annotation of /rpms/smeserver-phpmyadmin/contribs8/smeserver-phpmyadmin-3.5.2.2-configext.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Jun 19 02:54:10 2013 UTC (11 years, 5 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-phpmyadmin-3_5_2_2-6_el5_sme, smeserver-phpmyadmin-3_5_2_2-3_el5_sme, smeserver-phpmyadmin-3_5_2_2-5_el5_sme, smeserver-phpmyadmin-3_5_2_2-4_el5_sme, HEAD
* Tue Jun 18 2013 JP Pialasse <tests@pialasse.com> 3.5.2.2-3
- added full 3.5 configuration to avoid errors [SME: 7153] [SME: 7194]
- incorporated multiuser contrib in this package [SME: 7628 7627 ]
- increased security [SME: 5007]
- configext.patch

1 unnilennium 1.1 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
2     --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess.configext 2013-06-18 22:42:43.000000000 -0400
3     +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/adminaccess 2013-06-18 22:42:56.000000000 -0400
4     @@ -0,0 +1 @@
5     +enabled
6     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
7     --- smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess.configext 2013-06-18 22:43:11.000000000 -0400
8     +++ smeserver-phpmyadmin-3.5.2.2/root/etc/e-smith/db/configuration/defaults/phpmyadmin/multiaccess 2013-06-18 22:43:31.000000000 -0400
9     @@ -0,0 +1 @@
10     +disabled
11     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
12     --- 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
13     +++ 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
14     @@ -1,6 +1,39 @@
15    
16     # phpmyadmin
17     -Alias /phpmyadmin /usr/share/phpMyAdmin
18     +{
19     +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
20     +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
21     +if (("$adminaccess" eq "enabled") || ("$multiaccess" eq "enabled"))
22     + {
23     + $OUT .= "Alias /phpmyadmin /usr/share/phpMyAdmin\n";
24     + }
25     + else
26     + {
27     + $OUT .= "# phpMyAdmin Admin access disabled\n";
28     + }
29     +if ("$multiaccess" eq "enabled")
30     + {
31     + $OUT .= "Alias /phpmyadmin-multi /usr/share/phpMyAdmin\n";
32     + }
33     + else
34     + {
35     + $OUT .= "# phpMyAdmin Multiuser access disabled\n";
36     + }
37     +}
38     +
39     +{
40     +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
41     +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
42     +
43     +$OUT .= '<Location /phpmyadmin>
44     + AuthName "phpmyadmin"
45     + AuthType Basic
46     + AuthExternal pwauth
47     + require user admin
48     +</Location>
49     +' if "$adminaccess" eq "enabled";
50     +}
51     +
52     <Directory /usr/share/phpMyAdmin>
53     SSLRequireSSL
54     Options -Indexes
55     @@ -8,7 +41,7 @@ Alias /phpmyadmin /usr/share/phpMyAdmin
56     order deny,allow
57     deny from all
58     {
59     -my $access = ($phpmyadmin{'access'} || 'private');
60     +my $access = ($phpmyadmin{'access'} || 'private');
61     if ("$access" eq "private")
62     {
63     $OUT .= " allow from $localAccess $externalSSLAccess";
64     @@ -18,7 +51,32 @@ if ("$access" eq "private")
65     $OUT .= " allow from all";
66     }
67     }
68     - AuthName "phpmyadmin"
69     + Satisfy all
70     + AddType application/x-httpd-php .php .php3
71     + php_flag magic_quotes_gpc on
72     + php_flag track_vars on
73     + php_admin_value open_basedir /usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin:/tmp
74     +</Directory>
75     +
76     +
77     +<Directory /usr/share/phpMyAdmin/scripts>
78     + SSLRequireSSL
79     + Options -Indexes
80     + AllowOverride None
81     + order deny,allow
82     + deny from all
83     +{
84     +my $access = ($phpmyadmin{'access'} || 'private');
85     +if ("$access" eq "private")
86     + {
87     + $OUT .= " allow from $localAccess $externalSSLAccess";
88     + }
89     + elsif ("$access" eq "public")
90     + {
91     + $OUT .= " allow from all";
92     + }
93     +}
94     + AuthName "phpMyadmin Scripts (Admin)"
95     AuthType Basic
96     AuthExternal pwauth
97     require user admin
98     @@ -28,3 +86,8 @@ if ("$access" eq "private")
99     php_flag track_vars on
100     </Directory>
101    
102     +<Directory /usr/share/phpMyAdmin/libraries >
103     + order deny,allow
104     + deny from all
105     +</Directory>
106     +
107     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
108     --- 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
109     +++ 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
110     @@ -1,8 +1,17 @@
111     {
112     $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
113     +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
114     +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
115    
116     - if (($port eq "80") && ($haveSSL eq 'yes'))
117     + if (($port eq "80") && ($haveSSL eq 'yes') && ("$adminaccess" eq "enabled" || "$multiaccess" eq "enabled"))
118     {
119     $OUT .= " RewriteRule ^/phpmyadmin(/.*|\$) https://%{HTTP_HOST}/phpmyadmin\$1 [L,R]\n";
120     }
121     +
122     +
123     + if (($port eq "80") && ($haveSSL eq 'yes') && ( "$multiaccess" eq "enabled"))
124     + {
125     + $OUT .= " RewriteRule ^/phpmyadmin-multi(/.*|\$) https://%{HTTP_HOST}/phpmyadmin-multi\$1 [L,R]\n";
126     + }
127     }
128     +
129     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
130     --- 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
131     +++ 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
132     @@ -15,16 +15,129 @@ $cfg['Servers'][$i]['host'] = 'localhost
133     $cfg['Servers'][$i]['extension'] = 'mysql';
134     $cfg['Servers'][$i]['connect_type'] = 'tcp';
135     $cfg['Servers'][$i]['compress'] = false;
136     -$cfg['Servers'][$i]['auth_type'] = 'config';
137     -$cfg['Servers'][$i]['user'] = 'root';
138     -$cfg['Servers'][$i]['password'] = '{
139     -open (PW, "/etc/openldap/ldap.pw")
140     +
141     +# standalone or login mode
142     +$scriptname=end(explode('/',$_SERVER['PHP_SELF']));
143     +$scriptpath=str_replace($scriptname,'',$_SERVER['PHP_SELF']);
144     +
145     +
146     +# standalone login part
147     +{
148     +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
149     +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
150     +
151     +if (("$adminaccess" eq "enabled"))
152     +#|| ("$multiaccess" eq "enabled"))
153     + {
154     + $OUT .="if (\$scriptpath==\"/phpmyadmin/\" && \$_SERVER['PHP_AUTH_USER']=='admin')\n";
155     + $OUT .="{\n";
156     + $OUT .="\$cfg['Servers'][\$i]['auth_type'] = 'config';\n";
157     + $OUT .="\$cfg['Servers'][\$i]['user'] = 'root';\n";
158     + open (PW, "/etc/openldap/ldap.pw")
159     || die "Could not read LDAP password.\n";
160     -my $pw = <PW>;
161     -chomp ($pw);
162     -close PW;
163     -$OUT .= "$pw";
164     -}';
165     + my $pw = <PW>;
166     + chomp ($pw);
167     + close PW;
168     + $OUT .="\$cfg['Servers'][\$i]['password'] = '$pw';\n";
169     + $OUT .="}";
170     + }
171     +else
172     + {
173     + $OUT .="# standelaone admin configuration disabled";
174     + }
175     +}
176     +# end of standalone login part
177     +
178     +
179     +# multiuser login part
180     +{
181     +my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
182     +my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
183     +
184     + $OUT .="\n";
185     +if (("$multiaccess" eq "enabled") && ("$adminaccess" eq "enabled"))
186     + {
187     + $OUT .="if (\$scriptpath==\"/phpmyadmin-multi/\")\n";
188     + $OUT .="{\n";
189     + }
190     +if (("$multiaccess" eq "enabled"))
191     + {
192     + $OUT .="\$cfg['Servers'][\$i]['auth_type'] = 'cookie';\n";
193     + my $secret = ${'httpd-admin'}{TKTAuthSecret} || "34322500-7330-4400-423A-3A00434F5245";
194     + $OUT .="\$cfg['blowfish_secret'] = '$secret'\n";
195     + }
196     +else
197     + {
198     + $OUT .="# multiuser disabled\n";
199     + }
200     +if (("$multiaccess" eq "enabled") && ("$adminaccess" eq "enabled"))
201     + {
202     + $OUT .="}\n";
203     + }
204     +
205     +}
206     +# end of multiuser login part
207     +
208     +
209     +$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
210     + // (this user must have read-only
211     +$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
212     + // and "mysql/db" tables).
213     + // The controluser is also
214     + // used for all relational
215     + // features (pmadb)
216     +$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
217     + // this db is displayed in left frame
218     + // It may also be an array of db-names, where sorting order is relevant.
219     +$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings
220     +$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
221     +
222     +$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
223     + // (see scripts/create_tables.sql)
224     + // - leave blank for no support
225     + // DEFAULT: 'phpmyadmin'
226     +$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
227     + // - leave blank for no bookmark support
228     + // DEFAULT: 'pma_bookmark'
229     +$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
230     + // - leave blank for no relation-links support
231     + // DEFAULT: 'pma_relation'
232     +$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
233     + // - leave blank for no display fields support
234     + // DEFAULT: 'pma_table_info'
235     +$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
236     + // - leave blank for no PDF schema support
237     + // DEFAULT: 'pma_table_coords'
238     +$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
239     + // - leave blank if you don't want to use this
240     + // DEFAULT: 'pma_pdf_pages'
241     +$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
242     + // - leave blank for no column comments/mime types
243     + // DEFAULT: 'pma_column_info'
244     +$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
245     + // - leave blank for no SQL query history
246     + // DEFAULT: 'pma_history'
247     +$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
248     + // are up to date. This prevents compatibility
249     + // checks and thereby increases performance.
250     +$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login
251     +$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
252     + = '';
253     +$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
254     + = array();
255     +$cfg['Servers'][$i]['AllowNoPassword'] // Allow logins without a password. Do not change the FALSE
256     + = FALSE; // default unless you're running a passwordless MySQL server
257     +$cfg['Servers'][$i]['designer_coords'] // Leave blank (default) for no Designer support, otherwise
258     + = ''; // set to suggested 'pma_designer_coords' if really needed
259     +$cfg['Servers'][$i]['bs_garbage_threshold'] // Blobstreaming: Recommented default value from upstream
260     + = 50; // DEFAULT: '50'
261     +$cfg['Servers'][$i]['bs_repository_threshold'] // Blobstreaming: Recommented default value from upstream
262     + = '32M'; // DEFAULT: '32M'
263     +$cfg['Servers'][$i]['bs_temp_blob_timeout'] // Blobstreaming: Recommented default value from upstream
264     + = 600; // DEFAULT: '600'
265     +$cfg['Servers'][$i]['bs_temp_log_threshold'] // Blobstreaming: Recommented default value from upstream
266     + = '32M'; // DEFAULT: '32M'
267     +
268     +
269     /* End of servers configuration */
270    
271     -?>
272     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
273     --- 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
274     +++ 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
275     @@ -0,0 +1,16 @@
276     +/*
277     + * Directories for saving/loading files from server
278     + */
279     +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
280     +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
281     +
282     +/*
283     + * Disable the default warning that is displayed on the DB Details Structure
284     + * page if any of the required Tables for the relation features is not found
285     + */
286     +$cfg['PmaNoRelation_DisableWarning'] = TRUE;
287     +
288     +
289     +
290     +?>
291     +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed