/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-setuid_groups.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-setuid_groups.patch

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


Revision 1.2 - (hide annotations) (download)
Sat Nov 21 08:43:51 2020 UTC (3 years, 11 months ago) by michel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
* Fri Nov 20 2020 Michel Begue <mab974@gmail.com> 0.1.2-2.sme
- Fix smanager-update event name
- Move smanager service to /usr/lib/systemd
- Fix Bugreport file download
- Fix translations missing in 'viewlogfiles'
- Remove Admin auth in httpd configuration
- Add an optional alias for admin sign in.
- Remove systemctl from .spec file

1 michel 1.1 diff -urN smeserver-manager-0.1.0.old/manager2.c smeserver-manager-0.1.0/manager2.c
2     --- smeserver-manager-0.1.0.old/manager2.c 1970-01-01 04:00:00.000000000 +0400
3     +++ smeserver-manager-0.1.0/manager2.c 2019-12-31 08:58:20.644000000 +0400
4     @@ -0,0 +1,13 @@
5     +#include <stdio.h>
6     +#include <stdlib.h>
7     +#include <memory.h>
8     +#include <libgen.h>
9     +#define CGI_PATH "/etc/e-smith/web/functions2/"
10     +
11     +main(int argc, char *argv[])
12     +{
13     + char cmd[50];
14     + sprintf(cmd, "%s%s", CGI_PATH, basename(argv[0]));
15     + execv(cmd, argv);
16     + return 0;
17     +}
18     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/functions2/index.cgi smeserver-manager-0.1.0/root/etc/e-smith/web/functions2/index.cgi
19     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/functions2/index.cgi 1970-01-01 04:00:00.000000000 +0400
20     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/functions2/index.cgi 2019-12-31 17:15:12.000000000 +0400
21     @@ -0,0 +1,15 @@
22     +#! /usr/bin/perl -wT
23     +
24     +use esmith::util;
25     +
26     +BEGIN
27     +{
28     + $0 =~ /^(.+)$/ms; $0 = $1; # Untaint script name
29     + $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
30     + $ENV{'SHELL'} = '/bin/bash';
31     + $ENV{'HOME'} = '/root';
32     + delete $ENV{'ENV'};
33     + esmith::util::setRealToEffective();
34     +}
35     +
36     +exec("perl ./srvmngr.pl") if chdir "../cgi-bin/srvmngr";
37     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf
38     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf 2019-12-31 08:55:13.000000000 +0400
39     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf 2019-12-31 17:50:50.143000000 +0400
40     @@ -6,7 +6,7 @@
41     # navigation_div_file => "themes/default/templates/partials/_navig.html.ep",
42     navigation_script_file => "themes/default/public/js/navigation.js",
43     navigation_div_file => "themes/default/templates/partials/_navig.html.ep",
44     - navigation_has_changed => 0,
45     + navigation_has_changed => 1,
46     modules_dir => "lib/SrvMngr/Controller",
47     debug => 1,
48     }
49     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm
50     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2019-12-31 08:55:13.000000000 +0400
51     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2019-12-26 18:06:17.000000000 +0400
52     @@ -7,43 +7,167 @@
53     use Locale::gettext;
54     use SrvMngr::I18N;
55    
56     +use Text::Template;
57     +use File::Basename;
58     +use esmith::FormMagick qw( gen_locale_date_string );
59     +
60     +our $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
61     +
62     +# Get some basic info on the current SME install
63     +our $sysconfig = $db->get('sysconfig');
64     +our $systemmode = $sysconfig->prop('PreviousSystemMode');
65     +our $releaseversion = $sysconfig->prop('ReleaseVersion');
66     +
67     +# Prepare some filehandles for templates and reports
68     +our $templatefile = '/tmp/bugreport_template.txt';
69     +our $configreportfile = '/tmp/configreport.txt';
70     +
71    
72     sub main {
73     my $c = shift;
74     -
75     $c->app->log->info($c->log_req);
76    
77     - #my $i18n = $c->stash('i18n');
78     - #$i18n->{'namespace'} = 'SrvMngr::I18N::Bugreport';
79     - #$i18n->namesp();
80     + my %bugr_datas = ();
81    
82     my $title = $c->l('bugr_FORM_TITLE');
83     my $modul = $c->render_to_string( inline => $c->l('bugr_DESCRIPTION'));
84    
85     - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight},
86     - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe}, navigation => $c->session->{navigation},
87     - title => $title, modul => $modul);
88     + $bugr_datas{'trt'} = 'SHOW';
89    
90     + $c->stash(title => $title, modul => $modul, bugr_datas => \%bugr_datas);
91     $c->render(template => 'bugreport');
92     };
93    
94    
95     sub do_report {
96     my $c = shift;
97     -
98     $c->app->log->info($c->log_req);
99    
100     my $title = $c->l('bugr_FORM_TITLE');
101     - my $modul = $c->render_to_string( 'Bug report generation <br>(to be done !!)');
102     -# my $modul = $c->render_to_string( inline => $c->l('bugr_DESCRIPTION'));
103    
104     - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight},
105     - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe}, navigation => $c->session->{navigation},
106     - title => $title, modul => $modul);
107     + my $trt = $c->param('trt') || 'SHOW';
108    
109     - $c->render(template => 'module');
110     + my %bugr_datas = ();
111     + $bugr_datas{'trt'} = $trt;
112     +
113     + if ( $trt eq 'SHOW' ) {
114     + create_configuration_report();
115     +
116     + my $out = $c->render_to_string(inline => show_config_report());
117     +
118     + $bugr_datas{'trt'} = 'DOWN';
119     +
120     + $c->stash(title => $title, modul => $out, bugr_datas => \%bugr_datas);
121     + $c->render(template => 'bugreport2');
122     + }
123     +
124     + if ( $trt eq 'DOWN' ) {
125     +
126     + my $modul = 'Bug report download';
127     +
128     + #download_config_report();
129     +
130     + # --> OR <--
131     + #if ( $params{'output_format'} eq 'txtfile' ) {
132     + $c->res->headers->content_disposition("attachement; filename=" . basename($configreportfile) . ";");
133     + #$c->res->headers->content_type('text/plain');
134     + $c->reply->file("$configreportfile");
135     + #} else {
136     + # $modul .= "\n output_format not compatible with report file";
137     + #}
138     +
139     + # the following in this sub will not be used !!!
140     + $bugr_datas{'trt'} = 'DOWN';
141     +
142     + $c->stash(title => $title, modul => $modul, bugr_datas => \%bugr_datas);
143     + $c->render(template => 'bugreport');
144     + }
145     };
146    
147    
148     +sub create_configuration_report {
149     +
150     + my $c = shift;
151     +
152     + # TBD: possibly check $q for a boolean value eg. from a checkbox
153     + # indicating the user has read privacy warning etc.
154     +
155     + # create the reporting template
156     + my $configreport_template = Text::Template->new(TYPE => 'FILE', SOURCE => '/etc/e-smith/web/common/configuration_report.tmpl', UNTAINT => 1);
157     + my $report_creation_time = gen_locale_date_string;
158     +
159     + # curent kernel
160     + my $curkernel = `uname -r`;
161     +
162     + # get additional RPMs
163     + my @newrpms = `/sbin/e-smith/audittools/newrpms`;
164     +
165     + # get additional Repositories
166     + my @repositories = `/sbin/e-smith/audittools/repositories`;
167     + #print @repositories;
168     +
169     + # get templates
170     + my @templates = `/sbin/e-smith/audittools/templates`;
171     +
172     + # get events
173     + my @events = `/sbin/e-smith/audittools/events`;
174     +
175     +
176     + # set template variables
177     + my %vars = (report_creation_time => \$report_creation_time,
178     + releaseversion => \$releaseversion,
179     + curkernel => \$curkernel,
180     + systemmode => \$systemmode,
181     + newrpms => \@newrpms,
182     + templates => \@templates,
183     + events => \@events,
184     + repositories => \@repositories,
185     + );
186     +
187     + # prcess template
188     + my $result = $configreport_template->fill_in(HASH => \%vars);
189     +
190     + # write processed template to file
191     + open (my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!";
192     + print $cfgrep $result;
193     + close $cfgrep;
194     +}
195     +
196     +sub show_config_report {
197     + my $c = shift;
198     +
199     + my $out = '';
200     + $out .= sprintf "<PRE>";
201     +
202     + open (my $cfgrep, '<', $configreportfile) or die "Could not find temporary config report file!";
203     + #open(REPORT, "/var/$report_type |");
204     +
205     + while (<$cfgrep>) {
206     + $out .= sprintf("%s", $_);
207     + }
208     +
209     + $out .= sprintf "</PRE>";
210     +
211     + # that would be too easy!?
212     + #$out .= sprintf("<a href=\"bugreport?action=download_config_report\"> %s </a>", $c->l('bugr_Download this report'));
213     +
214     + return $out;
215     +
216     +}
217     +
218     +sub download_config_report {
219     + my $c = shift;
220     +# my $q = $c->{'cgi'};
221     + open (DLFILE, "<$configreportfile") or die "Could not access temporary file for config report!";
222     + my @fileholder = <DLFILE>;
223     + close (DLFILE) || Error ('close', 'file');
224     + print "Content-Type:text/plain\n";#application/x-downloadn";
225     + print "Content-Disposition:attachment;filename=" . basename($configreportfile);
226     + print "\n\n";
227     + print @fileholder ;
228     + return "";
229     +
230     +}
231     +
232     1;
233    
234     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm
235     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2019-12-31 08:55:13.000000000 +0400
236     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2019-12-24 16:00:40.000000000 +0400
237     @@ -9,7 +9,7 @@
238    
239     #package esmith::FormMagick::Panel::clamav;
240    
241     -our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
242     +our $db = esmith::ConfigDB->open() || die "Couldn't open config db";
243    
244     sub main {
245     my $c = shift;
246     @@ -51,12 +51,12 @@
247     #
248     # Update the system
249     #
250     - #system("/sbin/e-smith/signal-event clamav-update") == 0
251     - # or $result = $c->l('clm_ERROR_UPDATING_CONFIGURATION');
252     + system("/sbin/e-smith/signal-event clamav-update") == 0
253     + or $result = $c->l('clm_ERROR_UPDATING_CONFIGURATION');
254    
255     my $title = $c->l('clm_FORM_TITLE');
256    
257     - if ( $result eq '' ) { $result = $c->l('clm_SUCCESS')." but system update NOT done" ; }
258     + if ( $result eq '' ) { $result = $c->l('clm_SUCCESS') ; }
259    
260     $c->stash( title => $title, modul => $result );
261     $c->render(template => 'module');
262     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm
263     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2019-12-31 08:55:13.000000000 +0400
264     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2019-12-24 15:56:46.000000000 +0400
265     @@ -10,7 +10,7 @@
266     use esmith::FormMagick;
267     #use esmith::FormMagick::Panel::datetime;
268    
269     -our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
270     +our $db = esmith::ConfigDB->open() || die "Couldn't open config db";
271    
272     sub main {
273     my $c = shift;
274     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm
275     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2019-12-31 08:55:13.000000000 +0400
276     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2019-12-24 16:01:59.000000000 +0400
277     @@ -9,7 +9,7 @@
278     #use esmith::util qw(ldapBase);
279     use esmith::FormMagick::Panel::directory;
280    
281     -our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
282     +our $db = esmith::ConfigDB->open() || die "Couldn't open config db";
283    
284     sub main {
285     my $c = shift;
286     @@ -55,8 +55,7 @@
287     $db->get('ldap')->set_prop('defaultPhoneNumber', $phonenumber);
288    
289     if ($existing eq 'update') {
290     - # my $ac =esmith::AccountsDB->open('conf/test/accounts');
291     - my $ac = esmith::AccountsDB->open('conf/test/accounts') || die "Couldn't open accounts db";
292     + my $ac = esmith::AccountsDB->open() || die "Couldn't open accounts db";
293     my @users = $ac->users();
294    
295     foreach my $user (@users) {
296     @@ -76,7 +75,7 @@
297    
298     my $title = $c->l('dir_FORM_TITLE');
299    
300     - if ( $result eq '' ) { $result = $c->l('dir_SUCCESS') . " but System update NOT done !!!"; }
301     + if ( $result eq '' ) { $result = $c->l('dir_SUCCESS'); }
302    
303     $c->stash( title => $title, modul => $result );
304     $c->render(template => 'module');
305     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm
306     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 1970-01-01 04:00:00.000000000 +0400
307     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 2020-01-01 17:35:59.723000000 +0400
308     @@ -0,0 +1,486 @@
309     +package SrvMngr::Controller::Groups;
310     +
311     +use strict;
312     +use warnings;
313     +use Mojo::Base 'Mojolicious::Controller';
314     +
315     +use Locale::gettext;
316     +use SrvMngr::I18N;
317     +
318     +use Data::Dumper;
319     +
320     +use esmith::FormMagick::Panel::groups;
321     +
322     +our $cdb = esmith::ConfigDB->open || die "Couldn't open configuration db";
323     +our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
324     +
325     +sub main {
326     +
327     + my $c = shift;
328     + $c->app->log->info($c->log_req);
329     +
330     + my %grp_datas = ();
331     + my $title = $c->l('grp_FORM_TITLE');
332     + my $modul = '';
333     +
334     + $grp_datas{trt} = 'LIST';
335     +
336     + my @groups;
337     + if ($adb)
338     + {
339     + @groups = $adb->groups();
340     + }
341     +
342     + $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas, groups => \@groups );
343     + $c->render(template => 'groups');
344     +
345     +};
346     +
347     +
348     +sub do_display {
349     +
350     + my $c = shift;
351     + $c->app->log->info($c->log_req);
352     +
353     + my $rt = $c->current_route;
354     + my $trt = ($c->param('trt') || 'LIST');
355     + my $group = $c->param('group') || '';
356     +
357     + $trt = 'DEL' if ( $rt eq 'groupdel1' );
358     + $trt = 'UPD' if ( $rt eq 'groupupd1' );
359     + $trt = 'ADD' if ( $rt eq 'groupadd1' );
360     +
361     + my %grp_datas = ();
362     + my $title = $c->l('grp_FORM_TITLE');
363     + my $modul = '';
364     +
365     + $grp_datas{'trt'} = $trt;
366     +
367     + if ( $trt eq 'ADD' ) {
368     +
369     + my %users = @{gen_users_list( $c )};
370     +
371     + $c->stash( users => \%users );
372     +
373     + }
374     +
375     + if ( $trt eq 'UPD' ) {
376     +
377     + my %members = ();
378     + my %users = ();
379     +
380     + my $rec = $adb->get($group);
381     + if ($rec and $rec->prop('type') eq 'group') {
382     +
383     + $grp_datas{group} = $group;
384     + $grp_datas{description} = $rec->prop('Description') || '';
385     +
386     + %members = @{gen_members_list( $c, $group )};
387     +
388     + %users = @{gen_users_list( $c )};
389     + }
390     +
391     + $c->stash( members => \%members, users => \%users );
392     +
393     + }
394     +
395     + if ( $trt eq 'DEL' ) {
396     +
397     + my %members = ();
398     + my %ibays = ();
399     +
400     + my $rec = $adb->get($group);
401     + if ($rec and $rec->prop('type') eq 'group') {
402     +
403     + $grp_datas{group} = $group;
404     + $grp_datas{description} = $rec->prop('Description') || '';
405     +
406     + %members = @{gen_members_list($c, $group)};
407     +
408     + %ibays = @{gen_ibays_list($c, $group)};
409     +
410     + }
411     + # $c->flash(message => 'Del display Group okkkkkkkkkkkk');
412     + # $c->app->log->info("members: " . $c->dumper(%members));
413     + # $c->app->log->info("ibays: " . $c->dumper(%ibays));
414     +
415     + $c->stash( grp_datas => \%grp_datas, members => \%members, ibays => \%ibays );
416     +
417     + }
418     +
419     + if ( $trt eq 'LIST' ) {
420     + my @groups;
421     + if ($adb) {
422     + @groups = $adb->groups();
423     + }
424     +
425     + $c->stash( groups => \@groups );
426     +
427     + }
428     +
429     + $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas );
430     + $c->render( template => 'groups' );
431     +
432     +};
433     +
434     +
435     +sub do_update {
436     +
437     + my $c = shift;
438     + $c->app->log->info($c->log_req);
439     +
440     + my $rt = $c->current_route;
441     + my $trt = ($c->param('trt') || 'LIST');
442     +
443     + my $result = '';
444     +
445     + if ( $trt eq 'ADD' ) {
446     +
447     + my $groupName = ($c->param('groupName') || '');
448     + my $groupDesc = ($c->param('groupDesc') || '');
449     + my @members = ($c->param('groupMembers') || '');
450     + my $members = join ( ",", @members );
451     +
452     + # controls (validate ?????)
453     + my $res = validate_group( $c, $groupName );
454     + $result .= $res unless $res eq 'OK';
455     +
456     + my $res = validate_group_length( $c, $groupName );
457     + $result .= $res unless $res eq 'OK';
458     +
459     + my $res = validate_group_naming_conflict( $c, $groupName );
460     + $result .= $res unless $res eq 'OK';
461     +
462     + my $res = validate_description( $c, $groupDesc );
463     + $result .= $res unless $res eq 'OK';
464     +
465     + my $res = validate_group_has_members( $c, @members );
466     + $result .= $res unless $res eq 'OK';
467     +
468     + my %props = (
469     + 'type', 'group', 'Description',
470     + $groupDesc, 'Members', $members
471     + );
472     +
473     + if ( ! $result ) {
474     +
475     + $adb->new_record( $groupName, \%props );
476     +
477     + # Untaint groupName before use in system()
478     + ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
479     +
480     + #???$c->clear_params();
481     +
482     + system("/sbin/e-smith/signal-event", "group-create", "$groupName") ==0
483     + or $result .= $c->l('grp_CREATE_ERROR')."\n";
484     +
485     + }
486     +
487     + if ( ! $result ) {
488     + $result = $c->l('grp_CREATED_GROUP') . ' ' . $groupName;
489     + }
490     + }
491     +
492     + if ( $trt eq 'UPD' ) {
493     +
494     + my $groupName = $c->param('group');
495     + my $groupDesc = ($c->param('groupDesc') || '');
496     + my @members = ($c->param('groupMembers') || '');
497     + my $members = join ( ",", @members );
498     +
499     + # controls
500     + my $res = '';
501     + my $res = validate_description( $c, $groupDesc );
502     + $result .= $res unless $res eq 'OK';
503     +
504     + my $res = validate_group_has_members( $c, @members );
505     + $result .= $res unless $res eq 'OK';
506     +
507     + if ( ! $result ) {
508     + # $res = new_group( $c, $name, $description, $location, $remoteName, $address );
509     + # $result .= $res unless $res eq 'OK';
510     + # if ( ! $result ) {
511     + $result = $c->l('grp_MODIFIED_GROUP') . ' ' . $groupName;
512     + # }
513     + }
514     + }
515     +
516     + if ( $trt eq 'DEL' ) {
517     +
518     + my $group = ($c->param ('group') || '');
519     +
520     + if ($group =~ /^([a-z][\-\_\.a-z0-9]*)$/) {
521     + $group = $1;
522     + } else {
523     + $result .= $c->l('grp_GROUP_NAMING') . ':' . $group;
524     + }
525     +
526     + my $rec = $adb->get($group);
527     + $result .= $c->l('grp_NOT_A_GROUP') . ':' . $group unless ($rec);
528     +
529     + if ( ! $result ) {
530     + my $res = delete_group( $c, $group );
531     + $result .= $res unless $res eq 'OK';
532     + if ( ! $result ) {
533     + $result = $c->l('grp_DELETED_GROUP') . ' ' . $group;
534     + }
535     + }
536     + }
537     +
538     + my $title = $c->l('grp_FORM_TITLE');
539     +
540     + $c->stash( title => $title, modul => $result );
541     + $c->render(template => 'module');
542     +
543     +};
544     +
545     +
546     +sub delete_group {
547     +
548     + my ( $c, $groupName ) = @_;
549     +
550     + # Update the db account (1)
551     + $adb->get($groupName)->set_prop('type', 'group-deleted');
552     +
553     + # Untaint groupName before use in system()
554     + ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
555     +
556     + return (system ("/sbin/e-smith/signal-event", "group-delete", "$groupName") ||
557     + !$adb->get($groupName)->delete()) ?
558     + $c->l('grp_DELETE_ERROR') : 'OK';
559     +
560     +}
561     +
562     +
563     +sub gen_members_list {
564     +
565     + my ( $c, $group ) = @_;
566     +
567     + my $rec = $adb->get($group);
568     + my @members = split ( /,/, $rec->prop('Members') );
569     +
570     + my %names;
571     + foreach my $m (@members) {
572     + my $name;
573     + if ( $m eq 'admin' ) {
574     + $name = "Administrator";
575     + }
576     + else {
577     + $name = $adb->get($m)->prop('FirstName') . " "
578     + . $adb->get($m)->prop('LastName');
579     + }
580     + $names{$m} = $name;
581     + }
582     + @members = %names;
583     +
584     + return \@members;
585     +
586     +}
587     +
588     +
589     +sub gen_ibays_list {
590     +
591     + my ( $c, $group ) = @_;
592     +
593     + my %names;
594     + foreach my $ibay ( $adb->ibays ) {
595     + if ( $ibay->prop('Group') eq $group ) {
596     + $names{$ibay->key} = $ibay->prop('Name');
597     + }
598     + }
599     + my @ibays = %names;
600     +
601     + return \@ibays;
602     +
603     +}
604     +
605     +
606     +sub gen_users_list {
607     +
608     + my $c = shift;
609     +
610     + my @users = sort { $a->key() cmp $b->key() } $adb->users();
611     + my %names;
612     +
613     + foreach my $user ( @users ) {
614     + $names{$user->key} = $user->prop('FirstName') . " "
615     + . $user->prop('LastName');
616     + }
617     + my @users = %names;
618     +
619     + return \@users;
620     +}
621     +
622     +
623     +=head1 VALIDATION
624     +
625     +=head2 validate_is_group FM GROUP
626     +
627     +returns OK if GROUP is a current group. otherwisee returns "NOT_A_GROUP"
628     +
629     +=begin testing
630     +
631     +#ok($panel->validate_is_group('root') eq 'OK', "Root is a group");
632     +ok($panel->validate_is_group('ro2ot') eq 'NOT_A_GROUP', "Ro2ot is not a group");
633     +
634     +=end testing
635     +
636     +=cut
637     +
638     +sub validate_is_group () {
639     + my $c = shift;
640     + my $group = shift;
641     +
642     + my @groups = $adb->groups();
643     + my %groups = map { $_->key => 1 } @groups;
644     +
645     + unless ( exists $groups{$group} ) {
646     + return ($c->l('grp_NOT_A_GROUP'));
647     + }
648     + return ("OK");
649     +
650     +}
651     +
652     +
653     +=head2 validate_group_naming_conflict FM GROUPNAME
654     +
655     +Returns "OK" if this group's name doesn't conflict with anything
656     +Returns "PSEUDONYM_CONFLICT" if this name conflicts with a pseudonym
657     +Returns "NAME_CONFLICT" if this group name conflicts with anything else
658     +
659     +ok (undef, 'need testing for validate_naming_Conflicts');
660     +=cut
661     +
662     +sub validate_group_naming_conflict
663     +{
664     + my $c = shift;
665     + my $groupName = shift;
666     +
667     + my $account = $adb->get($groupName);
668     + my $type;
669     +
670     + if (defined $account)
671     + {
672     + $type = $account->prop('type');
673     + }
674     + elsif (defined getpwnam($groupName) || defined getgrnam($groupName))
675     + {
676     + $type = "system";
677     + }
678     + else
679     + {
680     + return('OK');
681     + }
682     + return ($c->l('grp_ACCOUNT_CONFLICT') .
683     + { group => $groupName .
684     + type => $type,
685     + });
686     +}
687     +
688     +=head2 validate_group FM groupname
689     +
690     +Returns OK if the group name contains only valid characters
691     +Returns GROUP_NAMING otherwise
692     +
693     +=being testing
694     +
695     +ok(validate_group('','foo') eq 'OK', 'foo is a valid group);
696     +ok(validate_group('','f&oo') eq 'GROUP_CONTAINS_INVALD', 'f&oo is not a valid group);
697     +
698     +=end testing
699     +
700     +=cut
701     +
702     +sub validate_group {
703     + my $c = shift;
704     + my $groupName = shift;
705     + unless ( $groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/ ) {
706     + return $c->l('grp_GROUP_NAMING');
707     + }
708     + return ('OK');
709     +}
710     +
711     +
712     +=head2 validate_group_length FM GROUPNAME
713     +
714     +returns 'OK' if the group name is shorter than the maximum group name length
715     +returns 'GROUP_TOO_LONG' otherwise
716     +
717     +=begin testing
718     +
719     +ok(($panel->validate_group_length('foo') eq 'OK'), "a short groupname passes");
720     +ok(($panel->validate_group_length('fooooooooooooooooo') eq 'GROUP_TOO_LONG'), "a long groupname fails");
721     +
722     +=end testing
723     +
724     +=cut
725     +
726     +sub validate_group_length {
727     + my $c = shift;
728     + my $groupName = shift;
729     +
730     + my $maxGroupNameLength = ($cdb->get('maxGroupNameLength')
731     + ? $cdb->get('maxGroupNameLength')->prop('type')
732     + : "") || 12;
733     +
734     + if ( length $groupName > $maxGroupNameLength ) {
735     +
736     + return $c->l('grp_GROUP_TOO_LONG') .
737     + {maxLength => $maxGroupNameLength};
738     + }
739     + else {
740     + return ('OK');
741     + }
742     +}
743     +
744     +
745     +=head2 validate_group_has_members FM MEMBERS
746     +
747     +Validates that the cgi parameter MEMBERS is an array with at least one entry
748     +Returns OK if true. Otherwise, returns NO_MEMBERS
749     +
750     +
751     +=begin testing
752     +
753     +ok(validate_group_has_members('',qw(foo bar)) eq 'OK', "We do ok with a group with two members");
754     +
755     +ok(validate_group_has_members('',qw()) eq 'NO_MEMBERS', "We do ok with a group with no members");
756     +ok(validate_group_has_members('') eq 'NO_MEMBERS', "We do ok with a group with undef members");
757     +
758     +=end testing
759     +
760     +=cut
761     +
762     +sub validate_group_has_members {
763     + my $c = shift;
764     + my @members = (@_);
765     + my $count = @members;
766     + if ( $count == 0 ) {
767     + return ($c->l('grp_NO_MEMBERS'));
768     + }
769     + else {
770     + return ('OK');
771     + }
772     +}
773     +
774     +
775     +=pod
776     +
777     +=head2 validate_description ($description).
778     +Checks the supplied description. Period is allowed in description
779     +
780     +=cut
781     +
782     +sub validate_description
783     +{
784     + my ($c, $description) = @_;
785     + if ( $description =~ /^([\-\'\w][\-\'\w\s\.]*)$/ ) {
786     + return ('OK');
787     + }
788     + else {
789     + return ($c->l('FM_ERR_UNEXPECTED_DESC'));
790     + }
791     +}
792     +
793     +
794     +1
795     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm
796     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2019-12-31 08:55:14.000000000 +0400
797     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2019-12-24 11:24:37.000000000 +0400
798     @@ -9,10 +9,7 @@
799    
800     use esmith::FormMagick::Panel::printers;
801    
802     -#our $db = esmith::ConfigDB->open || die "Couldn't open config db";
803     our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
804     -#our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
805     -
806    
807     sub main {
808    
809     @@ -203,24 +200,17 @@
810    
811     my ( $c, $printer ) = @_;
812    
813     - # Update the db config (1)
814     -
815     - my $prop_del = "accounts settype $printer printer-deleted";
816     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_del ) ) == 0
817     - or return $c->l('prt_ERR_DELETING') . ' ' . $prop_del;
818     -
819     - # Update system
820     -
821     - system ('/bin/sudo', '/sbin/e-smith/signal-event', "printer-delete", $printer) == 0
822     - or return $c->l('prt_ERR_DELETING') . " system " . $printer;
823     -
824     - # Update the db config (2)
825     + # Update the db account (1)
826     + my $rec = $adb->get($printer);
827     +
828     + $rec->set_prop('type', 'printer-deleted');
829     + system ("/sbin/e-smith/signal-event printer-delete $printer") == 0
830     + or return $c->error('ERR_DELETING');
831    
832     - $prop_del = "accounts delete $printer";
833     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_del ) ) == 0
834     - or return $c->l('prt_ERR_DELETING') . ' ' . $prop_del;
835     + $rec->delete();
836    
837     return 'OK';
838     +
839     }
840    
841    
842     @@ -296,26 +286,20 @@
843    
844     #------------------------------------------------------------
845     # Printer name is available! Update printers database and
846     - # singal the create-printer event.
847     + # signal the create-printer event.
848     #------------------------------------------------------------
849    
850     my $result = '';
851     -
852     - $description =~ s/ /_/g;
853     - my $prop_upd = "accounts set $name printer ";
854     - $prop_upd .= "Description $description Address $address RemoteName $remoteName Location $location";
855     -
856     - # Update the db config
857     - #
858     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_upd ) ) == 0
859     -# system ( '/bin/sudo', '/sbin/e-smith/db', $prop_upd ) == 0
860     - or return $result = $c->l('prt_ERR_CREATING') . " db config: " . $prop_upd;
861     -
862     - # Update system
863     - if ( ! $result ) {
864     - system ('/bin/sudo', '/sbin/e-smith/signal-event', "printer-create", $name) == 0
865     - or return $result = $c->l('prt_ERR_CREATING') . " signal-event: " . $name;
866     - }
867     +
868     + my $rec = $adb->new_record($name,
869     + {type=>'printer',
870     + Description => $description,
871     + Address => $address,
872     + RemoteName => $remoteName,
873     + Location => $location});
874     +
875     + system ("/sbin/e-smith/signal-event printer-create $name") == 0
876     + or return $c->error('ERR_CREATING');
877    
878     return 'OK',
879     }
880     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm
881     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2019-12-31 08:55:14.000000000 +0400
882     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2019-12-24 15:55:58.000000000 +0400
883     @@ -7,7 +7,7 @@
884     use Locale::gettext;
885     use SrvMngr::I18N;
886    
887     -our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
888     +our $db = esmith::ConfigDB->open || die "Couldn't open config db";
889    
890     sub main {
891     my $c = shift;
892     @@ -50,12 +50,12 @@
893     #
894     # Update the system
895     #
896     - ##system("/sbin/e-smith/signal-event proxy-update") == 0
897     - ##or $result = $c->l('prx_ERR_PROXY_UPDATE_FAILED');
898     + system("/sbin/e-smith/signal-event proxy-update") == 0
899     + or $result = $c->l('prx_ERR_PROXY_UPDATE_FAILED');
900    
901     my $title = $c->l('prx_TITLE');
902    
903     - if ( $result eq '' ) { $result = $c->l('prx_SUCCESS')." but system update NOT done" ; }
904     + if ( $result eq '' ) { $result = $c->l('prx_SUCCESS'); }
905    
906     $c->stash( title => $title, modul => $result );
907     $c->render(template => 'module');
908     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm
909     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2019-12-31 08:55:14.000000000 +0400
910     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2019-12-25 22:08:09.000000000 +0400
911     @@ -55,32 +55,33 @@
912     my $c = shift;
913     my $report_type = shift;
914    
915     + my $out = '';
916     +
917     #------------------------------------------------------------
918     # Looks good; go ahead and generate the report.
919     #------------------------------------------------------------
920    
921     # $| = 1;
922     - my $out = '';
923    
924     my $now_string = $c->gen_locale_date_string();
925     - $out .= sprintf("<h3>%s %s </h3>\n", $c->l('REPORT_GENERATED'), $now_string);
926     + $out .= sprintf("<h3>%s %s </h3>", $c->l('REPORT_GENERATED'), $now_string);
927    
928     if ($report_type =~ /^qmail-q/)
929     {
930     open(QMAILQUEUEREPORT, "/var/qmail/bin/$report_type |");
931    
932     - # $out .= "<pre>\n";
933     + $out .= sprintf "<pre>";
934    
935     while (<QMAILQUEUEREPORT>)
936     {
937     - $out .= "while qmaqrp\n";
938     + $out .= sprintf("%s", $_);
939     }
940    
941     close QMAILQUEUEREPORT;
942     - # $out .= "</pre>\n";
943     + $out .= sprintf "</pre>";
944    
945     - $out .= sprintf("<h3>%s </h3>\n",$c->l('END_OF_REPORT'));
946     - return $out;
947     + $out .= sprintf("<h3>%s</h3>", $c->l('END_OF_REPORT'));
948     + return '';
949     }
950    
951     chdir "/var/log/qmail";
952     @@ -92,7 +93,7 @@
953     . "| /usr/local/qmailanalog/bin/$report_type |"
954     );
955    
956     - #$out .= "<pre>\n";
957     + $out .= sprintf "<pre>";
958    
959     while (<QMAILANALOG>)
960     {
961     @@ -103,14 +104,14 @@
962     s/\>/\&gt;/g;
963     s/\</\&lt;/g;
964    
965     - $out .= "while qmana\n";;
966     + $out .= sprintf("%s", $_);
967     }
968    
969     - #print "</pre>\n";
970     -
971     close QMAILANALOG;
972     + $out .= sprintf "</pre>";
973     +
974    
975     - $out .= sprintf("<h3>%s </h3>\n",$c->l('END_OF_REPORT'));
976     + $out .= sprintf("<h3>%s</h3>", $c->l('END_OF_REPORT'));
977     return $out;
978    
979     }
980     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm
981     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2019-12-31 08:55:14.000000000 +0400
982     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2019-12-31 10:59:44.000000000 +0400
983     @@ -4,7 +4,11 @@
984     use warnings;
985     use Mojo::Base 'Mojolicious::Controller';
986    
987     -use Quota;
988     +use esmith::FormMagick::Panel::quota;
989     +
990     +#use esmith::TestUtils;
991     +use Scalar::Util qw(looks_like_number);
992     +
993     use Locale::gettext;
994     use SrvMngr::I18N;
995    
996     @@ -12,7 +16,6 @@
997    
998     #our $db = esmith::ConfigDB->open || die "Couldn't open config db";
999     our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
1000     -#our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
1001    
1002    
1003     sub main {
1004     @@ -60,19 +63,14 @@
1005     if ($rec and $rec->prop('type') eq 'user') {
1006     $quo_datas{user} = $user;
1007     $quo_datas{userRec} = $rec;
1008     + my $max = esmith::FormMagick::Panel::quota->toBestUnit($rec->prop('MaxBlocks'));
1009     + $quo_datas{hardlim} = $max;
1010     + my $max = esmith::FormMagick::Panel::quota->toBestUnit($rec->prop('MaxBlocksSoftLim'));
1011     + $quo_datas{softlim} = $max;
1012     }
1013    
1014     }
1015    
1016     - #if ( $trt eq 'LIST' ) {
1017     - # my @userAccounts;
1018     - # if ($adb)
1019     - # {
1020     - # @userAccounts = $adb->users();
1021     - # }
1022     - # $c->stash( userAccounts => \@userAccounts );
1023     - #}
1024     -
1025     $c->stash( title => $title, modul => $modul, quo_datas => \%quo_datas );
1026     $c->render( template => 'quota' );
1027    
1028     @@ -87,31 +85,20 @@
1029     my $rt = $c->current_route;
1030     my $trt = ($c->param('trt') || 'LIST');
1031    
1032     -# if ( $trt =~ /^([A-Z]3)$/ ) {
1033     -# $trt = $1;
1034     -# } else {
1035     -# return $c->l('quo_ERR_INPUT_CODE') . ': ' . $trt;
1036     -# }
1037     -
1038     my $result = '';
1039    
1040     if ( $trt eq 'UPD' ) {
1041    
1042     - my $name = ($c->param('Name') || '');
1043     - my $description = ($c->param('Description') || '');
1044     - my $location = ($c->param('Location') || '');
1045     + my $acct = ($c->param('user') || '');
1046     + my $soft = ($c->param('Soft') || '');
1047     + my $hard = ($c->param('Hard') || '');
1048    
1049     # controls
1050     - my $res = validate_printer( $c, $name, $description, $location );
1051     + my $res = validate_quota( $c, $acct, $soft, $hard );
1052     $result .= $res unless $res eq 'OK';
1053    
1054     if ( ! $result ) {
1055     - $res = new_printer( $c, $name, $description, $location );
1056     - #$remoteName, $address );
1057     - $result .= $res unless $res eq 'OK';
1058     - if ( ! $result ) {
1059     - $result = $c->l('quo_CREATED_SUCCESSFULLY') . ' ' . $name;
1060     - }
1061     + $result = $c->l('quo_SUCCESSFULLY_MODIFY') . ' ' . $acct;
1062     }
1063     }
1064    
1065     @@ -123,66 +110,60 @@
1066     };
1067    
1068    
1069     -sub upd_user {
1070     -
1071     - my ( $c, $user ) = @_;
1072     -
1073     - # Update the db config (1)
1074     -
1075     - my $prop_del = "accounts settype $user user-updated";
1076     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_del ) ) == 0
1077     - or return $c->l('quo_ERR_DELETING') . ' ' . $prop_del;
1078     -
1079     - # Update system
1080     -
1081     - system ('/bin/sudo', '/sbin/e-smith/signal-event', "user-delete", $user) == 0
1082     - or return $c->l('quo_ERR_DELETING') . " system " . $user;
1083     -
1084     - # Update the db config (2)
1085     -
1086     - $prop_del = "accounts delete $user";
1087     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_del ) ) == 0
1088     - or return $c->l('quo_ERR_DELETING') . ' ' . $prop_del;
1089     -
1090     - return 'OK';
1091     -}
1092     -
1093     -
1094     -sub validate_printer {
1095     -
1096     - my ($c, $name, $description, $location, $remoteName, $address ) = @_;
1097     +sub validate_quota {
1098     + my ($c, $acct, $softlim, $hardlim ) = @_;
1099     + my $msg;
1100     +
1101     + my $rec = $adb->get($acct);
1102     + return $c->l('quo_ERR_NO_SUCH_ACCT') . ' : ' . $acct unless (defined $rec);
1103     +
1104     + my $type = $rec->prop('type');
1105     + unless ($type eq "user") {
1106     + $msg = $c->l('quo_ERR_NOT_A_USER_ACCT').$acct.$c->l('quo_ACCOUNT_IS_TYPE').$type;
1107     + return $msg;
1108     + }
1109     + my $uid = getpwnam($acct);
1110     + return $c->l('COULD_NOT_GET_UID').$acct unless ($uid);
1111     +
1112     + if (($softlim !~ /^(.+?)\s*([KMGT])?$/ ) || (!looks_like_number ($1))) {
1113     + return $c->l('quo_SOFT_VAL_MUST_BE_NUMBER');
1114     + }
1115     +
1116     + my $exponent = 1; # Entries with no suffix are assumed to be in megabytes.
1117     + if (defined ($2)) {
1118     + $exponent = index("KMGT",$2);
1119     + }
1120     + $softlim = ($1 * 1024 ** $exponent);
1121     +
1122     + if (($hardlim !~ /^(.+?)\s*([KMGT])?$/ ) || (!looks_like_number ($1))) {
1123     + return $c->l('quo_HARD_VAL_MUST_BE_NUMBER');
1124     + }
1125     + $exponent = 1; # Entries with no suffix are assumed to be in megabytes.
1126     + if (defined ($2))
1127     + {
1128     + $exponent = index("KMGT",$2);
1129     + }
1130     + $hardlim = ($1 * 1024 ** $exponent);
1131    
1132     #------------------------------------------------------------
1133     - # Validate parameters and untaint them
1134     + # Make sure that soft limit is less than hard limit.
1135     #------------------------------------------------------------
1136    
1137     - if ($name =~ /^([a-z][a-z0-9]*)$/) {
1138     - $name = $1;
1139     - } else {
1140     - return $c->l('quo_ERR_UNEXPECTED_NAME') . ': ' . $name;
1141     - }
1142     -
1143     - if ($description =~ /^([\'\w\s]+)$/) {
1144     - $description = $1;
1145     - } else {
1146     - return $c->l('quo_ERR_UNEXPECTED_DESC') . ': ' . $description;
1147     - }
1148     -
1149     - if ($location =~ /^(.*)$/) {
1150     - $location = $1;
1151     - } else {
1152     - $location = "lp0";
1153     + unless ($hardlim == 0 or $hardlim > $softlim) {
1154     + return $c->l('quo_ERR_HARD_LT_SOFT');
1155     }
1156    
1157     #------------------------------------------------------------
1158     - # Looks good. Find out if this printer has been taken
1159     + # Update accounts database and signal the user-modify event.
1160     #------------------------------------------------------------
1161    
1162     - my $rec = $adb->get($name);
1163     - my $type;
1164     - if ($rec and ($type = $rec->prop('type'))) {
1165     - return $c->l('quo_ERR_EXISTS') . ' : ' . $name;
1166     - }
1167     + $rec->set_prop('MaxBlocks', $hardlim);
1168     + $rec->set_prop('MaxBlocksSoftLim', $softlim);
1169     +
1170     + # Untaint $acct before using in system().
1171     + $acct =~ /^(\w[\-\w_\.]*)$/; $acct = $1;
1172     + system ("/sbin/e-smith/signal-event", "user-modify", "$acct") == 0
1173     + or die ($c->l('quo_ERR_MODIFYING')."\n");
1174    
1175     return 'OK';
1176     }
1177     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm
1178     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2019-12-31 08:55:14.000000000 +0400
1179     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2019-12-24 15:57:15.000000000 +0400
1180     @@ -13,7 +13,6 @@
1181     #use esmith::FormMagick::Panel::wbl;
1182     use smeserver::Panel::wblNew;
1183    
1184     -##our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
1185    
1186     sub main {
1187     my $c = shift;
1188     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm
1189     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2019-12-31 08:55:14.000000000 +0400
1190     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2019-12-24 16:05:01.000000000 +0400
1191     @@ -10,7 +10,6 @@
1192     use esmith::FormMagick::Panel::workgroup;
1193    
1194     our $db = esmith::ConfigDB->open || die "Couldn't open config db";
1195     -#our $db = esmith::ConfigDB->open('conf/test/configuration') || die "Couldn't open config db";
1196    
1197     sub main {
1198     my $c = shift;
1199     @@ -48,27 +47,15 @@
1200     $res = validate2_servername($c, $servername);
1201     $result .= $res unless $res eq 'OK';
1202    
1203     - #$db->get('smb')->set_prop('Workgroup', $workgroup);
1204     - #$db->get('smb')->set_prop('ServerRole', $serverrole);
1205     - #$db->get('smb')->set_prop('ServerName', $servername);
1206     - #$db->get('smb')->set_prop('RoamingProfiles', $roamingprofiles);
1207     -
1208     - my $prop_upd = 'configuration setprop smb ';
1209     - $prop_upd .= "Workgroup $workgroup ServerRole $serverrole ServerName $servername RoamingProfiles $roamingprofiles";
1210     - #
1211     - # Update the db config
1212     - #
1213     -# system ('/bin/sudo', '/sbin/e-smith/db', 'configuration', 'setprop', 'smb', 'Workgroup', $workgroup,
1214     -# 'ServerRole', $serverrole, 'ServerName', $servername, 'RoamingProfiles', $roamingprofiles) == 0
1215     - system ( '/bin/sudo', '/sbin/e-smith/db', split( / /, $prop_upd ) ) == 0
1216     - or $result = $c->l('ERROR_UPDATING') . " db config: " . $prop_upd;
1217     - #
1218     - # Update the system
1219     - #
1220     if ($result eq '') {
1221     - system ('/bin/sudo', '/sbin/e-smith/signal-event', 'workgroup-update') == 0
1222     - or $result = $c->l('ERROR_UPDATING') . " system";
1223     + $db->get('smb')->set_prop('Workgroup', $workgroup);
1224     + $db->get('smb')->set_prop('ServerRole', $serverrole);
1225     + $db->get('smb')->set_prop('ServerName', $servername);
1226     + $db->get('smb')->set_prop('RoamingProfiles', $roamingprofiles);
1227     }
1228     +
1229     + system( "/sbin/e-smith/signal-event", "workgroup-update" ) == 0
1230     + or $result = $c->l('ERROR_UPDATING') . " system";
1231    
1232     my $title = $c->l('wkg_FORM_TITLE');
1233    
1234     @@ -76,6 +63,7 @@
1235    
1236     $c->stash( title => $title, modul => $result );
1237     $c->render(template => 'module');
1238     +
1239     };
1240    
1241    
1242     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm
1243     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2019-12-31 08:55:14.000000000 +0400
1244     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2019-12-26 23:18:10.000000000 +0400
1245     @@ -974,6 +974,37 @@
1246     'quo_SUCCESSFULLY_MODIFIED' => 'Successfully modified quota for user account: ',
1247     'quo_Quotas' => 'Quotas',
1248    
1249     +'grp_FORM_TITLE' => 'Create, modify, or remove user groups',
1250     +'grp_GROUP_TOO_LONG' => 'Error: group name is too long.The maximum is {$maxLength} characters.',
1251     +'grp_ACCOUNT_CONFLICT' => 'Error: the group "{$group}" can\'t be created because there is
1252     +already a {$type} account of that name.',
1253     +'grp_INVALID_GROUP_DESCRIPTION' => 'Error: unexpected or missing characters in group description',
1254     +'grp_NO_MEMBERS' => 'Error: no members in group.Did not create new group.',
1255     +'grp_CREATED_GROUP' => 'Successfully created user group',
1256     +'grp_DELETED_GROUP' => 'Successfully removed user group',
1257     +'grp_MODIFIED_GROUP' => 'Successfully modifed user group',
1258     +'grp_CREATE_ERROR' => 'An error occurred while creating user group.',
1259     +'grp_DELETE_ERROR' => 'An error occurred while removing user group.',
1260     +'grp_MODIFY_ERROR' => 'An error occurred while modifying user group.',
1261     +'grp_GROUP_NAMING' => 'The group name should contain only lower-case
1262     +letters, numbers, hyphens, periods, and underscores,
1263     +and should start with a lower-case letter. For
1264     +example "sales", "beta5", and "reseller_partners" are
1265     +all valid group names, but "3rd-event", "Marketing Team"
1266     +and "lost&found" are not.',
1267     +'grp_GROUP_HAS_MEMBERS' => 'This group contains the following members:',
1268     +'grp_NOT_A_GROUP' => 'Error: That is not an existing group account.',
1269     +'grp_GROUP_DESC' => 'Brief Description/Windows Group Alias',
1270     +'grp_GROUP_DESC_EXPL' => 'Input a brief group description in the field below.
1271     + This field also designates the group name viewable by
1272     + Windows clients.',
1273     +'grp_IBAYS_WILL_BE_CHANGED' => 'The following information bays were assigned to this group and
1274     +will be changed to the Administrator group (you can change them to
1275     +something else afterward):',
1276     +'grp_CONFIRM_DELETE_GROUP' => 'Are you sure you wish to remove this group?',
1277     +'grp_CURRENT_LIST' => 'Current list of User Groups',
1278     +'grp_DELETE_DESCRIPTION' => 'You are about to remove the user group "{$group}."',
1279     +
1280     );
1281    
1282    
1283     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm
1284     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm 2019-12-31 08:55:14.000000000 +0400
1285     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm 2019-12-26 23:18:48.000000000 +0400
1286     @@ -672,6 +672,27 @@
1287     'quo_SUCCESSFULLY_MODIFIED' => 'Modification réussie du quota pour compte utilisateur',
1288     'quo_Quotas' => 'Quotas',
1289    
1290     +'grp_FORM_TITLE' => 'Gestion des groupes d\'utilisateurs',
1291     +'grp_GROUP_TOO_LONG' => 'ERREUR : le nom du groupe est trop long : {$maxLength} caractères au maximum.',
1292     +'grp_ACCOUNT_CONFLICT' => 'ERREUR : le groupe "{$group}" ne peut être créé car il existe déjà un compte {$type} avec ce nom.',
1293     +'grp_INVALID_GROUP_DESCRIPTION' => 'ERREUR : caractères inattendus ou manquants dans la description du groupe.',
1294     +'grp_NO_MEMBERS' => 'ERREUR : aucun membre dans le groupe. Le groupe n\'a pas été créé.',
1295     +'grp_CREATED_GROUP' => 'Le groupe d\'utilisateurs a été créé avec succès.',
1296     +'grp_DELETED_GROUP' => 'Le groupe d\'utilisateurs a été supprimé avec succès.',
1297     +'grp_MODIFIED_GROUP' => 'Le groupe d\'utilisateurs a été modifié avec succès.',
1298     +'grp_CREATE_ERROR' => 'Une erreur est survenue lors de la création du groupe d\'utilisateurs.',
1299     +'grp_DELETE_ERROR' => 'Une erreur est survenue lors de la suppression du groupe d\'utilisateurs.',
1300     +'grp_MODIFY_ERROR' => 'Une erreur est survenue lors de la modification du groupe d\'utilisateurs.',
1301     +'grp_GROUP_NAMING' => ' Le nom de groupe doit contenir uniquement des lettres minuscules, des chiffres, des traits d\'union, des points, des traits de soulignement et commencer par une minuscule. Par exemple, "ventes", "beta5" ou "partenaires_ventes" sont tous des noms de groupe valides, mais pas "3e-événement", "Groupe Marketing" ni "perdu&trouvé". ',
1302     +'grp_GROUP_HAS_MEMBERS' => 'Ce groupe contient les membres suivants :',
1303     +'grp_NOT_A_GROUP' => 'ERREUR : Compte de groupe inexistant.',
1304     +'grp_GROUP_DESC' => 'Brève description / Alias de groupe Windows',
1305     +'grp_GROUP_DESC_EXPL' => 'Tapez une brève description du groupe dans le champ ci-dessous. Ce champ correspond également au nom du groupe visible par les clients Windows.',
1306     +'grp_IBAYS_WILL_BE_CHANGED' => 'Les i-bays suivantes étaient attribuées à ce groupe et vont être réattribuées au groupe de l\'administrateur (vous pourrez par la suite les attribuer à un autre groupe) :',
1307     +'grp_CONFIRM_DELETE_GROUP' => ' <b>Voulez-vous vraiment supprimer ce groupe ?</b> ',
1308     +'grp_CURRENT_LIST' => ' Liste actuelle des groupes d\'utilisateurs : ',
1309     +'grp_DELETE_DESCRIPTION' => ' Vous êtes sur le point de supprimer le groupe d\'utilisateurs "<b>{$group}</b>". ',
1310     +
1311     );
1312    
1313    
1314     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl
1315     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2019-12-31 08:55:14.000000000 +0400
1316     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2019-12-29 23:45:41.000000000 +0400
1317     @@ -72,32 +72,48 @@
1318    
1319     my $r = app->routes;
1320     $r->namespaces(['SrvMngr::Controller']);
1321     +
1322     $r->get('/')->to('initial#main')->name('initial');
1323     $r->get('/bugreport')->to('bugreport#main')->name('bugreport');
1324     $r->post('/bugreport')->to('bugreport#do_report')->name('bugreport2');
1325     +$r->post('/bugreportD')->to('bugreport#download_config_report')->name('bugreportD');
1326     +
1327     $r->get('/clamav')->to('clamav#main')->name('clamav');
1328     $r->post('/clamav')->to('clamav#do_update')->name('clamav2');
1329     $r->get('/datetime')->to('datetime#main')->name('datetime');
1330     $r->post('/datetime')->to('datetime#do_update')->name('datetime2');
1331     $r->get('/directory')->to('directory#main')->name('directory');
1332     $r->post('/directory')->to('directory#do_update')->name('directory2');
1333     +
1334     +$r->get('/groups')->to('groups#main')->name('groups');
1335     +$r->post('/groups')->to('groups#do_display')->name('groupadd1');
1336     +$r->post('/groupadd')->to('groups#do_update')->name('groupadd2');
1337     +$r->get('/groupupd')->to('groups#do_display')->name('groupupd1');
1338     +$r->post('/groupupd')->to('groups#do_update')->name('groupupd2');
1339     +$r->get('/groupdel')->to('groups#do_display')->name('groupdel1');
1340     +$r->post('/groupdel')->to('groups#do_update')->name('groupdel2');
1341     +
1342     $r->get('/logout')->to('main#logout')->name('logout');
1343     $r->get('/manual')->to('manual#main')->name('manual');
1344     +
1345     $r->get('/printers')->to('printers#main')->name('printers');
1346     $r->post('/printers')->to('printers#do_display')->name('printeradd');
1347     $r->get('/printers2')->to('printers#do_update')->name('printernet');
1348     $r->post('/printers2')->to('printers#do_update')->name('printerupd');
1349     -#$r->post('/printers3')->to('printers#do_update')->name('printernet');
1350     -#$r->get('/printers/:printer' => {printer => qr/^([a-z][a-z0-9]*)$/})->to('printers#do_display')->name('printerdel');
1351     +# $r->post('/printers3')->to('printers#do_update')->name('printernet');
1352     +# $r->get('/printers/:printer' => {printer => qr/^([a-z][a-z0-9]*)$/})->to('printers#do_display')->name('printerdel');
1353     $r->get('/printdel')->to('printers#do_display')->name('printerdel');
1354     $r->post('/printdel')->to('printers#do_update')->name('printerdel2');
1355     $r->get('/proxy')->to('proxy#main')->name('proxy');
1356     $r->post('/proxy')->to('proxy#do_update')->name('proxy2');
1357     $r->get('/qmailanalog')->to('qmailanalog#main')->name('qmailanalog');
1358     $r->post('/qmailanalog')->to('qmailanalog#do_update')->name('qmailanalog2');
1359     +
1360     $r->get('/quota')->to('quota#main')->name('quota');
1361     $r->get('/quotaupd')->to('quota#do_display')->name('quotalist');
1362     $r->post('/quotaupd')->to('quota#do_update')->name('quotaupd');
1363     +$r->post('/quota2')->to('quota#do_update')->name('quotaval');
1364     +
1365     $r->get('/review')->to('review#main')->name('review');
1366     $r->get('/starterwebsite')->to('starterwebsite#main')->name('starterwebsite');
1367     $r->post('/starterwebsite')->to('starterwebsite#do_site')->name('starterwebsite2');
1368     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js
1369     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js 2019-12-31 08:55:14.000000000 +0400
1370     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation.js 2019-12-31 17:17:43.000000000 +0400
1371     @@ -13,12 +13,16 @@
1372     tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
1373     }else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}}
1374    
1375     + // language en
1376     //This swap the class of the selected item.
1377     function swapClasses() {
1378     var arg=swapClasses.arguments;
1379     swapClass(0,'none','item-current','item','a');
1380     swapClass(0,'none','warn-current','warn','a');
1381     swapClass(0,arg[0],'item-current','item','a');
1382     + //swapClass(0,'none','item-current accent','item accent','a');
1383     + //swapClass(0,'none','warn-current accent','warn accent','a');
1384     + //swapClass(0,arg[0],'item-current accent','item accent','a');
1385     }
1386    
1387     // End script hiding -->
1388     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport2.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport2.html.ep
1389     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport2.html.ep 1970-01-01 04:00:00.000000000 +0400
1390     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport2.html.ep 2019-12-26 18:11:16.000000000 +0400
1391     @@ -0,0 +1,28 @@
1392     +% layout 'default', title => 'Sme server 2 - Bug report 2';
1393     +
1394     +% content_for 'module' => begin
1395     +
1396     +<div id="module">
1397     +
1398     + % if ($config->{debug} == 1) {
1399     + <p>
1400     + (DBG)route: <%= $c->current_route %><br>
1401     + (DBG)trt: <%= $bugr_datas->{trt} %><br>
1402     + </p>
1403     + % }
1404     +
1405     + <h1><%= $title %></h1>
1406     +
1407     + <br><%= $modul %><br>
1408     +
1409     + <p>
1410     + <% my $btn = l('bugr_Download this report'); %>
1411     +
1412     + %= form_for 'bugreportD' => (method => 'POST') => begin
1413     + %= submit_button "$btn", class => 'action'
1414     + %= hidden_field 'trt' => $bugr_datas->{trt}
1415     + % end
1416     +
1417     +</div>
1418     +
1419     +%end
1420     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport.html.ep
1421     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport.html.ep 2019-12-31 08:55:14.000000000 +0400
1422     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/bugreport.html.ep 2019-12-26 00:05:23.000000000 +0400
1423     @@ -1,69 +1,78 @@
1424     % layout 'default', title => 'Sme server 2 - Bug report';
1425    
1426     % content_for 'module' => begin
1427     +
1428     <div id="module">
1429     - <p> <%= $c->current_route %></p><br>
1430     - <h1><%= $title %></h1>
1431    
1432     + % if ($config->{debug} == 1) {
1433     + <p>
1434     + (DBG)route: <%= $c->current_route %><br>
1435     + (DBG)trt: <%= $bugr_datas->{trt} %><br>
1436     + </p>
1437     + % }
1438     +
1439     + <h1><%= $title %></h1>
1440     <!--br><%= $modul %><br-->
1441     -<p>
1442     -<p><b>
1443     -%=l ('bugr_DO_NOT_PANIC')
1444     -</b></p>
1445     -<p>
1446     -%=l ('bugr_SME_EXPERIENCE')
1447     -</p><p>
1448     -%=l ('bugr_PLEASE_REPORT_HERE')
1449     -</p><p>
1450     -%=l ('bugr_USE_TEMPLATE')
1451     -</p><p>
1452     -%=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
1453     -</p><p>
1454     -%=l ('bugr_REPORT_CONTENT')
1455     -<br><ul><li>
1456     -%=l ('bugr_SME_VERSION')
1457     -</li><li>
1458     -%=l ('bugr_SERVER_MODE')
1459     -</li><li>
1460     -%=l ('bugr_KERNEL_AND_ARCH')
1461     -</li><li>
1462     -%=l ('bugr_INSTALLED_RPMS')
1463     -</li><li>
1464     -%=l ('bugr_ALTERED_TEMPLATES')
1465     -</li><li>
1466     -%=l ('bugr_ALTERED_EVENTS')
1467     -</li><li>
1468     -%=l ('bugr_YUM_REPOS')
1469     -</li><br></ul>
1470     -%=l ('bugr_PRIVACY')
1471     -</p><p>
1472     -<% my $btn = l('bugr_CREATE_REPORT'); %>
1473     -
1474     -%= form_for 'bugreport' => (method => 'POST') => begin
1475     - %= submit_button "$btn", class => 'action'
1476     -% end
1477     -
1478     -</p><p><b>
1479     -%=l ('bugr_DONATING')
1480     -</b><br><br>
1481     -%=l ('bugr_AWARE_SME')
1482     -<br><br><b>
1483     -%=l ('bugr_YOUR_HELP')
1484     -</b><br><br>
1485     -%=l ('bugr_CONSIDER_DONATING')
1486     -<br><br>
1487     -<%= link_to 'https://wiki.koozali.org/Donate' => begin %>
1488     -%= image 'images/btn_donateCC_LG.gif'
1489     -<% end %>
1490     -<br>
1491     -%=l ('bugr_THANK_YOU')
1492     -</p>
1493     -<!--
1494     -%=l ('bugr_Download this report')
1495     -%=l (' a bug')
1496     --->
1497     <p>
1498     - %= link_to Back => '/'
1499     +
1500     + <p><b>
1501     + %=l ('bugr_DO_NOT_PANIC')
1502     + </b></p>
1503     + <p>
1504     + %=l ('bugr_SME_EXPERIENCE')
1505     + </p><p>
1506     + %=l ('bugr_PLEASE_REPORT_HERE')
1507     + </p><p>
1508     + %=l ('bugr_USE_TEMPLATE')
1509     + </p><p>
1510     + %=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP')
1511     + </p><p>
1512     + %=l ('bugr_REPORT_CONTENT')
1513     + <br><ul><li>
1514     + %=l ('bugr_SME_VERSION')
1515     + </li><li>
1516     + %=l ('bugr_SERVER_MODE')
1517     + </li><li>
1518     + %=l ('bugr_KERNEL_AND_ARCH')
1519     + </li><li>
1520     + %=l ('bugr_INSTALLED_RPMS')
1521     + </li><li>
1522     + %=l ('bugr_ALTERED_TEMPLATES')
1523     + </li><li>
1524     + %=l ('bugr_ALTERED_EVENTS')
1525     + </li><li>
1526     + %=l ('bugr_YUM_REPOS')
1527     + </li><br></ul>
1528     + %=l ('bugr_PRIVACY')
1529     + </p><p>
1530     +
1531     + <% my $btn = l('bugr_CREATE_REPORT'); %>
1532     +
1533     + %= form_for 'bugreport' => (method => 'POST') => begin
1534     + %= submit_button "$btn", class => 'action'
1535     + % end
1536     +
1537     + </p><p><b>
1538     + %=l ('bugr_DONATING')
1539     + </b><br><br>
1540     + %=l ('bugr_AWARE_SME')
1541     + <br><br><b>
1542     + %=l ('bugr_YOUR_HELP')
1543     + </b><br><br>
1544     + %=l ('bugr_CONSIDER_DONATING')
1545     + <br><br>
1546     +
1547     + %= link_to 'https://wiki.koozali.org/Donate' => begin
1548     + %= image 'images/btn_donateCC_LG.gif'
1549     +
1550     + %= hidden_field 'trt' => $bugr_datas->{trt}
1551     +
1552     + % end
1553     +
1554     + <br>
1555     + %=l ('bugr_THANK_YOU')
1556     </p>
1557     +
1558     </div>
1559     +
1560     %end
1561     \ Pas de fin de ligne à la fin du fichier
1562     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep
1563     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep 1970-01-01 04:00:00.000000000 +0400
1564     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep 2019-12-29 10:25:46.000000000 +0400
1565     @@ -0,0 +1,29 @@
1566     +% layout 'default', title => "Sme server 2 - groups", share_dir => './';
1567     +
1568     +% content_for 'module' => begin
1569     +<div id="module">
1570     +
1571     + % if ($config->{debug} == 1) {
1572     + <p>
1573     + %= dumper $c->current_route
1574     + %= dumper $grp_datas
1575     + </p>
1576     + % }
1577     +
1578     + <h1><%= $title%></h1>
1579     +
1580     + %= $modul
1581     +
1582     + % if ($grp_datas->{trt} eq 'ADD') {
1583     + %= include 'partials/_grp_add'
1584     + %} elsif ($grp_datas->{trt} eq 'DEL') {
1585     + %= include 'partials/_grp_del'
1586     + %} elsif ($grp_datas->{trt} eq 'UPD') {
1587     + %= include 'partials/_grp_upd'
1588     + %} else {
1589     + %= include 'partials/_grp_list'
1590     + %}
1591     +
1592     +</div>
1593     +%end
1594     +
1595     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep
1596     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2019-12-31 08:55:14.000000000 +0400
1597     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2019-12-11 20:13:15.000000000 +0400
1598     @@ -9,7 +9,7 @@
1599     <meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
1600     <link rel="stylesheet" type="text/css" media="all" href='css/sme_core.css'>
1601     <link rel="stylesheet" type="text/css" media="all" href='css/sme_main.css'>
1602     - <link rel="stylesheet" type="text/css" media="all" href='css/sme_menu.css'>
1603     + <!--link rel="stylesheet" type="text/css" media="all" href='css/sme_menu.css'-->
1604     <link rel="stylesheet" type="text/css" media="all" href='css/styles.css'>
1605     %= include 'partials/_head'
1606     </head>
1607     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep
1608     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 1970-01-01 04:00:00.000000000 +0400
1609     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 2020-01-04 11:12:11.922000000 +0400
1610     @@ -0,0 +1,60 @@
1611     +<div id='prt_add'>
1612     +
1613     + % my $btn = l('ADD');
1614     +
1615     + <!-- % = dumper $users -->
1616     +
1617     + %= form_for '/groupadd' => (method => 'POST') => begin
1618     + <p>
1619     + <h2>
1620     + %=l 'CREATE_GROUP'
1621     + </h2>
1622     + <br><br>
1623     + %=l 'grp_GROUP_NAMING'
1624     + </p>
1625     +
1626     + <p>
1627     + <span class=label>
1628     + %=l 'GROUP_NAME', class => 'label'
1629     + </span><span class=data>
1630     + %= text_field 'groupName', class => 'input'
1631     + </span>
1632     + </p>
1633     +
1634     + <p>
1635     + %=l 'grp_GROUP_DESC_EXPL'
1636     + <br><br>
1637     + <span class=label>
1638     + %=l 'grp_GROUP_DESC', class => 'label'
1639     + </span><span class=data>
1640     + %= text_field 'groupDesc', class => 'input'
1641     + </span>
1642     + </p>
1643     +
1644     + <p>
1645     + <span class=label>
1646     + %=l 'GROUP_MEMBERS', class => 'label'
1647     + </span>
1648     + <br>
1649     + %= check_box 'groupMembers' => 'admin'
1650     + Administrator (admin)
1651     + <br>
1652     + % foreach my $key ( keys %$users )
1653     + % {
1654     + %= check_box 'groupMembers' => $key
1655     + %=$users->{$key}
1656     + %= "(" . $key . ")"
1657     + <br>
1658     + % }
1659     + </p>
1660     +
1661     + <p>
1662     + <br><br>
1663     + %= submit_button "$btn", class => 'action'
1664     + </p>
1665     +
1666     + %= hidden_field 'trt' => $grp_datas->{trt}
1667     +
1668     + % end
1669     +
1670     +</div>
1671     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep
1672     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 1970-01-01 04:00:00.000000000 +0400
1673     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 2019-12-29 17:49:30.000000000 +0400
1674     @@ -0,0 +1,68 @@
1675     +<div id='grp_del'>
1676     +
1677     + % my $btn = l('REMOVE');
1678     + %= form_for '/groupdel' => (method => 'POST') => begin
1679     + <p>
1680     + <h2>
1681     + %=l 'REMOVE_USER_GROUP'
1682     + </h2>
1683     +
1684     + <p>
1685     + %=l 'grp_DELETE_DESCRIPTION'
1686     + %=$grp_datas->{group}
1687     + (
1688     + %=$grp_datas->{description}
1689     + )
1690     + </p>
1691     +
1692     + <p>
1693     + % my $size = keys %$members;
1694     + % if ( ! $size ){
1695     + %=l 'ACCOUNT_GROUP_NONE'
1696     + % } else {
1697     + %=l 'grp_GROUP_HAS_MEMBERS'
1698     + <br>
1699     + <ul>
1700     + % foreach my $key ( keys %$members)
1701     + % {
1702     + <li>
1703     + %=$key
1704     + (
1705     + %=$members->{$key}
1706     + )
1707     + </li>
1708     + % }
1709     + </ul>
1710     + % }
1711     + </p>
1712     +
1713     + <p>
1714     + % $size = keys %$ibays;
1715     + % if ( $size ) {
1716     + %=l 'grp_IBAYS_WILL_BE_CHANGED'
1717     + <br>
1718     + <ul>
1719     + % foreach my $key (sort ( keys %$ibays ))
1720     + % {
1721     + <li>
1722     + %=$key
1723     + (
1724     + %=$ibays->{$key}
1725     + )
1726     + </li>
1727     + % }
1728     + </ul>
1729     + % }
1730     + </p>
1731     +
1732     + <p>
1733     + <br>
1734     + %= submit_button "$btn", class => 'action'
1735     + </p>
1736     +
1737     + %= hidden_field 'trt' => $grp_datas->{trt}
1738     + %= hidden_field 'group' => $grp_datas->{group}
1739     +
1740     + % end
1741     +
1742     +</div>
1743     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep
1744     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep 1970-01-01 04:00:00.000000000 +0400
1745     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep 2019-12-31 17:10:14.000000000 +0400
1746     @@ -0,0 +1,57 @@
1747     +<div id='grp_list'>
1748     +
1749     +
1750     + % my $btn = l('GROUP_ADD');
1751     +
1752     + %= form_for '/groups' => (method => 'POST') => begin
1753     +
1754     + <p>
1755     + <br>
1756     + %= submit_button "$btn", class => 'action'
1757     + </p>
1758     +
1759     + <p>
1760     + <h2>
1761     + %=l 'grp_CURRENT_LIST'
1762     + </h2>
1763     + <br><br>
1764     + % my $numGroups = @$groups;
1765     + % if ($numGroups == 0){
1766     + %=l 'grp_ACCOUNT_GROUP_NONE'
1767     + % } else {
1768     + <table class="sme-border"><tbody>
1769     + <tr>
1770     + <th class='sme-border'>
1771     + %=l 'GROUP'
1772     + </th>
1773     + <th class='sme-border'>
1774     + %=l 'DESCRIPTION'
1775     + </th>
1776     + <th class='sme-border' colspan='2'>
1777     +
1778     + %=l 'ACTION'
1779     + </th>
1780     + </tr>
1781     +
1782     + % foreach my $group ( @$groups)
1783     + % {
1784     + <tr>
1785     + %= t td => (class => 'sme-border') => $group->key
1786     + %= t td => (class => 'sme-border') => $group->prop('Description')
1787     + <!-- = t td => link_to l 'REMOVE' => url_for("/groups/delete/$group->key")
1788     + <td><a href="/server-manager2/printdel/<%= $group->key%>"><%=l 'REMOVE'%></a></td>
1789     + -->
1790     + <td class='sme-border'><a href="groupupd?trt=UPD&group=<%= $group->key%>"><%=l 'MODIFY'%></a></td>
1791     + <td class='sme-border'><a href="groupdel?trt=DEL&group=<%= $group->key%>"><%=l 'REMOVE'%></a></td>
1792     + </tr>
1793     + % }
1794     + </tbody>
1795     + </table>
1796     + <%} %>
1797     + </p>
1798     +
1799     + %= hidden_field 'trt' => $grp_datas->{trt}
1800     +
1801     + % end
1802     +
1803     +</div>
1804     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep
1805     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 1970-01-01 04:00:00.000000000 +0400
1806     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 2020-01-04 11:18:15.380000000 +0400
1807     @@ -0,0 +1,70 @@
1808     +<div id='grp_upd'>
1809     +
1810     + <!-- % dumper $members -->
1811     +
1812     + % my $btn = l('SAVE');
1813     +
1814     + %= form_for '/groupupd' => (method => 'POST') => begin
1815     + <p>
1816     + <h2>
1817     + %=l 'MODIFY_USER_GROUP'
1818     + </h2>
1819     + <br>
1820     + </p>
1821     +
1822     + <p>
1823     + <span class=label>
1824     + %=l 'GROUP_NAME', class => 'label'
1825     + </span><span class=data>
1826     + %= $grp_datas->{group}, class => 'data'
1827     + </span>
1828     + </p>
1829     +
1830     + <p>
1831     + %=l 'grp_GROUP_DESC_EXPL'
1832     + <br><br>
1833     + <span class=label>
1834     + %=l 'grp_GROUP_DESC', class => 'label'
1835     + </span><span class=data>
1836     + % param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc';
1837     + %= text_field 'groupDesc', class => 'input'
1838     + </span>
1839     + </p>
1840     +
1841     + <p>
1842     + <span class=label>
1843     + %=l 'GROUP_MEMBERS', class => 'label'
1844     + </span>
1845     + <br>
1846     +
1847     + % if ( $members->{'admin'} ) {
1848     + %= check_box 'groupMembers', value => 'admin', checked => 'checked'
1849     + %} else {
1850     + %= check_box 'groupMembers' => 'admin'
1851     + %}
1852     + Administrator (admin)
1853     + <br>
1854     +
1855     + % foreach my $key ( keys %$users )
1856     + % {
1857     + % if ( $members->{ $key } ) {
1858     + <!-- % = check_box 'groupMembers', value => $key, checked => 'checked' -->
1859     + <input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
1860     + %} else {
1861     + %= check_box 'groupMembers' => $key
1862     + %}
1863     + %=$users->{$key} . " (" . $key . ")"
1864     + <br>
1865     + % }
1866     + </p>
1867     +
1868     + <p>
1869     + <br><br>
1870     + %= submit_button "$btn", class => 'action'
1871     + </p>
1872     +
1873     + %= hidden_field 'trt' => $grp_datas->{trt}
1874     +
1875     + % end
1876     +
1877     +</div>
1878     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep
1879     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 2019-12-31 08:55:14.000000000 +0400
1880     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 2019-12-31 17:17:43.000000000 +0400
1881     @@ -4,37 +4,37 @@
1882     <div id="navigat">
1883    
1884     <div class='section'> Collaboration </div>
1885     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme1')" id='sme1' href='/server-manager/cgi-bin/useraccounts'>Users</a></div>
1886     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme2')" id='sme2' href='/server-manager/cgi-bin/groups'>Groups</a></div>
1887     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme3')" id='sme3' href='/server-manager2/quota'>Quotas</a></div>
1888     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme4')" id='sme4' href='/server-manager/cgi-bin/pseudonyms'>Pseudonyms</a></div>
1889     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme5')" id='sme5' href='/server-manager/cgi-bin/ibays'>Information bays</a></div>
1890     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme1')" id='sme1' href='/server-manager/cgi-bin/useraccounts'>Users</a></div>
1891     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme2')" id='sme2' href='/server-manager2/groups'>Groups</a></div>
1892     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme3')" id='sme3' href='/server-manager2/quota'>Quotas</a></div>
1893     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme4')" id='sme4' href='/server-manager/cgi-bin/pseudonyms'>Pseudonyms</a></div>
1894     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme5')" id='sme5' href='/server-manager/cgi-bin/ibays'>Information bays</a></div>
1895     <div class='section'> Administration </div>
1896     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme6')" id='sme6' href='/server-manager/cgi-bin/backup'>Backup or restore</a></div>
1897     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme7')" id='sme7' href='/server-manager/cgi-bin/viewlogfiles'>View log files</a></div>
1898     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme8')" id='sme8' href='/server-manager2/qmailanalog'>Mail log file analysis</a></div>
1899     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme9')" id='sme9' href='/server-manager/cgi-bin/reboot'>Reboot or shutdown</a></div>
1900     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme10')" id='sme10' href='/server-manager/cgi-bin/xt_geoip'>GeoIP IP filtering</a></div>
1901     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme6')" id='sme6' href='/server-manager/cgi-bin/backup'>Backup or restore</a></div>
1902     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme7')" id='sme7' href='/server-manager/cgi-bin/viewlogfiles'>View log files</a></div>
1903     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme8')" id='sme8' href='/server-manager2/qmailanalog'>Mail log file analysis</a></div>
1904     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme9')" id='sme9' href='/server-manager/cgi-bin/reboot'>Reboot or shutdown</a></div>
1905     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme10')" id='sme10' href='/server-manager/cgi-bin/xt_geoip'>GeoIP IP filtering</a></div>
1906     <div class='section'> Security </div>
1907     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme11')" id='sme11' href='/server-manager/cgi-bin/remoteaccess'>Remote access</a></div>
1908     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme12')" id='sme12' href='/server-manager/cgi-bin/localnetworks'>Local networks</a></div>
1909     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme13')" id='sme13' href='/server-manager/cgi-bin/portforwarding'>Port forwarding</a></div>
1910     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme14')" id='sme14' href='/server-manager2/proxy'>Proxy settings</a></div>
1911     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme11')" id='sme11' href='/server-manager/cgi-bin/remoteaccess'>Remote access</a></div>
1912     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme12')" id='sme12' href='/server-manager/cgi-bin/localnetworks'>Local networks</a></div>
1913     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme13')" id='sme13' href='/server-manager/cgi-bin/portforwarding'>Port forwarding</a></div>
1914     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme14')" id='sme14' href='/server-manager2/proxy'>Proxy settings</a></div>
1915     <div class='section'> Configuration </div>
1916     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme15')" id='sme15' href='/server-manager/cgi-bin/yum'>Software installer</a></div>
1917     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme16')" id='sme16' href='/server-manager2/datetime'>Date and time</a></div>
1918     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme17')" id='sme17' href='/server-manager2/workgroup'>Workgroup</a></div>
1919     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme18')" id='sme18' href='/server-manager2/directory'>Directory</a></div>
1920     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme19')" id='sme19' href='/server-manager2/printers'>Printers</a></div>
1921     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme20')" id='sme20' href='/server-manager/cgi-bin/hostentries'>Hostnames and addresses</a></div>
1922     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme21')" id='sme21' href='/server-manager/cgi-bin/domains'>Domains</a></div>
1923     - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme22')" id='sme22' href='/server-manager/cgi-bin/emailsettings'>E-mail</a></div>
1924     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme23')" id='sme23' href='/server-manager2/clamav'>Antivirus (ClamAV)</a></div>
1925     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme24')" id='sme24' href='/server-manager2/review'>Review configuration</a></div>
1926     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme15')" id='sme15' href='/server-manager/cgi-bin/yum'>Software installer</a></div>
1927     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme16')" id='sme16' href='/server-manager2/datetime'>Date and time</a></div>
1928     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme17')" id='sme17' href='/server-manager2/workgroup'>Workgroup</a></div>
1929     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme18')" id='sme18' href='/server-manager2/directory'>Directory</a></div>
1930     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme19')" id='sme19' href='/server-manager2/printers'>Printers</a></div>
1931     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme20')" id='sme20' href='/server-manager/cgi-bin/hostentries'>Hostnames and addresses</a></div>
1932     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme21')" id='sme21' href='/server-manager/cgi-bin/domains'>Domains</a></div>
1933     + <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme22')" id='sme22' href='/server-manager/cgi-bin/emailsettings'>E-mail</a></div>
1934     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme23')" id='sme23' href='/server-manager2/clamav'>Antivirus (ClamAV)</a></div>
1935     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme24')" id='sme24' href='/server-manager2/review'>Review configuration</a></div>
1936     <div class='section'> Miscellaneous </div>
1937     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme25')" id='sme25' href='/server-manager2/support'>Support and licensing</a></div>
1938     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme26')" id='sme26' href='/server-manager2/starterwebsite'>Create starter web site</a></div>
1939     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme27')" id='sme27' href='/server-manager2/bugreport'>Report a bug</a></div>
1940     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme25')" id='sme25' href='/server-manager2/support'>Support and licensing</a></div>
1941     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme26')" id='sme26' href='/server-manager2/starterwebsite'>Create starter web site</a></div>
1942     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme27')" id='sme27' href='/server-manager2/bugreport'>Report a bug</a></div>
1943     <div class='section'> Unknown </div>
1944     - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme28')" id='sme28' href='/server-manager2/wbl'>wbl</a></div>
1945     + <div class='menu-cell'><a class='item' class=' accent' target='_self' onclick="swapClasses('sme28')" id='sme28' href='/server-manager2/wbl'>wbl</a></div>
1946     </div>
1947     \ Pas de fin de ligne à la fin du fichier
1948     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_upd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_upd.html.ep
1949     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_upd.html.ep 2019-12-31 08:55:14.000000000 +0400
1950     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_upd.html.ep 2019-12-31 10:58:40.000000000 +0400
1951     @@ -57,6 +57,7 @@
1952     <span class=label>
1953     %=l 'quo_LIMIT_WITH_GRACE', class => 'label'
1954     </span><span class=data>
1955     + % param 'Soft' => $quo_datas->{softlim} unless param 'Soft';
1956     %= text_field 'Soft', class => 'input'
1957     </span>
1958     </p>
1959     @@ -65,6 +66,7 @@
1960     <span class=label>
1961     %=l 'quo_ABS_LIMIT', class => 'label'
1962     </span><span class=data>
1963     + % param 'Hard' => $quo_datas->{hardlim} unless param 'Hard';
1964     %= text_field 'Hard', class => 'input'
1965     </span>
1966     </p>
1967     @@ -75,24 +77,8 @@
1968     </p>
1969    
1970     %= hidden_field 'trt' => $quo_datas->{trt}
1971     + %= hidden_field 'user' => $quo_datas->{user}
1972    
1973     % end
1974    
1975     </div>
1976     -
1977     -<!--
1978     - $q->Tr (esmith::cgi::genCell ($q, $self->localise("USER_NAME")),
1979     - esmith::cgi::genCell ($q, $name)),
1980     - $q->Tr (esmith::cgi::genCell ($q, $self->localise('LIMIT_WITH_GRACE')),
1981     - esmith::cgi::genCell ($q,
1982     - $q->textfield (-name => 'soft',
1983     - -override => 1,
1984     - -default => $self->toBestUnit($bs),
1985     - -size => 12))),
1986     - $q->Tr (esmith::cgi::genCell ($q, $self->localise('ABS_LIMIT')),
1987     - esmith::cgi::genCell ($q,
1988     - $q->textfield (-name => 'hard',
1989     - -override => 1,
1990     - -default => $self->toBestUnit($bh),
1991     - -size => 12))));
1992     --->
1993     \ Pas de fin de ligne à la fin du fichier
1994     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep
1995     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep 2019-12-31 08:55:14.000000000 +0400
1996     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep 2019-12-31 11:06:38.000000000 +0400
1997     @@ -5,11 +5,15 @@
1998    
1999     % if ($config->{debug} == 1) {
2000     <p>
2001     - (DBG)route: <%= $c->current_route %><br>
2002     - (DBG)trt: <%= $quo_datas->{trt} %><br>
2003     + (DBG)route:
2004     + %= dumper $c->current_route
2005     + <!--br>
2006     + (DBG)datas:
2007     + %= dumper $quo_datas
2008     + -->
2009     </p>
2010     % }
2011     -
2012     +
2013     <h1><%= $title%></h1>
2014    
2015     %= $modul
2016     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/html/index.cgi smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/html/index.cgi
2017     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/html/index.cgi 2019-12-31 08:55:14.000000000 +0400
2018     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/html/index.cgi 1970-01-01 04:00:00.000000000 +0400
2019     @@ -1,6 +0,0 @@
2020     -#! /usr/bin/perl
2021     -#-wT
2022     -
2023     -exec("perl ./srvmngr.pl") if chdir "../cgi-bin/srvmngr";
2024     -
2025     -#exec("perl -T ./srvmngr.pl");
2026     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/html/index.pl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/html/index.pl
2027     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/html/index.pl 1970-01-01 04:00:00.000000000 +0400
2028     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/html/index.pl 2019-12-31 17:18:19.000000000 +0400
2029     @@ -0,0 +1,15 @@
2030     +#! /usr/bin/perl -wT
2031     +
2032     +use esmith::util;
2033     +
2034     +BEGIN
2035     +{
2036     + $0 =~ /^(.+)$/ms; $0 = $1; # Untaint script name
2037     + $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
2038     + $ENV{'SHELL'} = '/bin/bash';
2039     + $ENV{'HOME'} = '/root';
2040     + delete $ENV{'ENV'};
2041     + esmith::util::setRealToEffective();
2042     +}
2043     +
2044     +exec("perl ./srvmngr.pl") if chdir "../cgi-bin/srvmngr";

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