Accepting request 622313 from home:tiwai:branches:X11:LXQt

- Fix the missing capture of the prompt line without the space
  letter at the end of line (boo#1100871):
  lxqt-sudo-prompt-fix.patch

OBS-URL: https://build.opensuse.org/request/show/622313
OBS-URL: https://build.opensuse.org/package/show/X11:LXQt/lxqt-sudo?expand=0&rev=11
This commit is contained in:
Michael Vetter 2018-07-13 07:58:29 +00:00 committed by Git OBS Bridge
parent 39943e79aa
commit 33a6d30f4c
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