Commit Graph

5 Commits

Author SHA1 Message Date
Maurice ONeal
508af40359 Moved logging out of the host database and a few bug fixes
The host will no longer store logs in the database. Instead,
logging is done by syslog if running linux. If running
Windows, logs are now stored in a local file in the app
config directory.

Fixed a bug with -add_admin that would fail to create more
than one admin accounts in sequence due to the blank email
addresses being blank. It will now create fake email
addresses unique to each admin account.

Added -res_pw to reset user acccount passwords from the CLI
if needed.

Logging was also expanded to capture and log all failures
reported by all modules stderr output.

Updated build.py and install.py for QT6 support and moved
the linux .service file from /etc to /lib to conform to
systemd standards.

Removed the ls_dbg command because in database logging is
no longer done.
2021-02-27 11:19:44 -05:00
Maurice O'Neal
c8f53d1e5c Slimmed down and simplified host administering
- I decided to remove the entire concept of a root user.
  Instead, the host initializes as a blank slate and it
  will be up to the host admin to create a rank 1 user via
  the new command line option "-add_admin" to do initial
  setup with.

- There is no longer such a concept as a protected user.
  Meaning even the last rank 1 user in the host database
  is allowed to delete or modify the rank of their own
  account. To prevent permanent "admin lock out" in this
  scenario the "-elevate" command line option was created.

- Host settings are no longer stored in the database.
  Instead, host settings are now stored in a conf.json file
  in /etc/mrci/conf.json if running on a linux based OS or
  in %Programdata%\mrci\conf.json if running on Windows.

- Email templates are no longer stored in the database.
  Instead, the templates can be any file formatted in UTF-8
  text stored in the host file system. The files they point
  to can be modified in the conf.json file.

- The conf file also replaced all use env variables so
  MRCI_DB_PATH, MRCI_WORK_DIR, MRCI_PRIV_KEY and
  MRCI_PUB_KEY are no longer in use. SSL/TLS cert paths can
  be modified in the conf file.

- Removed email template cmds set_email_template and
  preview_email.

- Also removed cmds close_host, host_config and
  restart_host. The actions these commands could do is best
  left to the host system command line.

- The database class will now explicitly check for write
  permissions to the database and throw an appropriate
  error message if the check fails. "DROP TABLE" SQL
  abilities were added to make this happen.

- Removed async cmds exit(3), maxses(5) and restart(11).
2020-11-10 14:47:00 -05:00
Maurice ONeal
f62eb125cf Added Windows Build/Install Support
- added a -host_trig command line option that creates a new host
  instance without blocking user input.

- the build/install python scripts will no longer internally build
  platform specific shell scripts; instead, they will now copy the
  necessary templates from the /templates folder.

- modified both build.py and install.py to include windows
  deployment support so this app can now be built/installed on
  windows based host. note: i decided to have it "daemonized" as
  a scheduled task that runs on system start instead of service
  because it is simply easier to do it this way and will not
  involve any 3rd party libraries or apps.

- added the src/applink.c file to the source code since it is
  needed for windows openssl support.

- changed over all references of "endl" to "Qt::endl" to avoid
  depreciation errors/warnings.
2020-07-04 11:37:46 -04:00
Maurice ONeal
5ea1e45eb2 Some minor bug fixes
Fixed the shebang for the python build/install scripts to properly
point to the correct python executable in linux.

Fixed a bug that caused the host session to return false "command
not found errors" after running any command shortly after
successfully connecting.
2020-04-27 13:08:56 -04:00
Maurice ONeal
48b4c5b537 Major change to the build system and minor changes to SSL handling
- mutiple SSL cert files can now be added to the MRCI_PUB_KEY env variable
  via colon seperated ':' path strings to complete the cert chain if such
  a thing is required. It is no longer necessary to merge to multiple
  certs into one to complete a cert chain.

- added -load_ssl command line option so cert data can be re-loaded in
  real time without the need to stop-start the host.

- added more detailed error messages to the SSL loading process for
  easier debugging.

- major changes to the build system include the use of python scripts
  instead of the linux shell script file.

  - linux_build.sh was removed since it is no longer needed.
  - the new build process now run 2 python scripts: build.py and then
    install.py.
  - the resulting installer if built no longer uses makeself. the
    installation and/or self extracting process is now handled entirely
    by python and the install.py script.

  The main reason for this change is to lay the ground work for multi-
  platform support. It is still linux only for now but adding windows
  support will be much easier in the future thanks to python's cross-
  platform support.
2020-04-21 12:04:36 -04:00