- Fix some confusion with password handling in details plugin

This commit is contained in:
Ray Strode 2008-09-05 15:29:23 +00:00
parent e0d2a6fcd3
commit f28d9b15c3
4 changed files with 4 additions and 115 deletions

View File

@ -1,77 +0,0 @@
commit e962a0bbd96bbec72f934a0f8053bd5c26dc21f4
Author: Ray Strode <rstrode@redhat.com>
Date: Wed Aug 27 16:01:28 2008 -0400
respond w/ "" if user hits esc to password prompt
This is so when we load the next plugin it won't
get confused.
diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c
index 50e13ab..3706e81 100644
--- a/src/plugins/splash/details/plugin.c
+++ b/src/plugins/splash/details/plugin.c
@@ -205,6 +205,12 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_trace ("hiding splash screen");
+ if (plugin->pending_password_answer != NULL)
+ {
+ ply_answer_with_string (plugin->pending_password_answer, "");
+ plugin->pending_password_answer = NULL;
+ }
+
ply_window_set_keyboard_input_handler (window, NULL, NULL);
ply_window_set_backspace_handler (window, NULL, NULL);
ply_window_set_enter_handler (window, NULL, NULL);
diff --git a/src/plugins/splash/fade-in/plugin.c b/src/plugins/splash/fade-in/plugin.c
index 2641217..604c181 100644
--- a/src/plugins/splash/fade-in/plugin.c
+++ b/src/plugins/splash/fade-in/plugin.c
@@ -578,6 +578,12 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
{
assert (plugin != NULL);
+ if (plugin->pending_password_answer != NULL)
+ {
+ ply_answer_with_string (plugin->pending_password_answer, "");
+ plugin->pending_password_answer = NULL;
+ }
+
ply_window_set_keyboard_input_handler (window, NULL, NULL);
ply_window_set_backspace_handler (window, NULL, NULL);
ply_window_set_enter_handler (window, NULL, NULL);
diff --git a/src/plugins/splash/spinfinity/plugin.c b/src/plugins/splash/spinfinity/plugin.c
index 44d66cf..cd9a85b 100644
--- a/src/plugins/splash/spinfinity/plugin.c
+++ b/src/plugins/splash/spinfinity/plugin.c
@@ -387,6 +387,12 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
{
assert (plugin != NULL);
+ if (plugin->pending_password_answer != NULL)
+ {
+ ply_answer_with_string (plugin->pending_password_answer, "");
+ plugin->pending_password_answer = NULL;
+ }
+
ply_window_set_keyboard_input_handler (window, NULL, NULL);
ply_window_set_backspace_handler (window, NULL, NULL);
ply_window_set_enter_handler (window, NULL, NULL);
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 11c2dc4..465d763 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -253,6 +253,12 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_trace ("hiding splash screen");
+ if (plugin->pending_password_answer != NULL)
+ {
+ ply_answer_with_string (plugin->pending_password_answer, "");
+ plugin->pending_password_answer = NULL;
+ }
+
ply_window_set_keyboard_input_handler (window, NULL, NULL);
ply_window_set_backspace_handler (window, NULL, NULL);
ply_window_set_enter_handler (window, NULL, NULL);

View File

@ -1,30 +0,0 @@
commit 5534d814aac9a7e7d975670653fc7f89701cff68
Author: Ray Strode <rstrode@redhat.com>
Date: Wed Aug 27 14:08:12 2008 -0400
Don't try to print prompt in text plugin, if there is not prompt
Fixes a crasher.
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 8800122..11c2dc4 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -294,10 +294,13 @@ ask_for_password (ply_boot_splash_plugin_t *plugin,
window_width = ply_window_get_number_of_text_columns (plugin->window);
window_height = ply_window_get_number_of_text_rows (plugin->window);
- ply_window_set_text_cursor_position (plugin->window,
- window_width / 2 - strlen (prompt) / 2,
- window_height / 2 - 1);
- write (STDOUT_FILENO, prompt, strlen (prompt));
+ if (prompt != NULL)
+ {
+ ply_window_set_text_cursor_position (plugin->window,
+ window_width / 2 - strlen (prompt) / 2,
+ window_height / 2 - 1);
+ write (STDOUT_FILENO, prompt, strlen (prompt));
+ }
ply_window_set_text_cursor_position (plugin->window,
window_width / 2 - strlen ("Password: "),
window_height / 2);

View File

@ -1,7 +1,7 @@
Summary: Plymouth Graphical Boot Animation and Logger
Name: plymouth
Version: 0.6.0
Release: 0.2008.08.27.2%{?dist}
Release: 0.2008.09.05.1%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
@ -9,8 +9,6 @@ URL: http://freedesktop.org/software/plymouth/releases
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: plymouth-0.5.0-textbar-hotness.patch
Patch1: fix-text-plugin-crasher.patch
Patch2: escape-sends-empty-password.patch
Obsoletes: rhgb < 1:10.0.0
Provides: rhgb = 1:10.0.0
@ -108,8 +106,6 @@ spins in the shape of an infinity sign.
%prep
%setup -q
%patch0 -p1 -b .textbar
%patch1 -p1 -b .fix-text-plugin-crasher
%patch2 -p1 -b .escape-sends-empty-password
%build
%configure --enable-tracing --disable-tests --without-boot-entry \
@ -230,8 +226,8 @@ fi
%{_libdir}/plymouth/spinfinity.so
%changelog
* Wed Aug 27 2008 Ray Strode <rstrode@redhat.com> 0.5.0-0.2008.08.27.2
- If user hits escape, send "" as the password (bug 459111)
* Fri Sep 5 2008 Ray Strode <rstrode@redhat.com> 0.5.0-0.2008.09.05.1
- Fix some confusion with password handling in details plugin
* Wed Aug 27 2008 Ray Strode <rstrode@redhat.com> 0.5.0-0.2008.08.27.1
- Fix another crasher for users with encrypted disks (this time in

View File

@ -1 +1 @@
3c3a0172f6ebc51a01e194caa9720cb3 plymouth-0.6.0.tar.bz2
67a3e4a19ebf0c802d43d12a11fd8e9c plymouth-0.6.0.tar.bz2