1 |
diff -urN smeserver-manager-0.1.2.old/createlinks smeserver-manager-0.1.2/createlinks |
2 |
--- smeserver-manager-0.1.2.old/createlinks 2021-01-07 20:39:03.000000000 +0400 |
3 |
+++ smeserver-manager-0.1.2/createlinks 2021-01-07 21:59:59.997000000 +0400 |
4 |
@@ -27,7 +27,7 @@ |
5 |
{ |
6 |
safe_symlink("restart", |
7 |
"root/etc/e-smith/events/$event/services2adjust/smanager"); |
8 |
- safe_symlink("sigusr1", |
9 |
+ safe_symlink("reload", |
10 |
"root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
11 |
} |
12 |
|
13 |
diff -urN smeserver-manager-0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass smeserver-manager-0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass |
14 |
--- smeserver-manager-0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass 2020-11-19 11:53:26.000000000 +0400 |
15 |
+++ smeserver-manager-0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass 2021-01-06 20:41:38.000000000 +0400 |
16 |
@@ -16,11 +16,9 @@ |
17 |
$OUT .= ' RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$' . "\n"; |
18 |
$OUT .= " RewriteRule ^/$place(/.*|\$) https://%{HTTP_HOST}/$place\$1 [L,R]\n"; |
19 |
$OUT .= "\n"; |
20 |
- $OUT .= '# RewriteCond %{REQUEST_FILENAME} !-f' . "\n"; |
21 |
- $OUT .= " RewriteCond %{REQUEST_URI} (.*)/$place\$ \n"; |
22 |
- $OUT .= ' RewriteRule ^(.*)$ $1/ [L,R=301]' . "\n"; |
23 |
- $OUT .= "# RewriteRule . %{REQUEST_URI}/ [L,R=301]\n"; |
24 |
- } |
25 |
+ } |
26 |
+ $OUT .= " RewriteRule ^/$place\$ https://%{HTTP_HOST}/$place/ [L,R]\n\n"; |
27 |
+ |
28 |
$OUT .= " ProxyRequests Off\n"; |
29 |
$OUT .= " ProxyPreserveHost On\n"; |
30 |
$OUT .= " ProxyPass /$place http://127.0.0.1:$adminPort2 keepalive=On\n"; |
31 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm |
32 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm 2020-11-19 11:53:26.000000000 +0400 |
33 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Remoteaccess.pm 2021-01-07 22:24:30.929000000 +0400 |
34 |
@@ -27,11 +27,12 @@ |
35 |
#our @ISA = qw(esmith::FormMagick Exporter); |
36 |
|
37 |
our @EXPORT = qw( networkAccess_list passwordLogin_list get_ssh_permit_root_login get_ssh_access get_telnet_mode |
38 |
- get_ftp_access get_pptp_sessions get_ftp_password_login_access |
39 |
+ get_ftp_access get_ftp_password_login_access |
40 |
get_value get_prop get_ssh_password_auth |
41 |
validate_network_and_mask ip_number_or_blank subnet_mask_or_blank |
42 |
get_ipsecrw_sessions pptp_and_dhcp_range |
43 |
); |
44 |
+# get_pptp_sessions |
45 |
|
46 |
our $db = esmith::ConfigDB->open || warn "Couldn't open configuration database"; |
47 |
|
48 |
@@ -46,7 +47,7 @@ |
49 |
my %rma_datas = (); |
50 |
|
51 |
#$rma_datas{ipsecrwSess} = $c->get_ipsecrw_sessions(); |
52 |
- $rma_datas{pptpSessions} = $c->get_pptp_sessions(); |
53 |
+ #$rma_datas{pptpSessions} = $c->get_pptp_sessions(); |
54 |
$rma_datas{sshAccess} = $c->get_ssh_access(); |
55 |
$rma_datas{sshPermitRootLogin} = $c->get_ssh_permit_root_login(); |
56 |
$rma_datas{sshPasswordAuthentication} = $c->get_ssh_password_auth(); |
57 |
@@ -73,7 +74,7 @@ |
58 |
$rma_datas{ipsecrwSess} = ($c->param ('IpsecrwSess') || ''); |
59 |
$rma_datas{ipsecrwReset} = ($c->param ('IpsecrwReset') || ''); |
60 |
|
61 |
- $rma_datas{pptpSessions} = ($c->param ('PptpSessions') || '0'); |
62 |
+ #$rma_datas{pptpSessions} = ($c->param ('PptpSessions') || '0'); |
63 |
|
64 |
$rma_datas{validFromNetwork} = ($c->param ('ValidFromNetwork') || ''); |
65 |
$rma_datas{validFromMask} = ($c->param ('ValidFromMask') || ''); |
66 |
@@ -95,7 +96,7 @@ |
67 |
my $v = $c->validation; |
68 |
return $c->render('remoteaccess') unless $v->has_data; |
69 |
|
70 |
- $v->optional('PptpSessions')->num(0, 999)->is_valid; |
71 |
+ #$v->optional('PptpSessions')->num(0, 999)->is_valid; |
72 |
$v->optional('ValidFromNetwork')->size(7, 15)->is_valid; |
73 |
$v->optional('ValidFromMask')->size(7, 15)->is_valid; |
74 |
$v->required('SshTCPPort')->num(1, 65535)->is_valid; |
75 |
@@ -105,8 +106,8 @@ |
76 |
if ( ! $result ) { |
77 |
|
78 |
# controls |
79 |
- $res = pptp_and_dhcp_range( $c, $rma_datas{pptpSessions} ); |
80 |
- $result .= $res . ' ' unless $res eq 'OK'; |
81 |
+ #$res = pptp_and_dhcp_range( $c, $rma_datas{pptpSessions} ); |
82 |
+ #$result .= $res . ' ' unless $res eq 'OK'; |
83 |
|
84 |
$res = ip_number_or_blank( $c, $rma_datas{validFromNetwork} ); |
85 |
$result .= $res . ' ' unless $res eq 'OK'; |
86 |
@@ -184,16 +185,12 @@ |
87 |
} |
88 |
|
89 |
|
90 |
-sub get_pptp_sessions { |
91 |
- |
92 |
- my $status = get_prop('','pptpd','status'); |
93 |
- if (defined($status) && ($status eq 'enabled')) { |
94 |
- return(get_prop('','pptpd','sessions') || 'no'); |
95 |
- } |
96 |
- else { |
97 |
- return('0'); |
98 |
- } |
99 |
-} |
100 |
+#sub get_pptp_sessions { |
101 |
+# my $status = get_prop('','pptpd','status'); |
102 |
+# if (defined($status) && ($status eq 'enabled')) { |
103 |
+# return(get_prop('','pptpd','sessions') || 'no'); |
104 |
+# return '0'; |
105 |
+#} |
106 |
|
107 |
|
108 |
sub get_ssh_permit_root_login { |
109 |
@@ -381,12 +378,12 @@ |
110 |
} |
111 |
} |
112 |
|
113 |
- if ($rma_datas{pptpSessions} == 0) { |
114 |
- $db->get('pptpd')->set_prop('status', 'disabled'); |
115 |
- } else { |
116 |
- $db->get('pptpd')->set_prop('status', 'enabled'); |
117 |
- $db->get('pptpd')->set_prop('sessions', $rma_datas{pptpSessions}); |
118 |
- } |
119 |
+# if ($rma_datas{pptpSessions} == 0) { |
120 |
+# $db->get('pptpd')->set_prop('status', 'disabled'); |
121 |
+# } else { |
122 |
+# $db->get('pptpd')->set_prop('status', 'enabled'); |
123 |
+# $db->get('pptpd')->set_prop('sessions', $rma_datas{pptpSessions}); |
124 |
+# } |
125 |
|
126 |
if ( $rma_datas{validFromNetwork} && $rma_datas{validFromMask} ) { |
127 |
unless (add_new_valid_from( $c, $rma_datas{validFromNetwork}, $rma_datas{validFromMask} )) { |
128 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm |
129 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm 2021-01-07 20:39:03.000000000 +0400 |
130 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm 2021-01-07 21:48:13.716000000 +0400 |
131 |
@@ -23,7 +23,7 @@ |
132 |
use SrvMngr::Model::Main; |
133 |
|
134 |
|
135 |
-our $VERSION = '1.203'; |
136 |
+our $VERSION = '1.204'; |
137 |
$VERSION = eval $VERSION; |
138 |
|
139 |
use Exporter 'import'; |
140 |
@@ -243,8 +243,8 @@ |
141 |
|
142 |
$if_admin->get('/ibays')->to('ibays#main')->name('ibays'); |
143 |
$if_admin->post('/ibays')->to('ibays#do_display')->name('ibayadd'); |
144 |
- $if_admin->get('/ibayd')->to('ibays#do_display')->name('ibaydis'); |
145 |
- $if_admin->post('/ibayd')->to('ibays#do_update')->name('ibayupd'); |
146 |
+ $if_admin->get('/ibaysd')->to('ibays#do_display')->name('ibaydis'); |
147 |
+ $if_admin->post('/ibaysd')->to('ibays#do_update')->name('ibayupd'); |
148 |
|
149 |
|
150 |
$if_admin->get('/localnetworks')->to('localnetworks#main')->name('localnetworks'); |
151 |
@@ -276,8 +276,8 @@ |
152 |
$if_admin->post('/qmailanalog')->to('qmailanalog#do_update')->name('qmailanalog2'); |
153 |
|
154 |
$if_admin->get('/quota')->to('quota#main')->name('quota'); |
155 |
- $if_admin->get('/quotaupd')->to('quota#do_display')->name('quotalist'); |
156 |
- $if_admin->post('/quotaupd')->to('quota#do_update')->name('quotaupd'); |
157 |
+ $if_admin->get('/quotad')->to('quota#do_display')->name('quotalist'); |
158 |
+ $if_admin->post('/quotad')->to('quota#do_update')->name('quotaupd'); |
159 |
$if_admin->post('/quota2')->to('quota#do_update')->name('quotaval'); |
160 |
|
161 |
$if_admin->get('/reboot')->to('reboot#main')->name('reboot'); |
162 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_del.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_del.html.ep |
163 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_del.html.ep 2020-11-19 11:53:26.000000000 +0400 |
164 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_del.html.ep 2021-01-06 20:47:18.000000000 +0400 |
165 |
@@ -1,7 +1,7 @@ |
166 |
<div id='iba_del'> |
167 |
|
168 |
% my $btn = l('REMOVE'); |
169 |
- %= form_for '/ibayd' => (method => 'POST') => begin |
170 |
+ %= form_for '/ibaysd' => (method => 'POST') => begin |
171 |
<p> |
172 |
<h2> |
173 |
%=l 'iba_REMOVE_TITLE' |
174 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_list.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_list.html.ep |
175 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_list.html.ep 2020-11-19 11:53:26.000000000 +0400 |
176 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_list.html.ep 2021-01-06 20:48:38.000000000 +0400 |
177 |
@@ -47,18 +47,18 @@ |
178 |
%= t td => (class => 'sme-border') => $ibay->prop('Name') |
179 |
% my ($actionModify, $actionResetPw, $actionRemove) = ' '; |
180 |
% if ($modifiable eq 'yes') { |
181 |
- % $actionModify = "<a href='ibayd?trt=UPD&ibay=" . $ibay->key . "'>" . l('MODIFY') . "</a>"; |
182 |
+ % $actionModify = "<a href='ibaysd?trt=UPD&ibay=" . $ibay->key . "'>" . l('MODIFY') . "</a>"; |
183 |
% } |
184 |
% if ($passwordable eq 'yes') { |
185 |
% if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { |
186 |
- % $actionResetPw .= "<a href='ibayd?trt=PWD&ibay=" . $ibay->key . "' class='error'>" . l('PASSWORD_RESET') . "</a>"; |
187 |
+ % $actionResetPw .= "<a href='ibaysd?trt=PWD&ibay=" . $ibay->key . "' class='error'>" . l('PASSWORD_RESET') . "</a>"; |
188 |
% } else { |
189 |
- % $actionResetPw .= "<a href='ibayd?trt=PWD&ibay=" . $ibay->key . "'>" . l('PASSWORD_RESET') . "</a>"; |
190 |
+ % $actionResetPw .= "<a href='ibaysd?trt=PWD&ibay=" . $ibay->key . "'>" . l('PASSWORD_RESET') . "</a>"; |
191 |
% } |
192 |
% $actionResetPw .= ' '; |
193 |
% } |
194 |
% if ($removable eq 'yes') { |
195 |
- % $actionRemove = "<a href='ibayd?trt=DEL&ibay=" . $ibay->key . "'>" . l('REMOVE') . "</a>"; |
196 |
+ % $actionRemove = "<a href='ibaysd?trt=DEL&ibay=" . $ibay->key . "'>" . l('REMOVE') . "</a>"; |
197 |
% } |
198 |
<td class='sme-border'><%= $c->render_to_string(inline => $actionModify) %></td> |
199 |
<td class='sme-border'><%= $c->render_to_string(inline => $actionResetPw) %></td> |
200 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep |
201 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep 2020-11-19 11:53:26.000000000 +0400 |
202 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_pwd.html.ep 2021-01-06 20:49:04.000000000 +0400 |
203 |
@@ -2,7 +2,7 @@ |
204 |
|
205 |
% my $btn = l('SAVE'); |
206 |
|
207 |
- %= form_for '/ibayd' => (method => 'POST') => begin |
208 |
+ %= form_for '/ibaysd' => (method => 'POST') => begin |
209 |
<p> |
210 |
<h2> |
211 |
%=l 'PASSWORD_RESET' |
212 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_upd.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_upd.html.ep |
213 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_iba_upd.html.ep 2020-11-19 11:53:26.000000000 +0400 |
214 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_iba_upd.html.ep 2021-01-06 20:49:31.000000000 +0400 |
215 |
@@ -3,7 +3,7 @@ |
216 |
|
217 |
% my $btn = l('ADD'); |
218 |
|
219 |
- %= form_for '/ibayd' => (method => 'POST') => begin |
220 |
+ %= form_for '/ibaysd' => (method => 'POST') => begin |
221 |
<p> |
222 |
<h2> |
223 |
%=l 'iba_ADD_TITLE' |
224 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_quo_list.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_quo_list.html.ep |
225 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_quo_list.html.ep 2020-11-19 11:53:26.000000000 +0400 |
226 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_quo_list.html.ep 2021-01-06 20:50:19.000000000 +0400 |
227 |
@@ -56,7 +56,7 @@ |
228 |
%= t td => (class => 'sme-border') => sprintf("%.2f", $bs / 1024 ) |
229 |
%= t td => (class => 'sme-border') => sprintf("%.2f", $bh / 1024 ) |
230 |
%= t td => (class => 'sme-border') => sprintf("%.2f", $bc / 1024 ) |
231 |
- <td class='sme-border'><a href="quotaupd?trt=UPD&user=<%= $user->key%>"><%=l 'MODIFY'%></a></td> |
232 |
+ <td class='sme-border'><a href="quotad?trt=UPD&user=<%= $user->key%>"><%=l 'MODIFY'%></a></td> |
233 |
</tr> |
234 |
% } |
235 |
</tbody> |
236 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_rma_pptp.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_rma_pptp.html.ep |
237 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_rma_pptp.html.ep 1970-01-01 04:00:00.000000000 +0400 |
238 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_rma_pptp.html.ep 2021-01-06 20:58:05.000000000 +0400 |
239 |
@@ -0,0 +1,14 @@ |
240 |
+ <p><h2> |
241 |
+ %=l 'rma_TITLE_PPTP' |
242 |
+ </h2><br> |
243 |
+ %=l 'rma_DESC_PPTP' |
244 |
+ <br> |
245 |
+ <span class=label> |
246 |
+ %=l 'rma_LABEL_PPTP' |
247 |
+ </span><span class=data> |
248 |
+ % param 'PptpSessions' => $c->get_pptp_sessions unless param 'PptpSessions'; |
249 |
+ %= text_field 'PptpSessions' => $c->get_pptp_sessions(), class => 'input' |
250 |
+ </span> |
251 |
+ </p> |
252 |
+ |
253 |
+ <hr class='sectionbar' /> |
254 |
diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep |
255 |
--- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2020-11-19 11:53:26.000000000 +0400 |
256 |
+++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2021-01-06 21:01:51.000000000 +0400 |
257 |
@@ -55,20 +55,7 @@ |
258 |
</p> |
259 |
%} |
260 |
|
261 |
- <p><h2> |
262 |
- %=l 'rma_TITLE_PPTP' |
263 |
- </h2><br> |
264 |
- %=l 'rma_DESC_PPTP' |
265 |
- <br> |
266 |
- <span class=label> |
267 |
- %=l 'rma_LABEL_PPTP' |
268 |
- </span><span class=data> |
269 |
- % param 'PptpSessions' => $c->get_pptp_sessions unless param 'PptpSessions'; |
270 |
- %= text_field 'PptpSessions' => $c->get_pptp_sessions(), class => 'input' |
271 |
- </span> |
272 |
- </p> |
273 |
- |
274 |
- <hr class='sectionbar' /> |
275 |
+ <!-- percequ include 'partials/_rma_pptp' --> |
276 |
|
277 |
<p><h2> |
278 |
%= $c->l('rma_VALIDFROM_TITLE', $c->l('rma_REMOTE_MANAGEMENT')); |