mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* fixed #28183 - user module shadowfile update on SunOS
This commit is contained in:
@@ -1348,6 +1348,7 @@ class SunOS(User):
|
||||
try:
|
||||
lines = []
|
||||
for line in open(self.SHADOWFILE, 'rb').readlines():
|
||||
line = to_native(line, errors='surrogate_or_strict')
|
||||
fields = line.strip().split(':')
|
||||
if not fields[0] == self.name:
|
||||
lines.append(line)
|
||||
@@ -1442,6 +1443,7 @@ class SunOS(User):
|
||||
try:
|
||||
lines = []
|
||||
for line in open(self.SHADOWFILE, 'rb').readlines():
|
||||
line = to_native(line, errors='surrogate_or_strict')
|
||||
fields = line.strip().split(':')
|
||||
if not fields[0] == self.name:
|
||||
lines.append(line)
|
||||
|
||||
Reference in New Issue
Block a user