diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2019-02-15 10:40:56 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2019-03-26 16:46:38 +1100 |
commit | 1ad18bf128c4edfae76adaffd9c7801355f29b91 (patch) | |
tree | 40808aac6ec04d42c62eb445f99c286372a29b06 /ui/ncurses/nc-cui.h | |
parent | f583f0cf35fc227db5f73ecd04daf7702735b740 (diff) | |
download | talos-petitboot-1ad18bf128c4edfae76adaffd9c7801355f29b91.tar.gz talos-petitboot-1ad18bf128c4edfae76adaffd9c7801355f29b91.zip |
ui/ncurses: Add prompt for LUKS device password
Implement device_add() in cui_client_ops and use this interface to
recognise when the server notifies the client of an encrypted device. A
"device header" will be created for this device and added to the menu
with no associated boot options.
The nc-auth prompt is extended to ask for a disk password when the device
header for an encrypted device is selected.
Assuming the password is correct pb-discover will remove the original
device and notify the client about the newly opened device, which will
be reflected in the menu.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui/ncurses/nc-cui.h')
-rw-r--r-- | ui/ncurses/nc-cui.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/ncurses/nc-cui.h b/ui/ncurses/nc-cui.h index 8fa27aa..039aa92 100644 --- a/ui/ncurses/nc-cui.h +++ b/ui/ncurses/nc-cui.h @@ -101,11 +101,14 @@ void cui_show_plugin(struct pmenu_item *item); void cui_show_plugin_menu(struct cui *cui); void cui_show_auth(struct cui *cui, WINDOW *parent, bool set_password, void (*callback)(struct nc_scr *)); +void cui_show_open_luks(struct cui *cui, WINDOW *parent, + const struct device *dev); int cui_send_config(struct cui *cui, struct config *config); int cui_send_url(struct cui *cui, char *url); int cui_send_plugin_install(struct cui *cui, char *file); int cui_send_authenticate(struct cui *cui, char *password); int cui_send_set_password(struct cui *cui, char *password, char *new_password); +int cui_send_open_luks_device(struct cui *cui, char *password, char *device_id); void cui_send_reinit(struct cui *cui); /* convenience routines */ |