From 88dc5ac86268a51d4939d86caf3b7909d87a6e10 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Mon, 7 Aug 2023 11:32:16 +0100 Subject: [PATCH] initial commit of file from CVS for e-smith-manager on Mon 7 Aug 11:32:16 BST 2023 --- .gitignore | 4 + Makefile | 21 + README.md | 18 +- additional/COPYING | 340 +++++++ additional/manager.c | 13 + contriborbase | 1 + createlinks | 79 ++ e-smith-manager.spec | 863 ++++++++++++++++++ .../httpd-admin/PermitPlainTextAccess | 1 + .../defaults/httpd-admin/TCPPort | 1 + .../configuration/defaults/httpd-admin/access | 1 + .../configuration/defaults/httpd-admin/status | 1 + .../configuration/defaults/httpd-admin/type | 1 + .../db/configuration/migrate/20TKTAuthSecret | 7 + .../e-smith/events/actions/navigation-conf | 153 ++++ .../en-us/etc/e-smith/web/functions/bugreport | 101 ++ .../common/cgi-bin/AuthTKT.cfg/manager_access | 9 + .../web/common/css/sme_core.css/50body | 229 +++++ .../common/css/sme_core.css/template-begin | 1 + .../web/common/css/sme_header.css/50body | 128 +++ .../common/css/sme_header.css/template-begin | 1 + .../web/common/css/sme_main.css/50body | 418 +++++++++ .../common/css/sme_main.css/template-begin | 1 + .../web/common/css/sme_menu.css/50body | 227 +++++ .../common/css/sme_menu.css/template-begin | 1 + .../web/common/css/sme_panel_menu.css/50body | 89 ++ .../css/sme_panel_menu.css/template-begin | 1 + .../etc/e-smith/web/common/css/tkt.css/50body | 36 + .../web/common/css/tkt.css/template-begin | 1 + .../etc/e-smith/web/common/foot.tmpl/10Setup | 20 + .../e-smith/web/common/foot.tmpl/25Copyright | 10 + .../etc/e-smith/web/common/foot.tmpl/90Finish | 10 + .../etc/e-smith/web/common/head.tmpl/10Setup | 12 + .../web/common/head.tmpl/30FrameSetup00 | 15 + .../web/common/head.tmpl/30FrameSetup01 | 54 ++ .../web/panels/manager/html/header.htm/10Head | 10 + .../web/panels/manager/html/header.htm/20Body | 1 + .../html/header.htm/30LayoutTableStart | 0 .../manager/html/header.htm/50HilightBar | 7 + .../panels/manager/html/header.htm/60InfoBar | 15 + .../manager/html/header.htm/70LayoutTableEnd | 0 .../web/panels/manager/html/header.htm/99End | 2 + .../manager/html/header.htm/template-begin | 10 + .../admin-conf/httpd.conf/01localAccessString | 22 + .../etc/httpd/admin-conf/httpd.conf/20Manager | 169 ++++ .../admin-conf/httpd.conf/20ManagerAuthTKT | 7 + .../admin-conf/httpd.conf/85DefaultAccess | 10 + .../httpd.conf/85ServerResourcesAccess | 8 + .../httpd.conf/90e-smithAccess15brand | 10 + .../httpd.conf/90e-smithAccess15common | 41 + .../httpd.conf/90e-smithAccess20manager | 42 + .../httpd.conf/90e-smithAccess20password | 13 + .../VirtualHosts/27ManagerProxyPass | 36 + .../templates/etc/services/20http-admin | 1 + root/etc/e-smith/web/common/cgi-bin/login | 355 +++++++ root/etc/e-smith/web/common/cgi-bin/logout | 127 +++ .../web/common/configuration_report.tmpl | 53 ++ root/etc/e-smith/web/common/css/tkt.css | 32 + root/etc/e-smith/web/common/sl_icon.gif | Bin 0 -> 942 bytes root/etc/e-smith/web/common/spacer.gif | Bin 0 -> 43 bytes root/etc/e-smith/web/common/warn.gif | Bin 0 -> 77 bytes root/etc/e-smith/web/functions/bugreport | 59 ++ root/etc/e-smith/web/functions/index.cgi | 36 + root/etc/e-smith/web/functions/initial.cgi | 36 + root/etc/e-smith/web/functions/navigation | 340 +++++++ root/etc/e-smith/web/functions/noframes | 1 + .../lib/systemd/system/httpd-admin.service | 25 + .../esmith/FormMagick/Panel/bugreport.pm | 173 ++++ root/var/.gitignore | 0 69 files changed, 4507 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 additional/COPYING create mode 100644 additional/manager.c create mode 100644 contriborbase create mode 100755 createlinks create mode 100644 e-smith-manager.spec create mode 100644 root/etc/e-smith/db/configuration/defaults/httpd-admin/PermitPlainTextAccess create mode 100644 root/etc/e-smith/db/configuration/defaults/httpd-admin/TCPPort create mode 100644 root/etc/e-smith/db/configuration/defaults/httpd-admin/access create mode 100644 root/etc/e-smith/db/configuration/defaults/httpd-admin/status create mode 100644 root/etc/e-smith/db/configuration/defaults/httpd-admin/type create mode 100644 root/etc/e-smith/db/configuration/migrate/20TKTAuthSecret create mode 100755 root/etc/e-smith/events/actions/navigation-conf create mode 100644 root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/bugreport create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg/manager_access create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_core.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_core.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_header.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_header.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_main.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_main.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_menu.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_menu.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_panel_menu.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/sme_panel_menu.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/tkt.css/50body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/css/tkt.css/template-begin create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/10Setup create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/25Copyright create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/90Finish create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/head.tmpl/10Setup create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/head.tmpl/30FrameSetup00 create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/common/head.tmpl/30FrameSetup01 create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/10Head create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/20Body create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/30LayoutTableStart create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/50HilightBar create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/60InfoBar create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/70LayoutTableEnd create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/99End create mode 100644 root/etc/e-smith/templates/etc/e-smith/web/panels/manager/html/header.htm/template-begin create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/01localAccessString create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20ManagerAuthTKT create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/85DefaultAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/85ServerResourcesAccess create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess15brand create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess15common create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess20manager create mode 100644 root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess20password create mode 100644 root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27ManagerProxyPass create mode 100644 root/etc/e-smith/templates/etc/services/20http-admin create mode 100644 root/etc/e-smith/web/common/cgi-bin/login create mode 100644 root/etc/e-smith/web/common/cgi-bin/logout create mode 100644 root/etc/e-smith/web/common/configuration_report.tmpl create mode 100644 root/etc/e-smith/web/common/css/tkt.css create mode 100644 root/etc/e-smith/web/common/sl_icon.gif create mode 100644 root/etc/e-smith/web/common/spacer.gif create mode 100644 root/etc/e-smith/web/common/warn.gif create mode 100644 root/etc/e-smith/web/functions/bugreport create mode 100644 root/etc/e-smith/web/functions/index.cgi create mode 100644 root/etc/e-smith/web/functions/initial.cgi create mode 100755 root/etc/e-smith/web/functions/navigation create mode 120000 root/etc/e-smith/web/functions/noframes create mode 100644 root/usr/lib/systemd/system/httpd-admin.service create mode 100644 root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm create mode 100644 root/var/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e594810 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tar.xz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4dc8851 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: e-smith-manager +# $Id: Makefile,v 1.1 2016/02/05 22:38:38 stephdl Exp $ +NAME := e-smith-manager +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 6217feb..ded59cd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -# e-smith-manager +# e-smith-manager -SMEServer Koozali developed git repo for e-smith-manager smeserver \ No newline at end of file +SMEServer Koozali developed git repo for e-smith-manager smeserver + +## Wiki +
https://wiki.koozali.org/ + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-manager&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +The e-smith-manager software is a powerful and easy-to-use server management solution for small and medium-sized businesses. It provides a comprehensive set of tools for managing and configuring multiple servers. e-smith-manager has an intuitive graphical user interface that makes it easy to set up and manage a server or a network of servers. It offers a range of features and options for managing users, groups, files, databases, mail, web applications, and security. e-smith-manager is available for both Windows and Linux operating systems, making it an ideal solution for businesses with multiple server environments. It also offers a wide range of documentation and support for users, making it easy to get up and running with this powerful solution. diff --git a/additional/COPYING b/additional/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/additional/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/additional/manager.c b/additional/manager.c new file mode 100644 index 0000000..200c1cb --- /dev/null +++ b/additional/manager.c @@ -0,0 +1,13 @@ +#include +#include +#include +#include +#define CGI_PATH "/etc/e-smith/web/functions/" + +main(int argc, char *argv[]) +{ + char cmd[50]; + sprintf(cmd, "%s%s", CGI_PATH, basename(argv[0])); + execv(cmd, argv); + return 0; +} diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/createlinks b/createlinks new file mode 100755 index 0000000..0aa08ab --- /dev/null +++ b/createlinks @@ -0,0 +1,79 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); + +panel_link("navigation", "manager"); +panel_link("noframes", "manager"); +panel_link("bugreport", "manager"); + +event_link("navigation-conf", 'bootstrap-console-save', 50); + +for ( qw( sme_core.css + sme_header.css + sme_main.css + sme_menu.css + sme_panel_menu.css + tkt.css + ) ) +{ + templates2events("/etc/e-smith/web/common/css/$_", qw( + bootstrap-console-save + e-smith-manager-update + )); +} + +templates2events("/etc/e-smith/web/panels/manager/html/header.htm", qw( + console-save + bootstrap-console-save + network-create + network-delete + logrotate + e-smith-manager-update + )); +templates2events("/etc/e-smith/web/common/head.tmpl", qw( + console-save + bootstrap-console-save + network-create + network-delete + logrotate + e-smith-manager-update + )); +templates2events("/etc/e-smith/web/common/foot.tmpl", qw( + console-save + bootstrap-console-save + network-create + network-delete + logrotate + e-smith-manager-update + )); + +# conf-httpd-admin + +templates2events("/etc/httpd/admin-conf/httpd.conf", qw( + console-save + bootstrap-console-save + network-create + network-delete + remoteaccess-update + logrotate + e-smith-manager-update + )); + +templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", 'bootstrap-console-save'); + +foreach (qw(console-save remoteaccess-update logrotate)) +{ + safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/httpd-admin"); +} + + +# Symlink httpd-admin to httpd. +safe_symlink("httpd", "root/usr/sbin/httpd-admin"); + + +my $event = "e-smith-manager-update"; + +event_link("systemd-reload", $event, "89"); +event_link("systemd-default", $event, "88"); +safe_symlink("reload-or-restart", "root/etc/e-smith/events/$event/services2adjust/httpd-admin"); +templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", $event); diff --git a/e-smith-manager.spec b/e-smith-manager.spec new file mode 100644 index 0000000..54f766e --- /dev/null +++ b/e-smith-manager.spec @@ -0,0 +1,863 @@ +# $Id: e-smith-manager.spec,v 1.44 2022/10/05 04:25:04 jpp Exp $ + +Summary: e-smith manager navigation module +%define name e-smith-manager +Name: %{name} +%define version 2.8.0 +%define release 39 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Networking/Daemons +Source: %{name}-%{version}.tar.xz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildRequires: e-smith-devtools +BuildRequires: gettext +BuildRequires: gcc +Requires: e-smith-lib >= 1.18.0-26 +Requires: mod_auth_tkt +Requires: pwauth +Requires: perl(Apache::AuthTkt) +Requires: e-smith-apache >= 2.6.0-19 +Provides: server-manager +AutoReqProv: no + +%changelog +* Mon Aug 07 2023 cvs2git.sh aka Brian Read 2.8.0-39.sme +- Roll up patches and move to git repo [SME: 12338] + +* Mon Aug 07 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Wed Oct 05 2022 Jean-Philippe Pialasse 2.8.0-38.sme +- fix update via manager panel hangs [SME: 12204] + +* Fri Jul 29 2022 Jean-Philippe Pialasse 2.8.0-37.sme +- update to httpd 2.4 access syntax for httpd-admin [SME: 12129] + +* Mon Jul 25 2022 Jean-Philippe Pialasse 2.8.0-36.sme +- update to httpd 2.4 access syntax [SME: 12129] + +* Fri Feb 18 2022 Jean-Philippe Pialasse 2.8.0-35.sme +- removing reference to old log rotation action [SME: 11872] + +* Thu Mar 18 2021 Jean-Philippe Pialasse 2.8.0-34.sme +- take 2 wrong system mode reported in bugreport [SME: 10448] + +* Tue Mar 16 2021 Jean-Philippe Pialasse 2.8.0-33.sme +- fix wrong system mode reported in bugreport [SME: 10448] + +* Thu Dec 10 2020 Jean-Philipe Pialasse 2.8.0-32.sme +- create -update event [SME: 11144] +- migrate httpd-admin to systemd [SME: 11110] + +* Sat Jun 27 2020 Jean-Philipe Pialasse 2.8.0-31.sme +- removing hardcoded ports [SME: 10967] + +* Wed Dec 18 2019 Michel Begue 2.8.0-29.sme +- Add a FollowSymlinks for user-password in password/cgi-bin (perl-suid) [SME: 9677] + +* Tue Dec 10 2019 Jean-Philipe Pialasse 2.8.0-29.sme +- update apache icon path [SME: 9591] + +* Sun Feb 04 2018 Jean-Philipe Pialasse 2.8.0-28.sme +- add message to indicate EOL after Jun 30 2024 fix [SME: 10170] + +* Sun Apr 16 2017 Jean-Philipe Pialasse 2.8.0-26.sme +- add a panel to ease reporting bugs [SME: 8783] +- Original work from Mats Schuh m.schuh@neckargeo.net + +* Wed Apr 05 2017 Jean-Philipe Pialasse 2.8.0-20.sme +- fix warning uninitialized value in lc [SME: 10209] + +* Mon Mar 27 2017 Jean-Philipe Pialasse 2.8.0-19.sme +- fix typo in e-smith-manager-2.8.0-bz10167-emptyback.patch + +* Sat Mar 25 2017 Jean-Philipe Pialasse 2.8.0-18.sme +- avoid internal server error if empty back parameter [SME: 10167] +- return user friendly message + +* Sat Mar 25 2017 Jean-Philipe Pialasse 2.8.0-17.sme +- fix too short timeout in server-manager [SME: 9921] +- now 30 min as default instead of 5 +- possibility to change this and adapt the default 0.66 of timeout remaining to reset it +- by default only a session cookie, can activate persistent cookie +- sha256 as encryption. + +* Mon Jan 16 2017 Jean-Philipe Pialasse 2.8.0-15.sme +- fix bad redirection parameter that might reveal session information to remote site [SME: 9924] + +* Tue Jul 19 2016 Jean-Philipe Pialasse 2.8.0-13.sme +- added missing template-begin for tkt.css [SME: 9676] + +* Tue Jul 19 2016 Jean-Philipe Pialasse 2.8.0-12.sme +- Update server-manager to Koozali branding [SME: 9676] +- We thanks John Crisp for his wonderful work. + +* Wed Jun 15 2016 Jean-Philipe Pialasse 2.8.0-11.sme +- change link for donation to koozali.org [SME: 9599] + +* Wed Jun 15 2016 Daniel Berteaud 2.8.0-10.sme +- Fix syntax for removing Indexes options [SME: 9587] + +* Wed Jun 15 2016 Daniel Berteaud 2.8.0-9.sme +- Remove index option for manager's resources [SME: 9587] + +* Mon Jun 13 2016 Jean-Philipe Pialasse 2.8.0-8.sme +- fix 307 redirection to http when https is used [SME: 8825] [SME: 9583] +- update syntaxe for TKT Auth +- bump 8 for typo + +* Wed Jun 1 2016 Daniel Berteaud 2.8.0-6.sme +- Fix a syntax error in server-manager's logout script [SME: 9527] + +* Wed May 11 2016 Daniel Berteaud 2.8.0-5.sme +- Add a C wrapper to execute manager's cgi to replace perl-suid [SME: 9393] + +* Wed Mar 23 2016 Jean-Philipe Pialasse 2.8.0-4.sme +- fix syntax for httpd 2.4 [SME: 9365] + +* Fri Mar 18 2016 Jean-Philipe Pialasse 2.8.0-3.sme +- rebuild for Bug [SME: 9347] +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + Wed Mar 14 2000 --> Wed Mar 08 2000 or Tue Mar 14 2000 or Wed Mar 15 2000 or .... + Wed Apr 04 2002 --> Wed Apr 03 2002 or Thu Apr 04 2002 or Wed Apr 10 2002 or .... + Tue May 15 2008 --> Tue May 13 2008 or Thu May 15 2008 or Tue May 20 2008 or .... + +* Fri Mar 18 2016 Daniel Berteaud 2.8.0-2.sme +- Don't require perl-suidperl anymore [SME: 9339] + +* Fri Feb 05 2016 stephane de Labrusse 2.8.0-1.sme +- Initial release to sme10 + +* Fri Feb 5 2016 Daniel Berteaud 2.6.0-4.sme +- Really don't redirect to http when login in/out of the server-manager + [SME: 9163] + +* Sun Jan 31 2016 Daniel Berteaud 2.6.0-3.sme +- Don't redirect to http when login in/out of the server-manager from + localhost [SME: 9163] + +* Tue Jan 6 2015 Daniel Berteaud 2.6.0-2.sme +- Allow access to the server-manager without SSL from the loopback + [SME: 9163] + +* Sun Mar 23 2014 Ian Wells 2.6.0-1.sme +- Roll new stream to remove obsolete images [SME: 7962] + +* Sun Mar 23 2014 Ian Wells 2.4.0-9.sme +- Remove references to obsolete images, by Stephane de Labrusse [SME: 7962] + +* Fri Oct 11 2013 Ian Wells 2.4.0-8.sme +- Renew donation text in server-manager, by John Crisp [SME: 7897] + +* Thu Jun 6 2013 Daniel Berteaud 2.4.0-7.sme +- Do not load mod_ssl [SME: 7602] + +* Wed Mar 6 2013 Shad L. Lords 2.4.0-6.sme +- Correct path to pwauth [SME: 7319] + +* Sat Feb 23 2013 Ian Wells 2.4.0-5.sme +- Correct processing of server-manager URL [SME: 7254] + +* Thu Jan 31 2013 Shad L. Lords 2.4.0-4.sme +- Fix typo in perl(Apache::AuthTkt) requires [SME: 7236] + +* Thu Jan 31 2013 Shad L. Lords 2.4.0-3.sme +- Add perl-suidperl dependency [SME: 7235] + +* Thu Jan 31 2013 Shad L. Lords 2.4.0-2.sme +- Add perl(Apache::AuthTkt) dependency [SME: 7236] + +* Thu Jan 31 2013 Shad L. Lords 2.4.0-1.sme +- Roll new stream for sme9 + +* Sat Aug 7 2010 Ian Wells 2.2.0-6.sme +- Remove empty

