summaryrefslogtreecommitdiffstats
path: root/src/vmspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-08-20 10:33:52 +0200
committerLennart Poettering <lennart@poettering.net>2024-08-20 11:11:53 +0200
commit300b7e7620e03cf85efcf821b2c7a6872266accc (patch)
tree247b94ba461cdd808187aca6025dbe120bf14540 /src/vmspawn
parentterminal-util: don't assume errno is correctly set when using isatty_safe() (diff)
downloadsystemd-300b7e7620e03cf85efcf821b2c7a6872266accc.tar.xz
systemd-300b7e7620e03cf85efcf821b2c7a6872266accc.zip
tree-wide: use isatty_safe() more
Diffstat (limited to 'src/vmspawn')
-rw-r--r--src/vmspawn/vmspawn-register.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vmspawn/vmspawn-register.c b/src/vmspawn/vmspawn-register.c
index 474cbd5df9..20e6def360 100644
--- a/src/vmspawn/vmspawn-register.c
+++ b/src/vmspawn/vmspawn-register.c
@@ -12,6 +12,7 @@
#include "process-util.h"
#include "socket-util.h"
#include "string-util.h"
+#include "terminal-util.h"
#include "vmspawn-register.h"
#include "varlink-util.h"
@@ -73,7 +74,7 @@ int register_machine(
SD_JSON_BUILD_PAIR_CONDITION(!!directory, "rootDirectory", SD_JSON_BUILD_STRING(directory)),
SD_JSON_BUILD_PAIR_CONDITION(!!address, "sshAddress", SD_JSON_BUILD_STRING(address)),
SD_JSON_BUILD_PAIR_CONDITION(!!key_path, "sshPrivateKeyPath", SD_JSON_BUILD_STRING(key_path)),
- SD_JSON_BUILD_PAIR_CONDITION(isatty(STDIN_FILENO), "allowInteractiveAuthentication", SD_JSON_BUILD_BOOLEAN(true)),
+ SD_JSON_BUILD_PAIR_CONDITION(isatty_safe(STDIN_FILENO), "allowInteractiveAuthentication", SD_JSON_BUILD_BOOLEAN(true)),
SD_JSON_BUILD_PAIR_CONDITION(!keep_unit, "allocateUnit", SD_JSON_BUILD_BOOLEAN(true)));
}