diff --git a/lxqt-sudo-prompt-fix.patch b/lxqt-sudo-prompt-fix.patch new file mode 100644 index 0000000..abb5526 --- /dev/null +++ b/lxqt-sudo-prompt-fix.patch @@ -0,0 +1,26 @@ +--- + sudo.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/sudo.cpp ++++ b/sudo.cpp +@@ -52,7 +52,8 @@ namespace + + const QString su_prog{QStringLiteral(LXQTSUDO_SU)}; + const QString sudo_prog{QStringLiteral(LXQTSUDO_SUDO)}; +- const QString pwd_prompt_end{QStringLiteral(": ")}; ++ const QString pwd_prompt_end{QStringLiteral(":")}; ++ const QString pwd_prompt_end_with_space{QStringLiteral(": ")}; + const QChar nl{QLatin1Char('\n')}; + + void usage(QString const & err = QString()) +@@ -277,7 +278,8 @@ int Sudo::parent() + lxqtApp->quit(); + } else + { +- if (line.endsWith(pwd_prompt_end)) ++ if (line.endsWith(pwd_prompt_end) || ++ line.endsWith(pwd_prompt_end_with_space)) + { + //if now echo is turned off, su/sudo requests password + struct termios tios; diff --git a/lxqt-sudo.changes b/lxqt-sudo.changes index d1910a5..4364661 100644 --- a/lxqt-sudo.changes +++ b/lxqt-sudo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 12 16:13:40 CEST 2018 - tiwai@suse.de + +- Fix the missing capture of the prompt line without the space + letter at the end of line (boo#1100871): + lxqt-sudo-prompt-fix.patch + ------------------------------------------------------------------- Tue May 22 15:20:01 UTC 2018 - mvetter@suse.com diff --git a/lxqt-sudo.spec b/lxqt-sudo.spec index 16adfa5..125c6a0 100644 --- a/lxqt-sudo.spec +++ b/lxqt-sudo.spec @@ -26,6 +26,7 @@ URL: http://lxqt.org Source: https://github.com/lxqt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/lxqt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc Source2: %{name}.keyring +Patch1: lxqt-sudo-prompt-fix.patch BuildRequires: cmake >= 3.0.2 BuildRequires: gcc-c++ BuildRequires: lxqt-build-tools-devel >= 0.5.0 @@ -45,6 +46,7 @@ and (after submit) the password is provided to sudo. %prep %setup -q +%patch1 -p1 %build %cmake -DPULL_TRANSLATIONS=No