tag from /etc/e-smith/web/common/foot.tmpl, by Daniel [SME: 5905] + +* Sun Jan 31 2010 Jonathan Martens 2.2.0-5.sme +- Only display error messages intended for admin in server-manager [SME: 5700] + +* Wed Dec 9 2009 Charlie Brady 2.2.0-4.sme +- Fix css validation errors. [SME: 5656] + +* Fri Sep 18 2009 Stephen Noble 2.2.0-4.sme +- display reconfigure warning once if UnsavedChanges=yes [SME: 5475] + +* Fri Sep 18 2009 Stephen Noble 2.2.0-3.sme +- display reconfigure warning if UnsavedChanges=yes [SME: 5475] + +* Sun Apr 26 2009 Jonathan Martens 2.2.0-2.sme +- Fix misinterpretation of display string [SME: 5022] + +* Tue Oct 7 2008 Shad L. Lords 2.2.0-1.sme +- Roll new stream to separate sme7/sme8 trees [SME: 4633] + +* Sat Oct 4 2008 Shad L. Lords 1.14.0-20 +- Make navigation use new db class for navigation [SME: 4619] + +* Thu Jul 31 2008 Shad L. Lords 1.14.0-19 +- Make binmode properties of db class [SME: 4317] +- Add new navigation db & utf8 classes [SME: 4317] + +* Tue Jul 1 2008 Shad L. Lords 1.14.0-18 +- Fix open of database to create if necessary [SME: 4147] + +* Thu May 15 2008 Shad L. Lords 1.14.0-17 + Tue May 15 2008 --> Tue May 13 2008 or Thu May 15 2008 or Tue May 20 2008 or .... +- No longer remove navigation dbs. [SME: 4147] +- Deal a little more gracefully with non UTF-8 lexicons [SME: 4229] + +* Mon Mar 31 2008 Shad L. Lords 1.14.0-16 +- Remove navigation dbs and create new [SME: 4147] + +* Fri Mar 28 2008 Shad L. Lords 1.14.0-15 +- Remove last remnant of pleasewait [SME: 4130] + +* Wed Mar 26 2008 Shad L. Lords 1.14.0-14 +- Include general lexicons in nav-config [SME: 4113] + +* Tue Mar 25 2008 Shad L. Lords 1.14.0-13 +- Fix wide output to print in navigation and allow navigations db to + be utf8 [SME: 4101] + +* Sat Mar 22 2008 Shad L. Lords 1.14.0-12 +- Fix UTF-8 encoding in header and nav-conf [SME: 4072] + +* Tue Jan 08 2008 Stephen Noble 1.14.0-11 +- Fix to remove spaces and newlines in panel headers [SME: 3346] + +* Tue Jan 08 2008 Stephen Noble 1.14.0-10 +- remove the FormMagick session files [SME: 3723] + +* Tue Jan 08 2008 Stephen Noble 1.14.0-9 +- Remove spaces and newlines in panel headers [SME: 3346] + +* Sun Jul 01 2007 Shad L. Lords 1.14.0-8 +- Make login/logout no quite so verbose. [SME: 2660] + +* Fri May 18 2007 Shad L. Lords 1.14.0-7 +- Use correct lib for modules + +* Sun Apr 29 2007 Shad L. Lords +- Clean up spec so package can be built by koji/plague + +* Mon Apr 9 2007 Stephen Noble 1.14.0-6 +- Convert http to https [SME: 2577] + +* Mon Mar 12 2007 Gavin Weight 1.14.0-5 +- Restyle the SME Server manager login form. [SME: 2666] + +* Mon Mar 05 2007 Shad L. Lords 1.14.0-4 +- Don't pass domain in ticket cookie (logout) unless it contains a dot [SME: 2402] + +* Mon Mar 05 2007 Shad L. Lords 1.14.0-3 +- Don't pass domain in ticket cookie (login) unless it contains a dot [SME: 2402] + +* Tue Feb 13 2007 Charlie Brady 1.14.0-2 +- Deal gracefully with renamed apache modules. [SME: 2471] + +* Fri Jan 26 2007 Shad L. Lords 1.14.0-1 +- Roll stable stream. [SME: 2328] + +* Fri Jan 19 2007 Shad L. Lords 1.13.1-13 +- Create /etc/httpd/admin-conf directory + +* Fri Jan 19 2007 Shad L. Lords 1.13.1-12 +- Move apache logrotate to e-smith-apache. +- Put quotes around 'httpd-admin' in hashes. + +* Thu Jan 18 2007 Shad L. Lords 1.13.1-11 +- Move last httpd fragments from e-smith-base. + +* Thu Dec 07 2006 Shad L. Lords +- Update to new release naming. No functional changes. +- Make Packager generic + +* Mon Nov 27 2006 Charlie Brady 1.13.1-09 +- Randomize string used for encrypting auth tickets. + +* Tue Nov 21 2006 Charlie Brady 1.13.1-08 +- Add ProxyPassReverse entries for server-manager passthroughs, so that + redirects work correctly. + +* Thu Nov 16 2006 Charlie Brady 1.13.1-07 +- Add basic L10N in navigation-conf. + +* Wed Nov 15 2006 Charlie Brady 1.13.1-06 +- Avoid use of FormMagick in navigation-conf. TODO: fix I18N. + +* Mon Nov 06 2006 Charlie Brady 1.13.1-05 +- Simplify the sorting code in navigation (so that I can understand + it). + +* Mon Nov 06 2006 Charlie Brady 1.13.1-04 +- Simplify javascript, and remove use of pleasewait script. + +* Mon Nov 06 2006 Charlie Brady 1.13.1-03 +- Move swapClass javascript out of standard header and into just + navigation. + +* Fri Nov 03 2006 Charlie Brady 1.13.1-02 +- Use mod_auth_tkt authentication for server manager access. + +* Thu Nov 02 2006 Charlie Brady 1.13.1-01 +- Add branch tag and roll new development version. + +* Wed Nov 01 2006 Charlie Brady 1.13.0-06 +- Move httpd-admin and its configuration templates from e-smith-base RPM. + [SME: 2023] + +* Wed Nov 01 2006 Charlie Brady 1.13.0-05 +- Move more server-manager components from e-smith-base RPM. [SME: 2023] + +* Wed Nov 01 2006 Charlie Brady 1.13.0-04 +- Add manager header/footer templates (moved from e-smith-base) + [SME: 2023] + +* Wed Aug 2 2006 Michael Soulier +- [1.13.0-03] +- Fixing broken db path in patch. [SME: 107] + +* Wed Mar 29 2006 Michael Soulier +- [1.13.0-02] +- Forward porting arbitrary menu plugins. [SME: 107] + +* Wed Mar 29 2006 Michael Soulier +- [1.13.0-01] +- Rolling to dev. + [SME: 107] + +* Wed Mar 15 2006 Charlie Brady 1.12.0-01 +- Roll stable stream version. [SME: 1016] + +* Tue Jan 31 2006 Gordon Rowell 1.11.0-13 +- Changed the static CSS files into directory templates, which are + expanded in bootstrap-console-save [SME: 408] + +* Wed Nov 30 2005 Gordon Rowell 1.11.0-12 +- Bump release number only + +* Sun Oct 16 2005 Gordon Rowell +- [1.11.0-11] +- Removed "table-layout: fixed;" from sme_main.css [SF: 1299779] + +* Sun Oct 16 2005 Gordon Rowell +- [1.11.0-10] +- dos2unix conversion on CSS files [SF: 1299779] + +* Wed Aug 17 2005 Charlie Brady +- [1.11.0-09] +- Remove bogus "Provides: perl(I18N::AcceptLanguage)" header. [SF: 1262438] + +* Thu Jun 9 2005 Charlie Brady +- [1.11.0-08] +- Add newly required manager/cgi-bin/{navigation,noframes} symlinks. + [SF: 1217426] + +* Tue Jun 7 2005 Charlie Brady +- [1.11.0-07] +- Remove references to /etc/e-smith/web/panel/manager/common + [SF: 1172203, 1210715] + +* Tue Sep 28 2004 Michael Soulier +- [1.11.0-06] +- Updated perl dependencies. [msoulier MN00040240] + +* Tue Jul 13 2004 Michael Soulier +- [1.11.0-05] +- Added the sme_panel_menu.css file, for tabbed menu support. Added a link to + it in the standard header. + [msoulier MN00030141] + +* Thu Feb 26 2004 Michael Soulier +- [1.11.0-04] +- Backed-out previous change. It was better before. [msoulier dpar-22042] + +* Thu Feb 26 2004 Michael Soulier +- [1.11.0-03] +- Added vertical-align: text-top; to td.sme-noborders-label to ensure that + text is aligned vertically at the top of the cell. [msoulier dpar-22042] + +* Tue Jul 8 2003 Charlie Brady +- [1.11.0-02] +- Check that files are executable before listing in the + manager navigation frame. [charlieb 9197] +- s/Copyright/License/. + +* Tue Jul 8 2003 Charlie Brady +- [1.11.0-01] +- Changing version to development stream number - 1.11.0 + +* Thu Jun 26 2003 Charlie Brady +- [1.10.0-01] +- Changing version to stable stream number - 1.10.0 + +* Mon Apr 21 2003 Gordon Rowell +- [1.9.5-16] +- New class for error link within table cell [gordonr 8129] + +* Tue Apr 8 2003 Gordon Rowell +- [1.9.5-15] +- Removed borders around "warning" cells so they don't look like + they are bleeding on some browsers (e.g. Mozilla) [gordonr 8127] + +* Thu Apr 3 2003 Gordon Rowell +- [1.9.5-14] +- Make

