Commit Graph

25311 Commits

Author SHA1 Message Date
Ilia Ross
0290ec16a5 Fix to make packaged unit edits opt-in
ⓘ Default packaged unit files to read-only, keep drop-ins as the safe override path, hide boot controls for protected base units, and reject [Install] sections in drop-in overrides.
2026-06-23 23:24:44 +02:00
Ilia Ross
41b476c87a Fix to gate packaged unit deletion behind config
ⓘ Add a disabled-by-default module option for deleting packaged systemd unit files, while keeping local unit deletion allowed and enforcing the policy in both UI and backend paths.
2026-06-23 23:24:43 +02:00
Jamie Cameron
7a68b1b994 Merge pull request #2771 from webmin/dev/useradmin-edit-ssh-keys
Add editable SSH public keys for existing Unix users
2026-06-23 14:15:13 -07:00
Ilia Ross
0dbb5d2f89 Fix to share ifupdown parser with network detection
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-23 15:00:32 +02:00
Ilia Ross
27dcd2db4a Fix to validate SSH public keys without root privileges 2026-06-23 12:41:58 +02:00
Jamie Cameron
147e53e5db Merge pull request #2769 from webmin/dev/add-deb-dhcpcd-support-1607
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add dhcpcd network backend for Debian and Raspberry Pi OS
2026-06-22 21:21:33 -07:00
Jamie Cameron
a970bce5a5 Merge pull request #2760 from webmin/systemd
Add Systemd Services and Units module
2026-06-22 21:11:22 -07:00
Jamie Cameron
d1d1bad4ae Merge pull request #2772 from webmin/dev/miniserv-proxy-websockets
Add support to proxy linked-server WebSockets
2026-06-22 21:06:11 -07:00
Ilia Ross
7878ef466f Fix to expire abandoned linked websocket routes
ⓘ Use the existing scheduled websocket cleanup path for linked-server ws-link routes and expire unopened temporary routes after five minutes.

This limits how long credential-bearing proxy routes can remain in `miniserv.conf` while leaving active and normal websocket cleanup behavior unchanged.
2026-06-23 02:24:17 +02:00
Ilia Ross
14c8d9b61e Fix to clean up consumed linked websocket routes
ⓘ Remove single-use ws-link routes when backend setup fails or after the backend handshake is consumed, with final loop cleanup kept as a fallback.

This prevents failed linked websocket retries from leaving temporary credential-bearing routes in `miniserv.conf`.
2026-06-23 01:30:29 +02:00
Ilia Ross
fa09b191b9 Fix to avoid storing browser sessions for xterm websockets
ⓘ Only store `backend_session` for xterm websocket routes when there is no real browser session and a one-time backend key is needed. Normal xterm sessions continue using the browser session directly.
2026-06-23 01:12:44 +02:00
Ilia Ross
c72d232e2f Fix to restrict Basic auth for websocket routes
ⓘ Require websocket routes to opt in with allow_basic_ws before Basic auth is accepted in session mode. Mark linked ws-link routes and no-cookie backend-session routes as allowed, while leaving normal session-backed routes unmarked.
2026-06-23 01:09:43 +02:00
Ilia Ross
6091f08e37 Fix comment 2026-06-22 23:01:58 +02:00
Ilia Ross
d42a6dc725 Fix parent-prefixed linked websocket rewrites
ⓘ Correct linked-server WebSocket proxy registration for parent-prefixed URLs, rebuild backend Host/Origin from the child server, and prevent duplicate rewrites from invalidating tokens.
2026-06-22 23:01:46 +02:00
Ilia Ross
fac6b478b5 Fix to drain pending SSL data in websocket proxy
ⓘ Check OpenSSL's pending buffer before `select()` in the websocket forwarding loop so TLS-backed linked websocket streams do not stall during bursty backend output.
2026-06-22 21:47:16 +02:00
Ilia Ross
a0b67db65b Fix to simplify Miniserv config lock handling
ⓘ Remove the obsolete eval around `flock` in the `miniserv` config lock helper and report lock, write, and close failures explicitly.
2026-06-22 20:41:02 +02:00
Ilia Ross
26311baab9 Fix to use Webmin config locking for ws-link cleanup
ⓘ Make linked websocket teardown use the same `miniserv.conf.lock` convention as `link.cgi`, release the lock safely on cleanup errors
2026-06-22 20:34:00 +02:00
Ilia Ross
7ba1a39271 Fix parent route cleanup work 2026-06-22 20:02:56 +02:00
Ilia Ross
45ca170c20 Add support to proxy linked-server WebSockets
This PR adds general WebSocket proxying for linked Webmin servers, allowing modules such as `xterm` to work when opened through `servers/link.cgi`.

