summaryrefslogtreecommitdiff
path: root/src/basic/terminal-util.h
diff options
context:
space:
mode:
authorWerner Fink <werner@suse.de>2015-11-18 12:28:30 +0100
committerFranck Bui <fbui@suse.com>2016-05-24 11:57:27 +0200
commit6af621248f2255f9ce50b0bafdde475305dc4e57 (patch)
treed766a8a616f8126fc9fa828f5a73e8e57bcbb487 /src/basic/terminal-util.h
parent2099b3e9931eea8962cf7a97493abf9361cc6366 (diff)
ask-password: ask for passphrases not only on the first console of /dev/console
but also on all other consoles. This does help on e.g. mainframes where often a serial console together with other consoles are used. Even rack based servers attachted to both a serial console as well as having a virtual console do sometimes miss a connected monitor. To be able to ask on all terminal devices of /dev/console the devices are collected. If more than one device are found, then on each of the terminals a inquiring task for passphrase is forked and do not return to the caller. Every task has its own session and its own controlling terminal. If one of the tasks does handle a password, the remaining tasks will be terminated. Also let contradictory options on the command of systemd-tty-ask-password-agent fail. Spwan for each device of the system console /dev/console a own process. Replace the system call wait() with with system call waitid(). Use SIGTERM instead of SIGHUP to get unresponsive childs down. Port the collect_consoles() function forward to a pulbic and strv based function "get_kernel_consoles()" in terminal-util.c and use this in tty-ask-password-agent.c.
Diffstat (limited to 'src/basic/terminal-util.h')
-rw-r--r--src/basic/terminal-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
index a7c96a77cb..b449370974 100644
--- a/src/basic/terminal-util.h
+++ b/src/basic/terminal-util.h
@@ -62,6 +62,7 @@ int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
int vt_disallocate(const char *name);
char *resolve_dev_console(char **active);
+int get_kernel_consoles(char ***consoles);
bool tty_is_vc(const char *tty);
bool tty_is_vc_resolve(const char *tty);
bool tty_is_console(const char *tty) _pure_;