and

within div.{success,error} => {red,green} [gordonr 7919] + +* Wed Apr 2 2003 Gordon Rowell +- [1.9.5-13] +- Moved manager SSL fragments back to e-smith-base [gordonr 7900] + +* Tue Apr 1 2003 Tony Clayton +- [1.9.5-12] +- add td.sme-radiobutton css class for date/time panel [tonyc 1588] + +* Tue Apr 1 2003 Gordon Rowell +- [1.9.5-11] +- Make the question make bold [gordonr 7946] + +* Tue Apr 1 2003 Gordon Rowell +- [1.9.5-10] +- Fix SSL listen template for serveronly mode [gordonr 7900] + +* Tue Apr 1 2003 Gordon Rowell +- [1.9.5-09] +- Bind manager on port 981 to localhost only [gordonr 7900] + +* Mon Mar 31 2003 Mike Dickson +- [1.9.5-08] +- changed class for sme-noborders-label to width=33% rather than + a fixed 250px wide, due to limitations in IE6 [miked 7676] +- added class "sectionbar" for use [miked] +- modified "td.noborders-label" colour [miked] + + +* Fri Mar 28 2003 Gordon Rowell +- [1.9.5-07] +- Changed Copyright font from 8px to 10px [gordonr 7676] + +* Thu Mar 27 2003 Mark Knox +- [1.9.5-06] +- Changed Help -> ? and changed formatting of current user and host [markk + 7707] + +* Thu Mar 20 2003 Tony Clayton +- [1.9.5-05] +- Add css style for a.error class [tonyc 4718] + +* Wed Mar 19 2003 Gordon Rowell +- [1.9.5-04] +- Move navigation dbs to /home/e-smith/db/navigation. We shouldn't generate + them in /etc/e-smith/locale and we should name them by language, in case + we share lexicons (e.g. fr/fr-ca) [gordonr 7733] + +* Sun Mar 16 2003 Mike Dickson +- [1.9.5-03] +- stylesheet fixes: darkend the copyrigt text, adjuste the UL and LI tags [miked 7676] + +* Thu Mar 13 2003 Mark Knox +- [1.9.5-02] +- Removed 40LogoRow from header.htm templates [markk 4722] + +* Thu Mar 13 2003 Mark Knox +- [1.9.5-01] +- Removed product_logo.gif [markk 4722] + +* Tue Mar 11 2003 Mike Dickson +- [1.9.4-09] +- changed Adming to admin in header.htm templates [miked 7595] + +* Thu Feb 6 2003 Mike Dickson +- [1.9.4-08] +- updated the CSS to add a new "success" class [miked 7032] + +* Tue Feb 4 2003 Mark Knox +- [1.9.4-07] +- Refer to new SSL cert name of $SystemName.$DomainName [markk 4874] + +* Mon Feb 3 2003 Mark Knox +- [1.9.4-06] +- Include ValidFrom hosts in SSL allow statements [markk 6428] + +* Mon Feb 3 2003 Mark Knox +- [1.9.4-05] +- Also Listen on the right ports [markk 6428] + +* Mon Feb 3 2003 Mark Knox +- [1.9.4-04] +- Bind SSL to port 443 if no primary web server available [markk 6428] + +* Sat Jan 25 2003 Mike Dickson +- [1.9.4-03] +- darkened colour of copyright text [miked 6696] + +* Sat Jan 25 2003 Mike Dickson +- [1.9.4-02] +- removed demo class "warn" from nav script [miked 6706] + +* Mon Jan 13 2003 Mike Dickson +- [1.9.4-01] +- updated CSS file to show correct colour in menu, added "warn.gif" [miked 6398] + +* Fri Jan 3 2003 Gordon Rowell +- [1.9.3-13] +- Made use of esmith::I18N in navigation-conf. Renamed locale->lang + to make it more obvious that we are dealing with a langtag [gordonr 5212] + +* Thu Jan 2 2003 Gordon Rowell +- [1.9.3-12] +- Hide online-manual from navigation bar - now in header Help [gordonr 6394] + +* Wed Jan 1 2003 Gordon Rowell +- [1.9.3-11] +- Updated navigation script to use esmith::I18N [gordonr 5212] + +* Wed Jan 1 2003 Gordon Rowell +- [1.9.3-10] +- Spell bootstrap-console-save correctly [gordonr 5493] + +* Wed Jan 1 2003 Gordon Rowell +- [1.9.3-09] +- Work out the correct navigation.info based on browser language [gordonr 5493] + +* Wed Jan 1 2003 Gordon Rowell +- [1.9.3-08] +- Generate navigation.info files (config db format) for each supported + language in /etc/e-smith/locale/{language}/etc/e-smith/web/functions +- Read the navigation.info file for the preferred language when + displaying the navigation bar +- TODO: Actually select the correct navigation.info file [gordonr 5493] + +* Tue Dec 31 2002 Gordon Rowell +- [1.9.3-07] +- Skip non-executable files when generating nav bar [gordonr 5802] + +* Fri Dec 27 2002 Mike Dickson +- [1.9.3-06] +- updates and comments in the CSS files [miked 3185] +- commented out the two links in the header that are not ready yet + (log out and update available) [miked 5967 and 492] + +* Mon Dec 16 2002 Mike Dickson +- [1.9.3-05] +- UI Update, part of the tweaking for the new UI [miked 5494] + +* Tue Dec 10 2002 Mike Dickson +- [1.9.3-04] +- forgot to update header.htm fragments [miked 5494] + +* Mon Dec 9 2002 Mike Dickson +- [1.9.3-03] +- ui update [miked 5494] + +* Mon Dec 2 2002 Mike Dickson +- [1.9.3-02] +- ui update [miked 5494] + +* Wed Nov 27 2002 Mike Dickson +- [1.9.3-01] +- and again to make it stick + +* Wed Nov 27 2002 Mike Dickson +- [1.9.2-01] +- updated the header images [miked 5529] +- updated other UI stuff [miked 5494] + +* Fri Nov 22 2002 Gordon Rowell +- [1.9.1-02] +- templated header.htm [miked 5826] +- modified header.htm template to link to online-manual and blades + [gordonr 5826] + +* Thu Nov 21 2002 Mike Dickson +- [1.9.1-01] +- update to new UI system [miked 5494] + +* Wed Nov 20 2002 Mike Dickson +- [1.9.0-01] +- Changing to development stream; version upped to 1.9.0 + +* Fri Oct 11 2002 Charlie Brady +- [1.8.0-01] +- Roll to maintained version number to 1.8.0 + +* Wed Jun 19 2002 Mark Knox +- [1.7.2-01] +- Move SSL mutex and cache out of /var/log [markk 3830] + +* Tue Jun 18 2002 Charlie Brady +- [1.7.1-01] +- Move admin apache SSL mutex and SSL session cache to files named admin_xxx + to avoid name clash with main server. [charlieb 3830] + +* Wed Jun 5 2002 Charlie Brady +- [1.7.0-01] +- Changing version to maintained stream number to 1.7.0 + +* Fri May 31 2002 Charlie Brady +- [1.6.0-01] +- Changing version to maintained stream number to 1.6.0 + +* Thu May 23 2002 Gordon Rowell +- [1.5.11-01] +- RPM rebuild forced by cvsroot2rpm + +* Thu May 16 2002 Tony Clayton +- [1.5.10-01] +- Pass noframes=1 as cgi param for browsers without frames [tonyc 3475] + +* Thu May 16 2002 Tony Clayton +- [1.5.9-01] +- use Dan McGarry's manager.css/navigation fixes for 3377 [tonyc] + +* Thu May 16 2002 Tony Clayton +- [1.5.8-01] +- Remove unnecessary