As requested in https://github.com/webmin/webmin/issues/1866.
2026-06-22 16:19:33 +02:00
Ilia Ross
4064f0675c Fix noisy warning
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-22 12:52:32 +02:00
Ilia Ross
886352c6e8 Fix changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-22 02:23:29 +02:00
Ilia Ross
f2fe6c930f Fix to change systemd ACL helper calls
https://github.com/webmin/webmin/pull/2760#discussion_r3449183293
2026-06-22 02:14:10 +02:00
Ilia Ross
762e400156 Add editable SSH public keys for existing Unix users
This PR adds SSH public key management to the Users and Groups edit flow for existing Unix users.

Webmin stores its managed key with a readable marker in `authorized_keys`, validates submitted public keys, preserves unrelated keys, supports rename/update/remove flows, and performs user `.ssh` file operations as the target Unix user.

https://github.com/webmin/webmin/issues/1827
2026-06-22 01:34:40 +02:00
Ilia Ross
f5bf2be07b Add Apache process limit directive help 2026-06-21 23:25:15 +02:00
Ilia Ross
57d650cf9f Add help files for new Apache options
https://github.com/webmin/webmin/issues/1821
2026-06-21 23:03:19 +02:00
Ilia Ross
859169bbae Update changelog 2026-06-21 23:02:34 +02:00
Ilia Ross
3f48d37e7a Add Apache 2.4 MPM process limit directives
Expose missing prefork, worker, and event MPM tuning directives under Apache Processes and Limits, including MaxRequestWorkers, ServerLimit, ThreadLimit, ThreadsPerChild, and spare-thread controls.

https://github.com/webmin/webmin/issues/1821
2026-06-21 22:52:13 +02:00
Ilia Ross
d3be11911e Add to accept CPU fan speed sensor labels
Allow dashboard CPU fan detection to recognize lm-sensors labels like “cpu fan speed” while leaving non-CPU fan labels ignored.

https://github.com/webmin/webmin/issues/1737
2026-06-21 21:11:58 +02:00
Ilia Ross
65f5beeb11 Add hardware RAID passthrough devices config
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Add an opt-in SMART module config option for manually listing hardware RAID passthrough devices, expose configured physical disks to smartctl, and document the option.

https://github.com/webmin/webmin/issues/1704
2026-06-21 19:47:19 +02:00
Ilia Ross
8ba6a02122 Merge branch 'master' into dev/add-deb-dhcpcd-support-1607 2026-06-21 00:00:06 +02:00
Ilia Ross
74fd072551 Fix to drop unnecessary parens 2026-06-20 20:23:36 +02:00
Ilia Ross
b75a95dd42 Fix missing space after if 2026-06-20 20:22:08 +02:00
Jamie Cameron
8c631bceeb Merge pull request #2770 from webmin/dev/net-module-fixes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Fix network module edge cases
2026-06-20 08:59:53 -07:00
Ilia Ross
0cf6654fd9 Fix Postfix localhost destination after hostname domain change
- When the system hostname domain changes, update `localhost.<old-domain>` in Postfix `mydestination` to `localhost.<new-domain>`.

- This sits alongside the existing hostname/FQDN updates for Postfix destinations.

Previous behavior:

`save_dns.cgi` only updated Postfix `mydestination` entries that exactly matched:

- the old short hostname, like `host`
- the old FQDN, like `host.old-domain.test`

It did **not** update:

- `localhost.old-domain.test`

So if you changed:

```text
host.old-domain.test
```

to:

```text
host.new-domain.test
```

Postfix could become:

```text
mydestination = host.new-domain.test, host, localhost.old-domain.test
```

After this hunk, it also updates that localhost domain entry:

```text
localhost.old-domain.test
```

to:

```text
localhost.new-domain.test
```
2026-06-20 15:33:22 +02:00
Ilia Ross
c08468ec48 Fix network config spacing preservation
- Preserve existing spacing and inline comments when rewriting `/etc/nsswitch.conf` `hosts:` lines.

- Preserve indentation, comment prefix, inline comments, and field separators when rewriting `/etc/hosts` rows.

- Add tests for the `nsswitch.conf` spacing/comment behavior.
2026-06-20 15:27:28 +02:00
Ilia Ross
cb4a322042 Fix active virtual interface handling
ⓘ Treat Linux active virtual interfaces as secondary IP addresses instead of independent links, fixing alias parsing, hiding invalid status controls, rejecting down-state creation, and removing existing aliases with ip addr del when needed.

Reproduce path:

Example repro before this fix:

1. Go to **Network Configuration → Network Interfaces → Active Now**.
2. Click **Add a new interface**.
3. Enter:

```text
Name: enp0s5:1
IPv4 address: 10.211.55.21
Netmask: 255.255.255.0
Status: Down
```

4. Click **Create**.

Before the fix, Webmin could still create the alias or handle it inconsistently, because `enp0s5:1` is not a real link that can be “down”. It is just an extra IP address on `enp0s5`.

Expected after the fix:

- The UI should not offer `Status` for active virtual aliases.
- If someone submits `up=0` manually anyway, Webmin rejects it with:
  `Virtual interfaces cannot be created with down status`
- If an existing active virtual alias is saved as down through lower-level code, Webmin removes the IP using something like:

```bash
ip addr del 10.211.55.21/24 dev enp0s5
```
2026-06-20 15:23:09 +02:00
Ilia Ross
f2782073ce Fix to remove factored-out virtual alias changes 2026-06-20 15:09:31 +02:00
Ilia Ross
090aed60df Fix to remove unrelated network formatting cleanups 2026-06-20 14:44:51 +02:00
Ilia Ross
b53ca5b618 Add API helper for dependent form field state
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ API is ui_form_field_state_javascript
2026-06-20 03:29:29 +02:00
Ilia Ross
7ebe3f7dfa Add dhcpcd network backend for Debian and Raspberry Pi OS
This PR adds dhcpcd backend support for Debian and Raspberry Pi OS network configuration. It detects dhcpcd only as a final fallback after Netplan, NetworkManager, and ifupdown, preventing Webmin from incorrectly falling back to `/etc/network/interfaces` on dhcpcd-managed systems.

The new backend reads and writes `/etc/dhcpcd.conf`, including DHCP and static IPv4/IPv6 configuration, gateways, static routes, DNS servers, search domains, MTU, and virtual IPv4 aliases. It also supports implicit DHCP-managed interfaces for default dhcpcd setups with no explicit interface blocks, and handles `allowinterfaces` / `denyinterfaces` behavior.

This PR also fixes apply/delete flows for dhcpcd-managed interfaces and virtual aliases, avoids rewriting generated `/etc/resolv.conf`, preserves spacing/comments in touched hosts and nsswitch files, and tightens Active Now handling so virtual aliases are treated as IP addresses rather than independent links.

https://github.com/webmin/webmin/issues/1607
2026-06-20 01:57:50 +02:00
Jamie Cameron
fc546e1e65 Fix key field in new slave zones
https://github.com/webmin/webmin/issues/2767
2026-06-19 15:42:13 -07:00
Jamie Cameron
29c14acf98 Merge pull request #2749 from webmin/dev/tmp-dir-auto
Fix Webmin temp directory setup in Advanced Options
2026-06-19 12:52:18 -07:00
Jamie Cameron
ea02aeb04a Merge pull request #2768 from webmin/dev/miniserv-ipv6-cidr-1570
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix IPv6 CIDR access control matching
2026-06-19 10:04:04 -07:00
Jamie Cameron
d306a63744 Merge pull request #2766 from bob7123/fix-sni-callback-all-contexts
Register SNI callback on all SSL contexts, not just the default
2026-06-19 09:59:07 -07:00
Ilia Ross
a9c6fe724a Fix IPv6 CIDR access control matching
This PR fixes Webmin IP access control handling for IPv6 CIDR prefixes that are not divisible by 8, such as `/29` as mentioned in this https://github.com/webmin/webmin/issues/1570 ticket.

Before Webmin validation rejected non-byte-aligned IPv6 network sizes, and the runtime matcher compared IPv6 networks only by whole bytes. This meant valid IPv6 CIDR prefixes could not be used safely in access control rules.

Changes:
- Allow IPv6 access-control prefixes from `/0` through `/128`, without requiring divisibility by 8.
- Add bit-accurate IPv6 prefix matching for ACL checks.
- Apply the same matching behavior in both `miniserv.pl` and `webmin/webmin-lib.pl`.
- Fix IPv6 canonicalization for `::` and trailing `::` forms used by the matcher.
- Add regression tests for `/0`, `/29`, `/32`, `/63`, `/64`, `/127`, and `/128`.
2026-06-19 14:50:24 +02:00
Ilia Ross
7fd89fb350 Fix to clarify Postfix virtual alias map labels
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ The Postfix module’s “Virtual Domains” page actually manages `virtual_alias_maps`, not `virtual_mailbox_domains`.

This updates the UI labels, help text, ACL wording, and log message to call the feature "Virtual Alias Maps", reducing confusion without changing behavior.

https://github.com/webmin/webmin/issues/1541
2026-06-19 11:41:08 +02:00
Ilia Ross
ccd2b13942 Fix to enforce private basename for Webmin temp dirs
ⓘ Adds hidden `tempdirname` support and normalizes custom temp paths so Webmin always uses a private final directory like `.webmin`, while keeping the existing permission checks.
2026-06-18 20:48:47 +02:00
bob7123
74bd78ae35 Fix indentation inside foreach loop per review 2026-06-18 08:23:45 +00:00
Ilia Ross
74fd0ca12d Fix XML-RPC CGI execution under miniserv
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Allow xmlrpc.cgi to run when invoked through Webmin's internal CGI do() path while preserving require-safe helper tests, and add regression coverage for CGI header emission.

https://github.com/webmin/webmin/pull/2763#issuecomment-4726296870
2026-06-17 15:06:18 +02:00
Jamie Cameron
8157ff60d2 Merge pull request #2732 from swelljoe/ui-lib-tests-and-quote-escapes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add some ui-lib tests and fix quote escapes
2026-06-16 22:29:23 -07:00