From 1ad18bf128c4edfae76adaffd9c7801355f29b91 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Fri, 15 Feb 2019 10:40:56 +1100 Subject: 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 --- ui/ncurses/nc-cui.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/ncurses/nc-cui.h') 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 */ -- cgit v1.2.1