tags in navigation html [tonyc 3377] +- Fix navigation panel to not import symbols from fm subclasses + [tonyc 3109] + +* Mon May 13 2002 Tony Clayton +- [1.5.7-01] +- Fix navigation panel to play nice with FM subclasses [tonyc 3109] + +* Fri May 10 2002 Gordon Rowell +- [1.5.6-01] +- Tell CGI.pm to not produce xhtml [gordonr 3377] + +* Tue May 7 2002 Gordon Rowell +- [1.5.5-01] +- Missing use esmith::util [gordonr 3372] + +* Wed Apr 24 2002 Gordon Rowell +- [1.5.4-01] +- Ignore cgi-bin/internal-.* in navigation [gordonr 3202] + +* Mon Apr 22 2002 Gordon Rowell +- [1.5.3-01] +- Back out gettext() calls - esmith::FormMagic was Croaking on + bad lexicons for old panels. Now properly localises the navigation + bar if the localisations exist [gordonr 3155] + +* Fri Apr 19 2002 Gordon Rowell +- [1.5.2-01] +- Added explicit gettext() call to localize navigation bar while + figuring out esmith::FormMagick won't do it for me [gordonr 3155] + +* Wed Apr 10 2002 Gordon Rowell +- [1.5.1-01] +- navigation is now polymorphic and does noframes as well [gordonr #3155] + +* Thu Apr 04 2002 Gordon Rowell + Wed Apr 04 2002 --> Wed Apr 03 2002 or Thu Apr 04 2002 or Wed Apr 10 2002 or .... +- [1.5.0-01] +- Rolled to development stream [gordonr] + +* Wed Apr 03 2002 Kirrily Robert +- [1.4.4-01] +- Added red error messages to CSS [skud 3027] + +* Thu Mar 14 2002 Gordon Rowell +- [1.4.3-01] +- Fixed regexp for ignoring pleasewait(-.*?). Two each in + pleasewait/noframes. Reduced to one in each [gordonr] + +* Fri Mar 1 2002 Tony Clayton +- [1.4.2-01] +- rollRPM: Rolled version number to 1.4.2-01. Includes patches up to 1.4.1-02. +- mkdir panels/manager/common in spec file for CVS migration + +* Fri Jan 25 2002 Tony Clayton +- [1.4.1-02] +- added missing ')' in navigation script pleasewait munging + +* Fri Jan 25 2002 Tony Clayton +- [1.4.1-01] +- rollRPM: Rolled version number to 1.4.1-01. Includes patches up to 1.4.0-02. +- navigation now ignores pleasewait-* files + +* Thu Jan 10 2002 Charlie Brady +- [1.4.0-02] +- Use dated log file for ssl_engine_log. Name the file ssl_engine_log.xxxxx + to keep it distinct from the main web server's log file. + +* Tue Dec 11 2001 Jason Miller +- [1.4.0-01] +- rollRPM: Rolled version number to 1.4.0-01. Includes patches up to 1.3.0-07. + +* Sat Dec 08 2001 Charlie Brady +- [1.3.0-07] +- Move genNavigationHeader() down below the script grokking code in + "navigation", to help Netscape's faulty rendering. + +* Wed Nov 21 2001 Charlie Brady +- [1.3.0-06] +- Remove troublesome "Requires: e-smith-base". +- Remove obsolete "Requires: e-smith". + +* Thu Nov 1 2001 Gordon Rowell +- [1.3.0-05] +- Indent description within navigation headings sections + +* Thu Nov 1 2001 Gordon Rowell +- [1.3.0-04] +- Backed out patch from 1.3.0-02 - restored image to navigation frame + +* Wed Oct 31 2001 Charlie Brady +- [1.3.0-03] +- Add Mitel branding changes. + +* Fri Aug 31 2001 Gordon Rowell +- [1.3.0-02] +- Removed image from top of navigation - now in separate frame +- Added Provides: server-manager + +* Fri Aug 31 2001 Gordon Rowell +- [1.3.0-01] +- Rolled version number to 1.3.0-01. Includes patches upto 1.2.0-02. + +* Fri Aug 17 2001 gordonr +- [1.2.0-02] +- Autorebuild by rebuildRPM + +* Wed Aug 8 2001 Charlie Brady +- [1.2.0-01] +- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-04. + +* Tue Jul 31 2001 Adrian Chung +- [1.1.0-04] +- moving manager.css file from manager/html to common/css + +* Tue Jul 31 2001 Adrian Chung +- [1.1.0-03] +- Adding SSL enabling templates for port 981. +- Adding 01localAccessString fragment for use in SSL + enabling templates. + +* Fri Jul 27 2001 Charlie Brady +- [1.1.0-02] +- Prepend "/server-manager" to hrefs, to allow consistent path interpretation + between admin and standard web server. + +* Fri Jul 27 2001 Charlie Brady +- [1.1.0-01] +- Rolled version number to 1.1.0-01. Includes patches upto 0.1.1-06. + +* Tue Jul 24 2001 Adrian Chung +- [0.1.1-06] +- Incorporating font size changes to manager.css + +* Mon Jul 9 2001 Peter Samuel +- [0.1.1-05] +- Updated packager information + +* Fri Jul 6 2001 Peter Samuel +- [0.1.1-04] +- Changed license to GPL + +* Wed Jun 06 2001 Charlie Brady +- [0.1.1-03] +- Change font setting in navigation - use css class instead. +- Add newlines after each link in navigation frame - so that HTML + source is readable. +- Add manager.css, which came from e-smith-base. Let's have all look&feel + in the one RPM. +- Check whether "files" in cgi-bin directory are actually directories. Skip + any directories. + +* Mon Apr 9 2001 Adrian Chung +- [0.1.1-02] +- changing CELLPADDING in navigation from 4 to 2. + +* Tue Mar 14 2000 Charlie Brady + Wed Mar 14 2000 --> Wed Mar 08 2000 or Tue Mar 14 2000 or Wed Mar 15 2000 or .... +- initial release + +%description +This RPM contributes the navigation bars for the e-smith-manager. + +%prep +%setup +rm -rf root/var/service + +%build +perl createlinks +gcc -o root/etc/e-smith/web/functions/wrapper manager.c +mkdir -p root/home/e-smith/db/navigation +mkdir -p root/etc/e-smith/web/common/css + +mkdir -p root/usr/share/locale/en_US/LC_MESSAGES/ +xgettext -o root/usr/share/locale/en_US/LC_MESSAGES/foot.tmpl.po root/etc/e-smith/templates/etc/e-smith/web/common/foot.tmpl/25Copyright +# make header/footer symlinks +ln -s head.tmpl root/etc/e-smith/web/common/userpassword_head.tmpl +ln -s head.tmpl root/etc/e-smith/web/common/noframes_head.tmpl +ln -s foot.tmpl root/etc/e-smith/web/common/noframes_foot.tmpl + +mkdir -p root/etc/e-smith/web/panels/manager/html +for file in index initial +do + ln -s ../../../functions/wrapper root/etc/e-smith/web/panels/manager/html/${file}.cgi +done + +# Force creation of potentially empty directories +mkdir -p root/etc/e-smith/web/{common,functions} +mkdir -p root/etc/e-smith/web/panels/manager/{cgi-bin,html} +mkdir -p root/etc/e-smith/web/panels/password/{cgi-bin,html} +mkdir -p root/etc/httpd/admin-conf + +mkdir -p root/service +#mkdir -p root/etc/rc.d/init.d/supervise +#for service in httpd-admin +#do +# ln -s /var/service/$service root/service/$service +# mkdir -p root/var/service/$service/supervise +# touch root/var/service/$service/down +# if [ -d root/var/service/$service/log ] +# then +# mkdir -p root/var/service/$service/log/supervise +# mkdir -p root/var/log/$service +# fi +# ln -s ../daemontools root/etc/rc.d/init.d/supervise/$service +#done + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) +rm -f %{name}-%{version}-%{release}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --file /etc/e-smith/web/common/cgi-bin/login 'attr(0755,root,root)' \ + --file /etc/e-smith/web/common/cgi-bin/logout 'attr(0755,root,root)' \ + --file /etc/e-smith/web/functions/wrapper 'attr(4750,root,admin)' \ + --dir /var/log/httpd-admin 'attr(0750,smelog,smelog)' \ + > %{name}-%{version}-%{release}-filelist +echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +if [ $1 -gt 1 ] ; then + if [ -e /var/service/httpd-admin/run ] ; then + /usr/bin/sv d httpd-admin + /usr/bin/sv d httpd-admin/log + fi +fi +%preun +%post +find /etc/e-smith/web/panels/manager/cgi-bin/ -type f | \ + sed -n '/\/[0-9a-z]\{32\}$/p' | \ + xargs grep -l Persisten | \ + xargs rm -f + +if [ -d /var/service/httpd-admin ] ; then + rm -rf /var/service/httpd-admin +fi + +%postun + +%files -f %{name}-%{version}-%{release}-filelist +%defattr(-,root,root) diff --git a/root/etc/e-smith/db/configuration/defaults/httpd-admin/PermitPlainTextAccess b/root/etc/e-smith/db/configuration/defaults/httpd-admin/PermitPlainTextAccess new file mode 100644 index 0000000..7ecb56e --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/httpd-admin/PermitPlainTextAccess @@ -0,0 +1 @@ +no diff --git a/root/etc/e-smith/db/configuration/defaults/httpd-admin/TCPPort b/root/etc/e-smith/db/configuration/defaults/httpd-admin/TCPPort new file mode 100644 index 0000000..da8e2a4 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/httpd-admin/TCPPort @@ -0,0 +1 @@ +980 diff --git a/root/etc/e-smith/db/configuration/defaults/httpd-admin/access b/root/etc/e-smith/db/configuration/defaults/httpd-admin/access new file mode 100644 index 0000000..2fbb50c --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/httpd-admin/access @@ -0,0 +1 @@ +localhost diff --git a/root/etc/e-smith/db/configuration/defaults/httpd-admin/status b/root/etc/e-smith/db/configuration/defaults/httpd-admin/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/httpd-admin/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/httpd-admin/type b/root/etc/e-smith/db/configuration/defaults/httpd-admin/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/httpd-admin/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/db/configuration/migrate/20TKTAuthSecret b/root/etc/e-smith/db/configuration/migrate/20TKTAuthSecret new file mode 100644 index 0000000..928dff4 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/20TKTAuthSecret @@ -0,0 +1,7 @@ +{ + my $admin = $DB->get('httpd-admin'); + return unless $admin; + return if $admin->prop('TKTAuthSecret'); + use Data::UUID; + $admin->set_prop('TKTAuthSecret', Data::UUID->new->create_str()); +} diff --git a/root/etc/e-smith/events/actions/navigation-conf b/root/etc/e-smith/events/actions/navigation-conf new file mode 100755 index 0000000..d55209b --- /dev/null +++ b/root/etc/e-smith/events/actions/navigation-conf @@ -0,0 +1,153 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 1999-2006 Mitel Networks Corporation +# +# 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. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +#---------------------------------------------------------------------- +package esmith; + +use strict; + +use esmith::NavigationDB; +use esmith::I18N; + +use constant WEBFUNCTIONS => '/etc/e-smith/web/functions'; +use constant NAVIGATIONDIR => '/home/e-smith/db/navigation'; +use constant NEW_NAVDIR => '/home/e-smith/db'; + +my $navigation_ignore = + "(\.\.?|navigation|noframes|online-manual|(internal|pleasewait)(-.*)?)"; + +my $i18n = new esmith::I18N; + +my %navdbs; + +opendir FUNCTIONS, WEBFUNCTIONS or + die "Couldn't open ", WEBFUNCTIONS, "\n"; + +my @files = grep (!/^${navigation_ignore}$/, readdir (FUNCTIONS)); +my @langs = $i18n->availableLanguages(); + +use XML::Parser; +my $parser = new XML::Parser (Style => 'Tree', + ProtocolEncoding => 'UTF-8'); + +foreach my $file (@files) +{ + next if (-d WEBFUNCTIONS . "/$file"); + next unless (-x WEBFUNCTIONS . "/$file"); + + #-------------------------------------------------- + # extract heading, description and weight information + # from CGI script + #-------------------------------------------------- + open(SCRIPT, WEBFUNCTIONS . "/$file"); + my $heading = undef; + my $description = undef; + my $heading_weight = undef; + my $description_weight = undef; + while ( + "; + + foreach my $h (sort { + ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'}) <=> + ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) + { + if ( $NO_FRAMES ) + { + print $q->h2 ($h); + } + else + { + print "\n", $q->Tr ($q->td({class => "section"},$q->span({class => "section"}, $h))); + } + + #-------------------------------------------------- + # generate list of descriptions sorted by weight + #-------------------------------------------------- + print "

    \n" if ( $NO_FRAMES ); + + foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav {$h}{'DESCRIPTIONS'}}) + { + my $href = "/server-manager" . $_->{'FILENAME'}; + if ( $NO_FRAMES ) + { + print $q->li ($q->a ({href => "$href?noframes=1"}, $_->{'DESCRIPTION'})); + } + else + { + print "\n",$q->Tr( + $q->td ({-class => "menu-cell"}, + $q->a ({-id => "sme$c", + -class => "item", + -onClick => "swapClasses('sme$c')", + href => $href, + target => 'main'}, + $_->{'DESCRIPTION'}) + )); + } + $c++; + + } + print "
