diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2023-09-21 18:01:17 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-10-01 22:58:20 +0200 |
| commit | c3a19cc2ac7ddc821d7fc56455f68546b087be47 (patch) | |
| tree | a8819cf08890f814689364afe3a6140e01de3fbd /gnu/tests/virtualization.scm | |
| parent | 100d71f8a144fd58fc20b7ffa942b550118db526 (diff) | |
services: hurd-vm: Disable password-based authentication for root.
With offloading to a childhurd is enabled, allowing password-less root
login in the childhurd to anyone amounts to providing write access to
the host’s store to anyone. Thus, disable password-based root logins in
the childhurd.
* gnu/services/virtualization.scm (%hurd-vm-operating-system): Change
‘permit-root-login’ to 'prohibit-password.
* gnu/tests/virtualization.scm (%childhurd-os): Provide a custom ‘os’
field for ‘hurd-vm-configuration’.
* doc/guix.texi (Virtualization Services): Remove mention of
password-less root login.
Diffstat (limited to 'gnu/tests/virtualization.scm')
| -rw-r--r-- | gnu/tests/virtualization.scm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index 9e7928703e3..599e58edf0a 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #:use-module (gnu services) | 31 | #:use-module (gnu services) |
| 32 | #:use-module (gnu services dbus) | 32 | #:use-module (gnu services dbus) |
| 33 | #:use-module (gnu services networking) | 33 | #:use-module (gnu services networking) |
| 34 | #:use-module (gnu services ssh) | ||
| 34 | #:use-module (gnu services virtualization) | 35 | #:use-module (gnu services virtualization) |
| 35 | #:use-module (gnu packages ssh) | 36 | #:use-module (gnu packages ssh) |
| 36 | #:use-module (gnu packages virtualization) | 37 | #:use-module (gnu packages virtualization) |
| @@ -228,7 +229,19 @@ | |||
| 228 | (define %childhurd-os | 229 | (define %childhurd-os |
| 229 | (simple-operating-system | 230 | (simple-operating-system |
| 230 | (service dhcp-client-service-type) | 231 | (service dhcp-client-service-type) |
| 231 | (service hurd-vm-service-type))) | 232 | (service hurd-vm-service-type |
| 233 | (hurd-vm-configuration | ||
| 234 | ;; Allow root login with an empty password to simplify the test | ||
| 235 | ;; below. | ||
| 236 | (os (operating-system | ||
| 237 | (inherit %hurd-vm-operating-system) | ||
| 238 | (services | ||
| 239 | (modify-services (operating-system-user-services | ||
| 240 | %hurd-vm-operating-system) | ||
| 241 | (openssh-service-type | ||
| 242 | config => (openssh-configuration | ||
| 243 | (inherit config) | ||
| 244 | (permit-root-login #t))))))))))) | ||
| 232 | 245 | ||
| 233 | (define (run-childhurd-test) | 246 | (define (run-childhurd-test) |
| 234 | (define os | 247 | (define os |
