/[smecontribs]/rpms/smeserver-phpldapadmin/contribs10/smeserver-phpldapadmin-1.5.0-bz11611.patch
ViewVC logotype

Annotation of /rpms/smeserver-phpldapadmin/contribs10/smeserver-phpldapadmin-1.5.0-bz11611.patch

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


Revision 1.6 - (hide annotations) (download)
Tue Jun 1 17:29:33 2021 UTC (3 years, 5 months ago) by jpp
Branch: MAIN
Changes since 1.5: +4 -4 lines
* Tue Jun 01 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-3.sme
- Initial release to contribs10 [SME: 11611]

1 jpp 1.1 diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/createlinks smeserver-phpldapadmin-1.5.0/createlinks
2     --- smeserver-phpldapadmin-1.5.0.old/createlinks 2014-06-21 12:53:47.000000000 -0400
3     +++ smeserver-phpldapadmin-1.5.0/createlinks 2021-06-01 12:51:13.224000000 -0400
4     @@ -14,3 +14,14 @@
5     templates2events("/etc/phpldapadmin/config.php", $event)
6     }
7     safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/phpldapadmin/config.php/template-begin");
8     +
9     +for my $event (qw(
10     + smeserver-phpldapadmin-update
11     + ))
12     + {
13     + templates2events("/etc/httpd/conf/httpd.conf", $event);
14     + templates2events("/etc/phpldapadmin/config.php", $event);
15 jpp 1.6 + templates2events("/etc/opt/remi/php____PHPVERSION____/php-fpm.d/www.conf", $event);
16 jpp 1.1 + safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
17 jpp 1.6 + safe_symlink("reload-or-restart", "root/etc/e-smith/events/$event/services2adjust/php____PHPVERSION____-php-fpm");
18 jpp 1.1 + }
19 jpp 1.4 diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/db/configuration/defaults/phpldapadmin/status smeserver-phpldapadmin-1.5.0/root/etc/e-smith/db/configuration/defaults/phpldapadmin/status
20     --- smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/db/configuration/defaults/phpldapadmin/status 1969-12-31 19:00:00.000000000 -0500
21     +++ smeserver-phpldapadmin-1.5.0/root/etc/e-smith/db/configuration/defaults/phpldapadmin/status 2021-06-01 13:08:02.020000000 -0400
22     @@ -0,0 +1 @@
23     +enabled
24 jpp 1.1 diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin
25     --- smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin 2014-06-21 12:53:47.000000000 -0400
26 jpp 1.3 +++ smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin 2021-06-01 13:04:03.628000000 -0400
27 jpp 1.2 @@ -21,8 +21,10 @@
28 jpp 1.1 AuthExternal pwauth
29     require user admin
30     Satisfy all
31     - AddType application/x-httpd-php .php .php3
32     - php_flag magic_quotes_gpc on
33     - php_flag track_vars on
34 jpp 1.3 + <FilesMatch \.php$>
35 jpp 1.6 + SetHandler "proxy:unix:/var/run/php-fpm/php____PHPVERSION____-phpldapadmin.sock|fcgi://localhost"
36 jpp 1.2 + </FilesMatch>
37     + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1
38 jpp 1.1 +
39     </Directory>
40    
41     diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin
42     --- smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin 1969-12-31 19:00:00.000000000 -0500
43 jpp 1.5 +++ smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin 2021-06-01 13:10:34.241000000 -0400
44 jpp 1.1 @@ -0,0 +1,73 @@
45     +{
46     +
47 jpp 1.6 +if ($PHP_VERSION eq '____PHPVERSION____'){
48 jpp 1.1 + if (($phpldapadmin{'status'} || 'disabled') eq 'enabled'){
49     + my $max_upload_size = ($phpldapadmin{MaxUploadSize} || '100M');# 104857600 bytes
50     + $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/);
51     + my $memory_limit = ($phpldapadmin{MemoryLimit} || '512M');
52     + $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/);
53     + my $open_basedir= $phpldapadmin{PHPBaseDir} || '';
54 jpp 1.5 + $open_basedir = "/etc/phpldapadmin/:/usr/share/phpldapadmin/:/var/lib/php/phpldapadmin:".
55 jpp 1.1 +"/var/lib/phpldapadmin/temp:/var/lib/phpldapadmin/save/:/var/lib/phpldapadmin/upload:/var/lib/phpldapadmin/cache/:".
56     +"/usr/share/php/:".
57     +"/var/log/php/phpldapadmin::/dev/urandom:$open_basedir";
58     + my $max_children = $phpldapadmin{'PHPmaxChildren'} || 20;
59     + my $min_spare_servers = $phpldapadmin{'PHPminServers'} || 4;
60     + my $start_servers = $phpldapadmin{'PHPstartServers'} || 6;
61     + my $max_spare_servers = $phpldapadmin{'PHPmaxServers'} || 8;
62     + my $max_requests = $phpldapadmin{'PHPmaxRequests'} || 1000;
63     + $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers;
64     + $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers;
65 jpp 1.5 + my $id = 'phpldapadmin'; # Note the package is phpldapadmin
66 jpp 1.1 + $OUT .=<<"_EOF";
67     +
68     +[php$PHP_VERSION-$id]
69     +user = www
70     +group = www
71     +listen.owner = root
72     +listen.group = www
73     +listen.mode = 0660
74     +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
75     +pm = dynamic
76     +pm.max_children = $max_children
77     +pm.start_servers = $start_servers
78     +pm.min_spare_servers = $min_spare_servers
79     +pm.max_spare_servers = $max_spare_servers
80     +pm.max_requests = $max_requests
81     +; Used in nextcloud
82     +php_admin_value[session.save_path] = /var/lib/php/$id/session
83     +php_admin_value[session.gc_maxlifetime] = 86400
84     +php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
85     +php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
86     +php_admin_value[sys_temp_dir] = /var/lib/php/$id/tmp
87     +php_admin_value[error_log] = /var/log/php/$id/error.log
88     +slowlog = /var/log/php/$id/slow.log
89     +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
90     +php_admin_flag[display_errors] = off
91     +php_admin_flag[log_errors] = on
92     +php_admin_value[memory_limit] = $memory_limit
93     +php_admin_value[max_execution_time] = 3600
94     +php_admin_value[post_max_size] = $max_upload_size
95     +php_admin_value[upload_max_filesize] = $max_upload_size
96     +php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd
97     +php_admin_value[open_basedir] = $open_basedir
98     +php_admin_flag[allow_url_fopen] = on
99     +php_admin_flag[file_upload] = on
100     +php_admin_flag[session.cookie_httponly] = on
101     +php_admin_flag[allow_url_include] = off
102     +php_admin_value[session.save_handler] = files
103     +php_admin_flag[output_buffering] = off
104     +php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php
105     +php_flag[session.use_trans_sid] = off
106     +php_flag[track_vars] = on
107     +php_flag[magic_quotes_gpc] = off
108     +
109     +_EOF
110     +
111     + }
112     + else{
113     + $OUT .= '; phpldapadmin is disabled';
114     + }
115     +}
116     +}
117     +

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