- users-groups module checks if the account is locked by
calling 'passwd -l' which is ok but it should not raise if the account is already locked. This patch will cause lock_passwd to raise only if the account locking failed OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=25
This commit is contained in:
parent
fa531c83bb
commit
c69b90d607
16
cloud-init-no-user-lock-if-already-locked.patch
Normal file
16
cloud-init-no-user-lock-if-already-locked.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- cloud-init-0.7.5/cloudinit/distros/__init__.py.orig 2014-09-16 11:00:52.192149797 +0200
|
||||
+++ cloud-init-0.7.5/cloudinit/distros/__init__.py 2014-09-16 11:02:02.272874250 +0200
|
||||
@@ -402,8 +402,11 @@
|
||||
# about long names.
|
||||
util.subp(['passwd', '-l', name])
|
||||
except Exception as e:
|
||||
- util.logexc(LOG, 'Failed to disable password for user %s', name)
|
||||
- raise e
|
||||
+ if e.exit_code != 3:
|
||||
+ util.logexc(LOG, 'Failed to disable password for user %s', name)
|
||||
+ raise e
|
||||
+ else:
|
||||
+ util.logexc(LOG, 'Password access already locked for user %s', name)
|
||||
|
||||
def set_passwd(self, user, passwd, hashed=False):
|
||||
pass_string = '%s:%s' % (user, passwd)
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 16 11:09:01 CEST 2014 - ms@suse.de
|
||||
|
||||
- users-groups module checks if the account is locked by
|
||||
calling 'passwd -l' which is ok but it should not raise
|
||||
if the account is already locked. This patch will cause
|
||||
lock_passwd to raise only if the account locking failed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 9 12:35:16 UTC 2014 - dvlaeev@suse.com
|
||||
|
||||
|
@ -39,6 +39,7 @@ Patch6: dynamicInitCmd.diff
|
||||
Patch7: suseSetInitCmd.patch
|
||||
Patch8: cloudinit-datasources.patch
|
||||
Patch9: cloud-init-no-dmidecode-on-ppc64.patch
|
||||
Patch10: cloud-init-no-user-lock-if-already-locked.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: filesystem
|
||||
BuildRequires: python-devel
|
||||
@ -131,6 +132,7 @@ Unit tests for the cloud-init tools
|
||||
%patch7
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%if 0%{?suse_version} <= 1130
|
||||
# disable ecdsa for SLE 11 (not available)
|
||||
|
Loading…
Reference in New Issue
Block a user