Commit Graph

34 Commits

Author SHA1 Message Date
Ilia Ross
14f90afb89 Fix to cache init mode for menu title selection 2026-06-07 16:55:20 +02:00
Ilia Ross
4e929b5fa2 Update module description and language files 2026-06-05 21:17:12 +02:00
Ilia Ross
5499d1c051 Fix to modernize init module configuration by boot system 2026-06-05 20:49:53 +02:00
Ilia Ross
a83db9f57d Add advanced systemd unit and user unit management
This PR expands the "Bootup and Shutdown" module’s systemd support with creation and management for services, timers, sockets, paths and targets. It also adds user-scoped systemd units, linger controls, status and log actions, tabbed unit listings by type, and contextual help for the new options.

For user-scoped units, the implementation includes several safety guards because unit files live under user-controlled home directories:

- User accounts are validated with system account data before any user-unit operation is attempted.
- User unit names are restricted to known systemd unit suffixes and safe filename characters.
- User unit files are limited to direct children of `~/.config/systemd/user`.
- Symlinked `.config`, `.config/systemd`, and `.config/systemd/user` paths are rejected.
- User unit reads, writes, directory creation, and deletes are performed after dropping privileges to the target Unix user.
- File operations re-check paths close to the actual read/write/delete operation to reduce symlink race exposure.
- User unit create failures roll back half-created files when daemon reload fails.
- User-provided unit names, owners, paths, command output, and logs are HTML-escaped before display.
- systemctl, journalctl, and loginctl command arguments are shell-quoted before execution.
- User services omit `User=` and `Group=` directives because they already run under the selected user’s systemd manager.

Together, all these changes will allow Webmin admin to manage both system and user systemd units while keeping user-controlled home-directory paths from becoming root-level file read/write/delete exploits.

Implemented in response to these two issue requests  https://github.com/webmin/webmin/issues/2733 and https://github.com/webmin/webmin/issues/2734
2026-06-02 20:32:03 +02:00
Ilia Ross
2e245a1035 Add a separate "Unit type" column 2025-07-05 16:03:47 +03:00
Ilia Ross
90f4265389 Fix to use unit term for systemd systems 2025-07-03 13:28:55 +03:00
iliajie
60349eb62e Protect Webmin from being deleted or stopped, and restart properly 2022-10-19 14:25:43 +03:00
iliajie
6a38dd89d1 Fix precedence is very important, especially when service is masked
* Unit must be enabled (and unmasked) first before starting
  * Therefore a service cannot be started before it's enabled in Webmin
2022-10-19 13:40:40 +03:00
iliajie
460ba7d8cd Add support to display No (masked) state 2022-10-19 12:33:08 +03:00
Ilia Rostovtsev
3bd9b9dcbe Add status to systemd services 2022-02-19 16:17:23 +03:00
Jamie Cameron
20db4a29cf Show config file name 2021-09-09 21:50:17 -07:00
Jamie Cameron
31aa75ef18 Optionally show journalctl output 2020-01-18 22:53:16 -08:00
Jamie Cameron
8a684d8c41 Detect and show unknown status systemd actions https://www.virtualmin.com/node/59115 2018-10-20 10:33:26 -07:00
Jamie Cameron
8f0d32b764 More changes needed to support launchd 2015-05-03 10:14:03 -07:00
Jamie Cameron
cb008888bf Launchd action creation now working 2015-04-26 16:30:27 -07:00
Jamie Cameron
86ce05ec3b UI for adding a launchd agent 2015-04-26 15:35:31 -07:00
Jamie Cameron
4b2ba48e58 Work on launchd support 2015-04-25 22:00:07 -07:00
Jamie Cameron
b1362f4994 Fix message with PID is not known 2011-12-25 19:40:57 -08:00
Jamie Cameron
457fa69c18 systemd support now pretty much working 2011-12-16 17:24:53 -08:00
Jamie Cameron
8b1b428d1c More work on systemd support 2011-12-15 21:36:43 -08:00
Jamie Cameron
58b3f5b5fd Work on systemd support 2011-12-13 22:46:46 -08:00
Jamie Cameron
f03fb2bd01 Add restart button for upstart
https://www.virtualmin.com/node/19326
2011-08-28 12:44:39 -07:00
Jamie Cameron
ffade70f1f Upstart fixes 2011-04-20 09:25:41 -07:00
Jamie Cameron
25faec7b12 Start/stop buttons per service, ability to comment out multi-line start blocks 2011-04-18 22:09:49 -07:00
Jamie Cameron
a71cfc40c9 Start / stop buttons 2011-04-18 11:30:20 -07:00
Jamie Cameron
03cccf811d More work on upstart 2011-04-16 13:06:39 -07:00
Jamie Cameron
f571fc6ad4 Ability to edit existing upstart actions 2011-04-16 00:13:35 -07:00
Jamie Cameron
474ebe8af9 Mass enable or disable of upstart actions 2011-04-15 23:53:29 -07:00
Jamie Cameron
777ba79640 Work on upstart support in bootup module 2011-04-14 18:31:20 -07:00
Jamie Cameron
20a3936f43 Don't perform text substitutions where not needed 2010-12-05 22:48:54 -08:00
Jamie Cameron
41dcf537be Fixed action logging messages 2009-01-13 22:49:32 +00:00
Jamie Cameron
e800bebd9a UI library re-write 2007-12-27 23:31:22 +00:00
Jamie Cameron
8b7637ed6b Shorten message 2007-10-22 21:23:53 +00:00
Jamie Cameron
fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00