--- e-smith-manager-2.8.0/root/etc/e-smith/web/common/configuration_report.tmpl.ori 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-manager-2.8.0/root/etc/e-smith/web/common/configuration_report.tmpl 2017-04-15 16:07:53.616770604 -0400 @@ -0,0 +1,52 @@ +Configuration report created {$report_creation_time} + +================== +Base configuration +================== + +SME server version: {$releaseversion} +SME server mode: {$systemmode} +Running Kernel: {$curkernel} + + +=========================== +New RPMs not in base system +=========================== + +{ foreach $i (@newrpms) { + $OUT .= "$i"; + } +} + + + +=========================== +Custom and modified templates +=========================== +{ foreach $i (@templates) { + $OUT .= "$i"; + } +} + + + +=========================== +Modified events +=========================== +{ foreach $i (@events) { + $OUT .= "$i"; + } +} + + + +======================= +Additional repositories +======================= + +{ foreach $r (@repositories) { + $OUT .= "$r"; + } +} + +DONE! --- e-smith-manager-2.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm.ori 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-manager-2.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm 2017-04-16 17:12:17.077004028 -0400 @@ -0,0 +1,170 @@ +#!/usr/bin/perl -w +package esmith::FormMagick::Panel::bugreport; + +use strict; +use warnings; +use esmith::ConfigDB; +use esmith::FormMagick; +use Text::Template; +use File::Basename; + +our @ISA = qw(esmith::FormMagick Exporter); + +our @EXPORT = qw(); + +our $VERSION = sprintf '%d.%03d', q$Revision: 1.5 $ =~ /: (\d+).(\d+)/; + +our $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n"; + +# Get some basic info on the current SME install +our $sysconfig = $db->get('sysconfig'); +our $systemmode = $sysconfig->prop('PreviousSystemMode'); +our $releaseversion = $sysconfig->prop('ReleaseVersion'); + +# Prepare some filehandles for templates and reports +our $templatefile = '/tmp/bugreport_template.txt'; +our $configreportfile = '/tmp/configreport.txt'; + +sub new { + shift; + my $self = esmith::FormMagick->new(); + $self->{calling_package} = (caller)[0]; + if (defined($self->cgi->param('action')) && $self->cgi->param('action') eq 'download_config_report') { + download_config_report(); + return 0; + } + bless $self; + return $self; +} + +sub create_template +{ + # TBD +} + +sub display_page +{ + my $self = shift; + print "

". $self->localise('DO_NOT_PANIC') ."

\n"; + print "\t

". $self->localise('SME_EXPERIENCE') ."

\n"; + print "\t

". $self->localise('USE_TEMPLATE') .": https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs.

\n"; + print "\t

". $self->localise('PLEASE_REPORT_HERE') .": https://bugs.koozali.org.

"; + print "

"; + print "\n "; + print "

". $self->localise('FOLLOWING_REPORT_MIGHT_HELP') ."

\n"; + print "\t

". $self->localise('REPORT_CONTENT') .":

\n"; + print "\t\n"; + print "\t

". $self->localise('PRIVACY') ."

\n"; + print "

"; + print "\n"; + return ''; +} + +sub display_donation +{ + my $self = shift; + print "

". $self->localise('DONATING') ."

\n"; + print "\t

". $self->localise('AWARE_SME') ."

\n"; + print "\t

". $self->localise('YOUR_HELP') ."

\n"; + print "\t

". $self->localise('CONSIDER_DONATING') ."

\n"; + print '

+ + https://wiki.koozali.org/Donate +

'; + + print "\t

". $self->localise('THANK_YOU') ."

\n"; + print "