\n" if ($NO_FRAMES); + } + + unless ( $NO_FRAMES ) + { + print "\n\n"; + esmith::cgi::genNavigationFooter ($q); + } +} diff --git a/root/etc/e-smith/web/functions/noframes b/root/etc/e-smith/web/functions/noframes new file mode 120000 index 0000000..863f825 --- /dev/null +++ b/root/etc/e-smith/web/functions/noframes @@ -0,0 +1 @@ +navigation \ No newline at end of file diff --git a/root/usr/lib/systemd/system/httpd-admin.service b/root/usr/lib/systemd/system/httpd-admin.service new file mode 100644 index 0000000..6451ddd --- /dev/null +++ b/root/usr/lib/systemd/system/httpd-admin.service @@ -0,0 +1,25 @@ +[Unit] +Description=httpd-admin The Koozali SME Server Server-Manager web service +After=network.target remote-fs.target +Documentation=man:httpd(8) +Documentation=man:apachectl(8) + +[Service] +Type=notify +EnvironmentFile=/etc/sysconfig/httpd +ExecStartPre=/sbin/e-smith/service-status httpd-admin +ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/admin-conf/httpd.conf +ExecStart=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -DFOREGROUND +ExecReload=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -k graceful +ExecStop=/bin/kill -WINCH ${MAINPID} +# We want systemd to give httpd some time to finish gracefully, but still want +# it to kill httpd after TimeoutStopSec if something went wrong during the +# graceful stop. Normally, Systemd sends SIGTERM signal right after the +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give +# httpd time to finish. +KillSignal=SIGCONT +PrivateTmp=true + +[Install] +WantedBy=sme-server.target + diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm new file mode 100644 index 0000000..c797009 --- /dev/null +++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/bugreport.pm @@ -0,0 +1,173 @@ +#!/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.6 $ =~ /: (\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 = $db->get_value('SystemMode'); +our $previoussystemmode = $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\t
  • ". $self->localise('SME_VERSION') ."
  • \n"; + print "\t\t
  • ". $self->localise('SERVER_MODE') ."
  • \n"; + print "\t\t
  • ". $self->localise('PREVIOUS_SERVER_MODE') ."
  • \n"; + print "\t\t
  • ". $self->localise('KERNEL_AND_ARCH') ."
  • \n"; + print "\t\t
  • ". $self->localise('INSTALLED_RPMS') ."
  • \n"; + print "\t\t
  • ". $self->localise('ALTERED_TEMPLATES') ."
  • \n"; + print "\t\t
  • ". $self->localise('ALTERED_EVENTS') ."
  • \n"; + print "\t\t
  • ". $self->localise('YUM_REPOS') ."
  • \n"; + print "
\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, + previoussystemmode => \$previoussystemmode, + 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; diff --git a/root/var/.gitignore b/root/var/.gitignore new file mode 100644 index 0000000..e69de29