Dominique Leuenberger 2018-07-14 18:24:15 +00:00 committed by Git OBS Bridge
commit 906da9e5f2
3 changed files with 35 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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