From 5f8ef1d59f3ec38bcfd54ae8a0881b4210966599 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 27 Aug 2008 18:13:23 +0000 Subject: [PATCH] - Fix another crasher for users with encrypted disks (this time in the text plugin, not the client) --- fix-text-plugin-crasher.patch | 30 ++++++++++++++++++++++++++++++ plymouth.spec | 10 ++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 fix-text-plugin-crasher.patch diff --git a/fix-text-plugin-crasher.patch b/fix-text-plugin-crasher.patch new file mode 100644 index 0000000..5167688 --- /dev/null +++ b/fix-text-plugin-crasher.patch @@ -0,0 +1,30 @@ +commit 5534d814aac9a7e7d975670653fc7f89701cff68 +Author: Ray Strode +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); diff --git a/plymouth.spec b/plymouth.spec index 8496f4f..7f68dfe 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -1,7 +1,7 @@ Summary: Plymouth Graphical Boot Animation and Logger Name: plymouth Version: 0.6.0 -Release: 0.2008.08.27%{?dist} +Release: 0.2008.08.27.1%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2 @@ -9,6 +9,7 @@ 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 Obsoletes: rhgb < 1:10.0.0 Provides: rhgb = 1:10.0.0 @@ -106,6 +107,7 @@ spins in the shape of an infinity sign. %prep %setup -q %patch0 -p1 -b .textbar +%patch1 -p1 -b .fix-text-plugin-crasher %build %configure --enable-tracing --disable-tests --without-boot-entry \ @@ -226,7 +228,11 @@ fi %{_libdir}/plymouth/spinfinity.so %changelog -* Wed Aug 27 2008 Ray Strode 0.5.0-0.2008.08.28 +* Wed Aug 27 2008 Ray Strode 0.5.0-0.2008.08.27.1 +- Fix another crasher for users with encrypted disks (this time in + the text plugin, not the client) + +* Wed Aug 27 2008 Ray Strode 0.5.0-0.2008.08.27 - Update to latest snapshot - Add the ability to show text prompts in graphical plugin - Fix crasher for users with encrypted disks