Commit Graph

35 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
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
ed42dd5822 Fix to always show description 2025-07-11 15:25:02 +03:00
Ilia Ross
a65f9f5d6c Fix to respect config option and show no description 2025-07-05 18:57:23 +03:00
Ilia Ross
4d417ea4bf Fix to put lengthy descriptions to a nice details element 2025-07-05 16:38:55 +03:00
Ilia Ross
2e245a1035 Add a separate "Unit type" column 2025-07-05 16:03:47 +03:00
Ilia Ross
780cc982b7 Revert "Fix to show .service unit type"
72621c2929 (commitcomment-161382677)

This reverts commit 37f9ce4bb4.
2025-07-04 01:18:58 +03:00
Ilia Ross
37f9ce4bb4 Fix to show .service unit type
72621c2929 (commitcomment-161316248)
2025-07-03 13:10:00 +03:00
Jamie Cameron
72621c2929 No need to show the .service suffix 2025-07-02 16:44:21 -07:00
Jamie Cameron
0009335636 HTML escape description in actions list 2024-09-02 10:13:19 -07:00
iliajie
3456f581de Fix to prevent masked services from being edited 2022-10-19 12:40:20 +03:00
iliajie
460ba7d8cd Add support to display No (masked) state 2022-10-19 12:33:08 +03:00
iliajie
d16b6433f3 Fix to display stopped, disable and masked in orange 2022-10-19 12:28:14 +03:00
Jamie Cameron
0c22608c7a Remove support for ancient caldera-only daemons_dir feature 2022-10-01 17:35:46 -07:00
Ilia Rostovtsev
3bd9b9dcbe Add status to systemd services 2022-02-19 16:17:23 +03: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
ac238e37d1 More work on launchd support for MacOS X 2015-05-02 15:33:36 -07:00
Jamie Cameron
4b2ba48e58 Work on launchd support 2015-04-25 22:00:07 -07:00
Nawawi Jamili
c45ddfc5d6 ui_link conversion -> init 2013-12-19 01:46:41 +08:00
Jamie Cameron
71dcaf3029 URL escape links to init scripts 2013-04-29 14:12:07 -07:00
Jamie Cameron
dda0c0e7a9 Allow mass stop and start of mixed-mode actions https://github.com/webmin/webmin/issues/43 2012-10-09 15:53:39 -07:00
Jamie Cameron
dc887337da Disallow mass operations on init.d actions when upstart is in use 2012-07-30 17:35:00 -07: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
f03fb2bd01 Add restart button for upstart
https://www.virtualmin.com/node/19326
2011-08-28 12:44:39 -07:00
Jamie Cameron
98f1c909c8 Re-factored code to get status and supported actions for an init script 2011-05-04 16:38:46 -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
3a0298e4f4 Handle status of 'no server running' 2011-04-06 12:58:01 -07:00
Jamie Cameron
cb2c523003 Handle "not running" status 2009-07-30 11:32:27 -07:00
Jamie Cameron
753026fa89 Fix column 2009-07-10 19:58:00 +00:00
Joe Cooper
5325b59fbc ui_hr 2008-05-10 03:07:43 +00:00
Jamie Cameron
e800bebd9a UI library re-write 2007-12-27 23:31:22 +00:00
Jamie Cameron
fca2565976 Make create links nicer 2007-05-15 22:04:16 +00:00
Jamie Cameron
fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00