"; + print "\n "; + return ''; + +} + + +sub create_configuration_report +{ + my $fm = shift; + my $q = $fm->{'cgi'}; + + # TBD: possibly check $q for a boolean value eg. from a checkbox + # indicating the user has read privacy warning etc. + + # create the reporting template + my $configreport_template = Text::Template->new(TYPE => 'FILE', SOURCE => '/etc/e-smith/web/common/configuration_report.tmpl', UNTAINT => 1); + my $report_creation_time = $fm->gen_locale_date_string; + + # curent kernel + my $curkernel = `uname -r`; + + # get additional RPMs + my @newrpms = `/sbin/e-smith/audittools/newrpms`; + + # get additional Repositories + my @repositories = `/sbin/e-smith/audittools/repositories`; + #print @repositories; + + # get templates + my @templates = `/sbin/e-smith/audittools/templates`; + + # get events + my @events = `/sbin/e-smith/audittools/events`; + + + # set template variables + my %vars = (report_creation_time => \$report_creation_time, + releaseversion => \$releaseversion, + curkernel => \$curkernel, + systemmode => \$systemmode, + newrpms => \@newrpms, + templates => \@templates, + events => \@events, + repositories => \@repositories, + ); + + # prcess template + my $result = $configreport_template->fill_in(HASH => \%vars); + + # write processed template to file + open (my $cfgrep, '>', $configreportfile) or die "Could not create temporary file for config report!"; + print $cfgrep $result; + close $cfgrep; +} + +sub show_config_report { + my $fm = shift; + my $q = $fm->{'cgi'}; + print "
";
+    open (my $cfgrep, '<', $configreportfile) or die "Could not find temporary config report file!";
+    print while <$cfgrep>;
+    close $cfgrep;
+    print "
"; + # that would be too easy!? + print "".$fm->localise('Download this report').""; + return ""; + + +} + +sub download_config_report { + my $fm = shift; + my $q = $fm->{'cgi'}; + open (DLFILE, "<$configreportfile") or die "Could not access temporary file for config report!"; + my @fileholder = ; + close (DLFILE) || Error ('close', 'file'); + print "Content-Type:text/plain\n";#application/x-downloadn"; + print "Content-Disposition:attachment;filename=" . basename($configreportfile); + print "\n\n"; + print @fileholder ; + return ""; + +} + +1; --- e-smith-manager-2.8.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/bugreport.ori 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-manager-2.8.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/bugreport 2017-04-16 17:10:19.933143945 -0400 @@ -0,0 +1,97 @@ + + + + FORM_TITLE + Report a Bug + + + DO_NOT_PANIC + Don't Panic! + + + SME_EXPERIENCE + Unfortunately there is no software without bugs, and you probably came to this page because of an issue you are experiencing with your SME-server installation. + + + PLEASE_REPORT_HERE + In order to help developers to diagnose and fix your issue, please download one of the following text templates, fill it out and paste it into your bug report at + + + USE_TEMPLATE + Please refer to the following link on how to report efficiency a bug and use its template + + + FOLLOWING_REPORT_MIGHT_HELP + It will also help if you provide some vital information on the configuration of your SME-server in your bug report. By clicking on the "Create configuration report" button below, you can create and download a text file containing this information. Please attach this file to your bug report as well. + + + REPORT_CONTENT + The report will contain the following information + + + SME_VERSION + Koozali SME Server version + + + SERVER_MODE + Server mode + + + KERNEL_AND_ARCH + Current running kernel version and architecture + + + INSTALLED_RPMS + A list of additional RPMs installed on your server + + + ALTERED_TEMPLATES + A list of SME templates that have been altered on your server from a base install + + + ALTERED_EVENTS + A list of SME events that have been altered on your server from a base install + + + YUM_REPOS + A list of additional software repositories configured on your server + + + PRIVACY + No privacy related data (ie. users, passwords, IP addresses) will be included in the report. + + + CREATE_REPORT + Create configuration report + + + + DONATING + Have you considered donating? + + + AWARE_SME + You are probaly aware that SME server is developed and supported by a collaborative community of volunteers from all over the world. While SME server is free to download and use, maintaining the infrastructure behind the project (eg. hosting the forums and wiki, providing repositories and build servers etc.) costs real money in the real world. + + + YOUR_HELP + In very much the same way you need us to address your current issue, we need YOUR help to keep this project alive! + + + CONSIDER_DONATING + Please consider donating to the project by clicking on the image link below: + + + THANK_YOU + Thank you for your support! + + + Download this report + Download this report ! + + + Report a bug + Report a bug + + + --- e-smith-manager-2.8.0.old/createlinks 2017-04-16 17:51:06.112000000 -0400 +++ e-smith-manager-2.8.0/createlinks 2017-04-16 17:54:11.417000000 -0400 @@ -4,6 +4,7 @@ panel_link("navigation", "manager"); panel_link("noframes", "manager"); +panel_link("bugreport", "manager"); event_link("navigation-conf", 'bootstrap-console-save', 50); --- e-smith-manager-2.4.0/root/etc/e-smith/web/functions/bugreport.ori 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-manager-2.4.0/root/etc/e-smith/web/functions/bugreport 2017-04-16 17:12:49.209966162 -0400 @@ -0,0 +1,59 @@ +#!/usr/bin/perl -wT + +#---------------------------------------------------------------------- +# heading : Miscellaneous +# description : Report a bug +# navigation : 7000 7300 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +#---------------------------------------------------------------------- + +use strict; +use warnings; +use esmith::TestUtils; +use esmith::FormMagick::Panel::bugreport; + +my $f = esmith::FormMagick::Panel::bugreport->new(); +$f->display() if $f; + +=pod + +=head1 NAME + +bugreport -- report a bug + +=head2 DESCRIPTION + +This screen helps the administrator to submit helpful bug reports + +=begin testing + +=end testing + +=cut + +__DATA__ +
+ + + + + + + + + + + + + + +