Merge branch 'f23'
This commit is contained in:
commit
ef71424634
@ -1,15 +1,15 @@
|
|||||||
From f46ac074d066884480098c14397f5f3e34475e11 Mon Sep 17 00:00:00 2001
|
From 469029615ffd32cf78f3be575694ed58236da3e0 Mon Sep 17 00:00:00 2001
|
||||||
From: Jiri Popelka <jpopelka@redhat.com>
|
From: Jiri Popelka <jpopelka@redhat.com>
|
||||||
Date: Fri, 22 Jan 2016 16:30:13 +0100
|
Date: Fri, 22 Jan 2016 16:30:13 +0100
|
||||||
Subject: [PATCH] fix from launchpad #1510950
|
Subject: [PATCH] fix from launchpad #1510950
|
||||||
|
|
||||||
---
|
---
|
||||||
base/password.py | 17 ++++++++++++++++-
|
base/password.py | 27 +++++++++++++++++++++++----
|
||||||
base/utils.py | 53 ++++++++++++++++++++++++++++++++++-------------------
|
base/utils.py | 53 ++++++++++++++++++++++++++++++++++-------------------
|
||||||
2 files changed, 50 insertions(+), 20 deletions(-)
|
2 files changed, 57 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
diff --git a/base/password.py b/base/password.py
|
diff --git a/base/password.py b/base/password.py
|
||||||
index 3ca16ae..6caefdf 100644
|
index 3ca16ae..f69a248 100644
|
||||||
--- a/base/password.py
|
--- a/base/password.py
|
||||||
+++ b/base/password.py
|
+++ b/base/password.py
|
||||||
@@ -104,6 +104,7 @@ def get_distro_name():
|
@@ -104,6 +104,7 @@ def get_distro_name():
|
||||||
@ -20,14 +20,27 @@ index 3ca16ae..6caefdf 100644
|
|||||||
self.__passwordValidated = False
|
self.__passwordValidated = False
|
||||||
self.__mode = Mode
|
self.__mode = Mode
|
||||||
self.__readAuthType() #self.__authType
|
self.__readAuthType() #self.__authType
|
||||||
@@ -201,7 +202,17 @@ class Password(object):
|
@@ -200,8 +201,7 @@ class Password(object):
|
||||||
|
i = child.expect(self.__expectList)
|
||||||
|
|
||||||
cb = child.before
|
cb = child.before
|
||||||
if cb:
|
- if cb:
|
||||||
-
|
-
|
||||||
|
+ if cb:
|
||||||
|
start = time.time()
|
||||||
|
output.write(cb)
|
||||||
|
|
||||||
|
@@ -209,11 +209,26 @@ class Password(object):
|
||||||
|
ok, ret = True, output.getvalue()
|
||||||
|
break
|
||||||
|
|
||||||
|
- elif i == 1: # TIMEOUT
|
||||||
|
-
|
||||||
|
+ elif i == 1: # TIMEOUT
|
||||||
+ if('true' in cmd and self.__password_prompt_str == ""): #sudo true or su -c "true"
|
+ if('true' in cmd and self.__password_prompt_str == ""): #sudo true or su -c "true"
|
||||||
+ cb = cb.replace("[", "\[")
|
+ cb = cb.replace("[", "\[")
|
||||||
+ cb = cb.replace("]", "\]")
|
+ cb = cb.replace("]", "\]")
|
||||||
|
+
|
||||||
+ self.__password_prompt_str = cb
|
+ self.__password_prompt_str = cb
|
||||||
+ try:
|
+ try:
|
||||||
+ p = re.compile(cb, re.I)
|
+ p = re.compile(cb, re.I)
|
||||||
@ -35,11 +48,18 @@ index 3ca16ae..6caefdf 100644
|
|||||||
+ self.__expectList.append(cb)
|
+ self.__expectList.append(cb)
|
||||||
+ else:
|
+ else:
|
||||||
+ self.__expectList.append(p)
|
+ self.__expectList.append(p)
|
||||||
+
|
+ log.debug("Adding missing password prompt string [%s]"%self.__password_prompt_str)
|
||||||
start = time.time()
|
continue
|
||||||
output.write(cb)
|
|
||||||
|
|
||||||
@@ -355,3 +366,7 @@ class Password(object):
|
else: # password
|
||||||
|
+ if(self.__password_prompt_str == ""):
|
||||||
|
+ self.__password_prompt_str = utils.EXPECT_WORD_LIST[i]
|
||||||
|
+ log.debug("Updating password prompt string [%s]"%self.__password_prompt_str)
|
||||||
|
+
|
||||||
|
child.sendline(self.__password)
|
||||||
|
|
||||||
|
except (Exception, pexpect.ExceptionPexpect) as e:
|
||||||
|
@@ -355,3 +370,7 @@ class Password(object):
|
||||||
self.__validatePassword( pswd_msg)
|
self.__validatePassword( pswd_msg)
|
||||||
return self.__password
|
return self.__password
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.15.11
|
Version: 3.15.11
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD
|
License: GPLv2+ and MIT and BSD
|
||||||
|
|
||||||
Url: http://hplip.sourceforge.net/
|
Url: http://hplip.sourceforge.net/
|
||||||
@ -461,6 +461,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 27 2016 Jiri Popelka <jpopelka@redhat.com> - 3.15.11-6
|
||||||
|
- updated patch for bug #1249414
|
||||||
|
|
||||||
* Fri Jan 22 2016 Jiri Popelka <jpopelka@redhat.com> - 3.15.11-5
|
* Fri Jan 22 2016 Jiri Popelka <jpopelka@redhat.com> - 3.15.11-5
|
||||||
- hp-plugin hangs on 'su' (bug #1249414).
|
- hp-plugin hangs on 'su' (bug #1249414).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user