diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-01-11 19:06:38 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-01-11 19:06:38 +0300 |
commit | 2849b6d6200b8953457c5e55dbe8495c7d5fb80c (patch) | |
tree | e0b2e04d12cd965d04d825f4dce2cf687b091abf /src | |
parent | f45d845161150577d3578275b68514832d7bd98a (diff) |
Fixing password unlocking - unlocked = FALSE
Diffstat (limited to 'src')
-rw-r--r-- | src/remmina_file.c | 2 | ||||
-rw-r--r-- | src/remmina_passwd.c | 14 | ||||
-rw-r--r-- | src/remmina_passwd.h | 2 | ||||
-rw-r--r-- | src/remmina_pref.c | 6 | ||||
-rw-r--r-- | src/remmina_pref.h | 9 | ||||
-rw-r--r-- | src/remmina_pref_dialog.c | 3 | ||||
-rw-r--r-- | src/remmina_pref_dialog.h | 1 | ||||
-rw-r--r-- | src/remmina_sodium.c | 51 | ||||
-rw-r--r-- | src/remmina_unlock.c | 170 | ||||
-rw-r--r-- | src/remmina_unlock.h | 2 |
10 files changed, 184 insertions, 76 deletions
diff --git a/src/remmina_file.c b/src/remmina_file.c index d19d31ab2..11be7054e 100644 --- a/src/remmina_file.c +++ b/src/remmina_file.c @@ -430,7 +430,7 @@ remmina_file_load(const gchar *filename) } } - upgrade_sshkeys_202001(remminafile); + upgrade_sshkeys_202001(remminafile); g_strfreev(keys); remmina_file_set_statefile(remminafile); g_key_file_free(gkeyfile); diff --git a/src/remmina_passwd.c b/src/remmina_passwd.c index f2a34f9df..ad23ffde7 100644 --- a/src/remmina_passwd.c +++ b/src/remmina_passwd.c @@ -96,8 +96,7 @@ static void remmina_passwd_password_activate(GtkEntry *entry, gpointer user_data static void remmina_passwd_cancel_clicked(GtkButton *btn, gpointer user_data) { TRACE_CALL(__func__); - gtk_widget_destroy(GTK_WIDGET(remmina_passwd_dialog->dialog)); - remmina_passwd_dialog->dialog = NULL; + gtk_dialog_response (remmina_passwd_dialog->dialog, GTK_RESPONSE_CANCEL); } static void remmina_passwd_submit_clicked(GtkButton *btn, gpointer user_data) @@ -108,11 +107,12 @@ static void remmina_passwd_submit_clicked(GtkButton *btn, gpointer user_data) gtk_dialog_response (remmina_passwd_dialog->dialog, GTK_RESPONSE_ACCEPT); } -void remmina_passwd(GtkWindow *parent, gchar **unlock_password) +gboolean remmina_passwd(GtkWindow *parent, gchar **unlock_password) { TRACE_CALL(__func__); remmina_passwd_dialog = g_new0(RemminaPasswdDialog, 1); + gboolean rc = FALSE; remmina_passwd_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_passwd.glade"); remmina_passwd_dialog->dialog = GTK_DIALOG(GET_OBJ("RemminaPasswdDialog")); @@ -147,11 +147,17 @@ void remmina_passwd(GtkWindow *parent, gchar **unlock_password) #else *unlock_password = g_strdup(remmina_passwd_dialog->password); #endif - //REMMINA_DEBUG ("Password after encryption is: %s", *unlock_password); + REMMINA_DEBUG ("Password after encryption is: %s", *unlock_password); remmina_passwd_dialog->password = NULL; + rc = TRUE; break; default: + remmina_passwd_dialog->password = NULL; + *unlock_password = NULL; + rc = FALSE; break; } gtk_widget_destroy(GTK_WIDGET(remmina_passwd_dialog->dialog)); + remmina_passwd_dialog->dialog = NULL; + return rc; } diff --git a/src/remmina_passwd.h b/src/remmina_passwd.h index 3c214d1ac..415b8c016 100644 --- a/src/remmina_passwd.h +++ b/src/remmina_passwd.h @@ -53,6 +53,6 @@ typedef struct _RemminaPasswdDialog { G_BEGIN_DECLS -void remmina_passwd(GtkWindow *parent, gchar **password_setting); +gboolean remmina_passwd(GtkWindow *parent, gchar **password_setting); G_END_DECLS diff --git a/src/remmina_pref.c b/src/remmina_pref.c index a00b20751..16bf341c5 100644 --- a/src/remmina_pref.c +++ b/src/remmina_pref.c @@ -310,6 +310,11 @@ void remmina_pref_init(void) else remmina_pref.lock_edit = FALSE; + if (g_key_file_has_key(gkeyfile, "remmina_pref", "enc_mode", NULL)) + remmina_pref.enc_mode = g_key_file_get_integer(gkeyfile, "remmina_pref", "enc_mode", NULL); + else + remmina_pref.enc_mode = 0; + if (g_key_file_has_key(gkeyfile, "remmina_pref", "audit", NULL)) remmina_pref.audit = g_key_file_get_boolean(gkeyfile, "remmina_pref", "audit", NULL); else @@ -800,6 +805,7 @@ gboolean remmina_pref_save(void) g_key_file_set_boolean(gkeyfile, "remmina_pref", "lock_connect", FALSE); g_key_file_set_boolean(gkeyfile, "remmina_pref", "lock_edit", FALSE); #endif + g_key_file_set_integer(gkeyfile, "remmina_pref", "enc_mode", remmina_pref.enc_mode); g_key_file_set_boolean(gkeyfile, "remmina_pref", "audit", remmina_pref.audit); g_key_file_set_boolean(gkeyfile, "remmina_pref", "trust_all", remmina_pref.trust_all); g_key_file_set_integer(gkeyfile, "remmina_pref", "floating_toolbar_placement", remmina_pref.floating_toolbar_placement); diff --git a/src/remmina_pref.h b/src/remmina_pref.h index d417f54c4..1f7e9f0f1 100644 --- a/src/remmina_pref.h +++ b/src/remmina_pref.h @@ -81,6 +81,14 @@ enum { }; enum { + RM_ENC_MODE_SECRET = 0, /* Using libsecret */ + RM_ENC_MODE_SODIUM_INTERACTIVE = 1, /* Using libsodium */ + RM_ENC_MODE_SODIUM_MODERATE = 2, /* Using libsodium */ + RM_ENC_MODE_SODIUM_SENSITIVE = 3, /* Using libsodium */ + RM_ENC_MODE_GCRYPT = 4 /* Using GCrypt */ +}; + +enum { FLOATING_TOOLBAR_VISIBILITY_PEEKING = 0, FLOATING_TOOLBAR_VISIBILITY_INVISIBLE = 1, //"Invisible" corresponds to the "Hidden" option in the drop-down FLOATING_TOOLBAR_VISIBILITY_DISABLE = 2 @@ -173,6 +181,7 @@ typedef struct _RemminaPref { gint unlock_timeout; gboolean lock_connect; gboolean lock_edit; + gint enc_mode; gboolean audit; gboolean trust_all; /* In RemminaPrefDialog terminal tab */ diff --git a/src/remmina_pref_dialog.c b/src/remmina_pref_dialog.c index 3887ad662..b44491654 100644 --- a/src/remmina_pref_dialog.c +++ b/src/remmina_pref_dialog.c @@ -241,6 +241,7 @@ void remmina_pref_on_dialog_destroy(GtkWidget *widget, gpointer user_data) #endif remmina_pref.lock_connect = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_security_lock_connect)); remmina_pref.lock_edit = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_security_lock_edit)); + remmina_pref.enc_mode = gtk_combo_box_get_active(remmina_pref_dialog->comboboxtext_security_enc_method); remmina_pref.audit = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_security_audit)); remmina_pref.trust_all = gtk_switch_get_active(GTK_SWITCH(remmina_pref_dialog->switch_security_trust_all)); remmina_pref.screenshot_path = gtk_file_chooser_get_filename(remmina_pref_dialog->filechooserbutton_options_screenshots_path); @@ -653,6 +654,7 @@ static void remmina_pref_dialog_init(void) gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_options_double_click, remmina_pref.default_action); gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_appearance_view_mode, remmina_pref.default_mode); gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_appearance_tab_interface, remmina_pref.tab_mode); + gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_security_enc_method, remmina_pref.enc_mode); gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_appearance_fullscreen_toolbar_visibility, remmina_pref.fullscreen_toolbar_visibility); gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_options_scale_quality, remmina_pref.scale_quality); gtk_combo_box_set_active(remmina_pref_dialog->comboboxtext_options_ssh_loglevel, remmina_pref.ssh_loglevel); @@ -726,6 +728,7 @@ GtkWidget *remmina_pref_dialog_new(gint default_tab, GtkWindow *parent) remmina_pref_dialog->unlock_repassword = GTK_ENTRY(GET_OBJECT("unlock_repassword")); remmina_pref_dialog->switch_security_lock_connect = GTK_SWITCH(GET_OBJECT("switch_security_lock_connect")); remmina_pref_dialog->switch_security_lock_edit = GTK_SWITCH(GET_OBJECT("switch_security_lock_edit")); + remmina_pref_dialog->comboboxtext_security_enc_method = GTK_COMBO_BOX(GET_OBJECT("comboboxtext_security_enc_method")); remmina_pref_dialog->switch_security_audit = GTK_SWITCH(GET_OBJECT("switch_security_audit")); remmina_pref_dialog->switch_security_trust_all = GTK_SWITCH(GET_OBJECT("switch_security_trust_all")); remmina_pref_dialog->checkbutton_options_save_settings = GTK_CHECK_BUTTON(GET_OBJECT("checkbutton_options_save_settings")); diff --git a/src/remmina_pref_dialog.h b/src/remmina_pref_dialog.h index 74a086ef2..583fdd864 100644 --- a/src/remmina_pref_dialog.h +++ b/src/remmina_pref_dialog.h @@ -76,6 +76,7 @@ typedef struct _RemminaPrefDialog { GtkComboBox * comboboxtext_options_scale_quality; GtkComboBox * comboboxtext_options_ssh_loglevel; GtkComboBox * comboboxtext_appearance_fullscreen_toolbar_visibility; + GtkComboBox * comboboxtext_security_enc_method; GtkCheckButton * checkbutton_options_ssh_parseconfig; GtkEntry * entry_options_ssh_port; GtkEntry * entry_options_ssh_tcp_keepidle; diff --git a/src/remmina_sodium.c b/src/remmina_sodium.c index 9e55d23c2..49948bd83 100644 --- a/src/remmina_sodium.c +++ b/src/remmina_sodium.c @@ -65,6 +65,7 @@ #include "config.h" #include <glib.h> +#include "remmina_pref.h" #include "remmina/remmina_trace_calls.h" #include "remmina_sodium.h" @@ -78,11 +79,32 @@ gchar *remmina_sodium_pwhash(const gchar *pass) unsigned char salt[crypto_pwhash_SALTBYTES] = { 0 }; randombytes_buf(salt, sizeof salt); + unsigned long long opslimit; + size_t memlimit; + + switch (remmina_pref.enc_mode) { + case RM_ENC_MODE_SODIUM_MODERATE: + opslimit = crypto_pwhash_OPSLIMIT_MODERATE; + memlimit = crypto_pwhash_MEMLIMIT_MODERATE; + break; + case RM_ENC_MODE_SODIUM_SENSITIVE: + opslimit = crypto_pwhash_OPSLIMIT_SENSITIVE; + memlimit = crypto_pwhash_MEMLIMIT_SENSITIVE; + break; + case RM_ENC_MODE_GCRYPT: + case RM_ENC_MODE_SECRET: + case RM_ENC_MODE_SODIUM_INTERACTIVE: + default: + opslimit = crypto_pwhash_OPSLIMIT_INTERACTIVE; + memlimit = crypto_pwhash_MEMLIMIT_INTERACTIVE; + break; + } + /* Use argon2 to convert password to a full size key */ unsigned char key[crypto_secretbox_KEYBYTES]; if (crypto_pwhash(key, sizeof key, pass, strlen(pass), salt, - crypto_pwhash_OPSLIMIT_INTERACTIVE, - crypto_pwhash_MEMLIMIT_INTERACTIVE, + opslimit, + memlimit, crypto_pwhash_ALG_DEFAULT) != 0) { g_error("%s - Out of memory!", __func__); exit(1); @@ -100,11 +122,32 @@ gchar *remmina_sodium_pwhash_str(const gchar *pass) unsigned char salt[crypto_pwhash_SALTBYTES] = { 0 }; randombytes_buf(salt, sizeof salt); + unsigned long long opslimit; + size_t memlimit; + + switch (remmina_pref.enc_mode) { + case RM_ENC_MODE_SODIUM_MODERATE: + opslimit = crypto_pwhash_OPSLIMIT_MODERATE; + memlimit = crypto_pwhash_MEMLIMIT_MODERATE; + break; + case RM_ENC_MODE_SODIUM_SENSITIVE: + opslimit = crypto_pwhash_OPSLIMIT_SENSITIVE; + memlimit = crypto_pwhash_MEMLIMIT_SENSITIVE; + break; + case RM_ENC_MODE_GCRYPT: + case RM_ENC_MODE_SECRET: + case RM_ENC_MODE_SODIUM_INTERACTIVE: + default: + opslimit = crypto_pwhash_OPSLIMIT_INTERACTIVE; + memlimit = crypto_pwhash_MEMLIMIT_INTERACTIVE; + break; + } + /* Use argon2 to convert password to a full size key */ char key[crypto_pwhash_STRBYTES]; if (crypto_pwhash_str(key, pass, strlen(pass), - crypto_pwhash_OPSLIMIT_INTERACTIVE, - crypto_pwhash_MEMLIMIT_INTERACTIVE) != 0) { + opslimit, + memlimit) != 0) { g_error("%s - Out of memory!", __func__); exit(1); } diff --git a/src/remmina_unlock.c b/src/remmina_unlock.c index 10f1dac0a..ebd934fcc 100644 --- a/src/remmina_unlock.c +++ b/src/remmina_unlock.c @@ -53,7 +53,7 @@ static RemminaUnlockDialog *remmina_unlock_dialog; #define GET_OBJ(object_name) gtk_builder_get_object(remmina_unlock_dialog->builder, object_name) GTimer *timer; -gboolean isinit; +gboolean unlocked; static void remmina_unlock_timer_init() { @@ -94,21 +94,20 @@ static void remmina_unlock_unlock_clicked(GtkButton *btn, gpointer user_data) if (rc == 0) { REMMINA_DEBUG("Passphrase veryfied successfully"); - remmina_unlock_timer_reset(remmina_unlock_dialog); - gtk_widget_destroy(GTK_WIDGET(remmina_unlock_dialog->dialog)); - remmina_unlock_dialog->dialog = NULL; + //unlocked = FALSE; + remmina_unlock_dialog->retval = TRUE; } else { REMMINA_WARNING ("Passphrase is wrong, to reset it, you can edit the remmina.pref file by hand"); + remmina_unlock_timer_reset(remmina_unlock_dialog); + remmina_unlock_dialog->retval = FALSE; } + gtk_dialog_response(remmina_unlock_dialog->dialog, GTK_RESPONSE_ACCEPT); } static void remmina_unlock_cancel_clicked(GtkButton *btn, gpointer user_data) { TRACE_CALL(__func__); - isinit = FALSE; - remmina_unlock_dialog->retval = 0; - gtk_widget_destroy(GTK_WIDGET(remmina_unlock_dialog->dialog)); - remmina_unlock_dialog->dialog = NULL; + gtk_dialog_response(remmina_unlock_dialog->dialog, GTK_RESPONSE_CANCEL); } gint remmina_unlock_new(GtkWindow *parent) @@ -117,68 +116,109 @@ gint remmina_unlock_new(GtkWindow *parent) gdouble unlock_timeout; gdouble elapsed = 0.0; - gboolean lock = TRUE; - - unlock_timeout = remmina_pref.unlock_timeout; - - remmina_unlock_dialog = g_new0(RemminaUnlockDialog, 1); - remmina_unlock_dialog->retval = 1; + gboolean lock = FALSE; + gboolean rc; - if (timer == NULL) + /* We don't have a timer, so this is the first time + * or the timer has been destroyed + */ + if (timer == NULL) { remmina_unlock_timer_init(); + unlocked = FALSE; + } + + /* We have a timer, we get the elapsed time since its start */ if (timer != NULL) elapsed = g_timer_elapsed(timer, NULL); - if (((int)unlock_timeout - elapsed) < 0) lock = TRUE; - if (((int)unlock_timeout - elapsed) >= 0) lock = FALSE; - /* timer & timout = 0 */ - if (timer != NULL && (int)unlock_timeout == 0) lock = FALSE; - /* first time and timout = 30 */ - if (isinit == 0 && (int)unlock_timeout >= 0) { - lock = TRUE; - isinit = TRUE; - } - /* first time and timout = 0 */ - if (isinit == 0 && (int)unlock_timeout == 0) { - lock = TRUE; - isinit = TRUE; - } - REMMINA_DEBUG("Based on settings and current status, the unlock dialog is set to %d", lock); - - remmina_unlock_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_unlock.glade"); - remmina_unlock_dialog->dialog = GTK_DIALOG(gtk_builder_get_object(remmina_unlock_dialog->builder, "RemminaUnlockDialog")); - if (parent) - gtk_window_set_transient_for(GTK_WINDOW(remmina_unlock_dialog->dialog), parent); - - remmina_unlock_dialog->entry_unlock = GTK_ENTRY(GET_OBJ("entry_unlock")); - gtk_entry_set_activates_default(GTK_ENTRY(remmina_unlock_dialog->entry_unlock), TRUE); - remmina_unlock_dialog->button_unlock = GTK_BUTTON(GET_OBJ("button_unlock")); - gtk_widget_set_can_default(GTK_WIDGET(remmina_unlock_dialog->button_unlock), TRUE); - gtk_widget_grab_default(GTK_WIDGET(remmina_unlock_dialog->button_unlock)); - remmina_unlock_dialog->button_unlock_cancel = GTK_BUTTON(GET_OBJ("button_unlock_cancel")); - - g_signal_connect(remmina_unlock_dialog->button_unlock, "clicked", - G_CALLBACK(remmina_unlock_unlock_clicked), (gpointer)remmina_unlock_dialog); - g_signal_connect(remmina_unlock_dialog->button_unlock_cancel, "clicked", - G_CALLBACK(remmina_unlock_cancel_clicked), (gpointer)remmina_unlock_dialog); - g_signal_connect (remmina_unlock_dialog->dialog, "close", - G_CALLBACK (remmina_unlock_cancel_clicked), (gpointer)remmina_unlock_dialog); - - /* Connect signals */ - gtk_builder_connect_signals(remmina_unlock_dialog->builder, NULL); - - //if (remmina_pref_get_boolean("use_primary_password") - gchar *unlock_password = NULL; - unlock_password = remmina_pref_get_value("unlock_password"); - if ((unlock_password == NULL) || (g_strcmp0(unlock_password, "") == 0)) { - remmina_passwd (GTK_WINDOW(remmina_unlock_dialog->dialog), &unlock_password); - //REMMINA_DEBUG ("Password is: %s", unlock_password); - remmina_pref_set_value("unlock_password", g_strdup(unlock_password)); - } - if ((g_strcmp0(unlock_password, "") != 0) && lock != 0) - gtk_dialog_run(remmina_unlock_dialog->dialog); - g_free(unlock_password), unlock_password = NULL; - return(remmina_unlock_dialog->retval); + unlock_timeout = remmina_pref.unlock_timeout; + REMMINA_DEBUG ("unlock_timeout = %f", unlock_timeout); + REMMINA_DEBUG ("elapsed = %f", elapsed); + REMMINA_DEBUG ("INT unlock_timeout = %d", (int)unlock_timeout); + REMMINA_DEBUG ("INT elapsed = %d", (int)elapsed); + /* always LOCK and ask password */ + if (((int)unlock_timeout - elapsed) <= 0) unlocked = FALSE; + /* We don't lock as it has been already requested */ + //if (!unlocked && ((int)unlock_timeout - elapsed) > 0) unlocked = TRUE; + + REMMINA_DEBUG("Based on settings and current status, the unlock dialog is set to %d", unlocked); + + if (unlocked) { + REMMINA_DEBUG ("No need to request a password"); + rc = TRUE; + return rc; + } else { + + remmina_unlock_dialog = g_new0(RemminaUnlockDialog, 1); + remmina_unlock_dialog->retval = FALSE; + + remmina_unlock_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_unlock.glade"); + remmina_unlock_dialog->dialog = GTK_DIALOG(gtk_builder_get_object(remmina_unlock_dialog->builder, "RemminaUnlockDialog")); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(remmina_unlock_dialog->dialog), parent); + + remmina_unlock_dialog->entry_unlock = GTK_ENTRY(GET_OBJ("entry_unlock")); + gtk_entry_set_activates_default(GTK_ENTRY(remmina_unlock_dialog->entry_unlock), TRUE); + remmina_unlock_dialog->button_unlock = GTK_BUTTON(GET_OBJ("button_unlock")); + gtk_widget_set_can_default(GTK_WIDGET(remmina_unlock_dialog->button_unlock), TRUE); + gtk_widget_grab_default(GTK_WIDGET(remmina_unlock_dialog->button_unlock)); + remmina_unlock_dialog->button_unlock_cancel = GTK_BUTTON(GET_OBJ("button_unlock_cancel")); + + g_signal_connect(remmina_unlock_dialog->button_unlock, "clicked", + G_CALLBACK(remmina_unlock_unlock_clicked), (gpointer)remmina_unlock_dialog); + g_signal_connect(remmina_unlock_dialog->button_unlock_cancel, "clicked", + G_CALLBACK(remmina_unlock_cancel_clicked), (gpointer)remmina_unlock_dialog); + g_signal_connect (remmina_unlock_dialog->dialog, "close", + G_CALLBACK (remmina_unlock_cancel_clicked), (gpointer)remmina_unlock_dialog); + + /* Connect signals */ + gtk_builder_connect_signals(remmina_unlock_dialog->builder, NULL); + + gchar *unlock_password = NULL; + unlock_password = g_strdup(remmina_pref_get_value("unlock_password")); + REMMINA_DEBUG ("Password from preferences is: %s", unlock_password); + if ((unlock_password == NULL) || (g_strcmp0(unlock_password, "") == 0)) { + if (remmina_passwd (GTK_WINDOW(remmina_unlock_dialog->dialog), &unlock_password)) { + REMMINA_DEBUG ("Password is: %s", unlock_password); + remmina_pref_set_value("unlock_password", g_strdup(unlock_password)); + remmina_unlock_dialog->retval = TRUE; + } else { + remmina_unlock_dialog->retval = FALSE; + } + } + + int result = GTK_RESPONSE_NONE; + if (g_strcmp0(unlock_password, "") != 0) { + result = gtk_dialog_run (GTK_DIALOG (remmina_unlock_dialog->dialog)); + } else + remmina_unlock_dialog->retval = lock; + + switch (result) + { + case GTK_RESPONSE_ACCEPT: + if (!remmina_unlock_dialog->retval) + REMMINA_DEBUG ("Wrong password"); + else { + REMMINA_DEBUG ("Password is correcti, unlocking…"); + unlocked = TRUE; + } + REMMINA_DEBUG ("retval: %d", remmina_unlock_dialog->retval); + break; + default: + //unlocked = FALSE; + remmina_unlock_dialog->retval = FALSE; + remmina_unlock_timer_destroy (); + REMMINA_DEBUG ("Password not requested. retval: %d", remmina_unlock_dialog->retval); + break; + } + + rc = remmina_unlock_dialog->retval; + + g_free(unlock_password), unlock_password = NULL; + gtk_widget_destroy(GTK_WIDGET(remmina_unlock_dialog->dialog)); + remmina_unlock_dialog->dialog = NULL; + } + return(rc); } #else diff --git a/src/remmina_unlock.h b/src/remmina_unlock.h index 771e5c10e..cb3804c9f 100644 --- a/src/remmina_unlock.h +++ b/src/remmina_unlock.h @@ -51,7 +51,7 @@ typedef struct _RemminaUnlockDialog { } RemminaUnlockDialog; extern GTimer *timer; -extern gboolean isinit; +extern gboolean unlocked; #endif |