aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-01 13:20:53 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-01 13:20:53 +0100
commit1589f5fbe8fd87858d1a06517db5a7baae918f4f (patch)
treecb78afc11c0ced7fab36d3bb1195bb7d06f95e81 /boot
parentec31a6b9578148086fa6c698ea75230468b52e4c (diff)
downloadhurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.tar.gz
hurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.tar.bz2
hurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.zip
Do not ignore value returned by get_privileged_ports
Diffstat (limited to 'boot')
-rw-r--r--boot/boot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/boot.c b/boot/boot.c
index 0a7091e3..eb78a1c6 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -559,9 +559,10 @@ main (int argc, char **argv, char **envp)
if (want_privileged)
{
- get_privileged_ports (&privileged_host_port, &master_device_port);
- privileged = MACH_PORT_VALID (master_device_port);
+ if (get_privileged_ports (&privileged_host_port, &master_device_port))
+ error (1, 0, "Must be run as root for privileged subhurds");
+ privileged = MACH_PORT_VALID (master_device_port);
if (! privileged)
error (1, 0, "Must be run as root for privileged subhurds");
}