mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39432 from dmaziuk/issue39203
Quick and dirty fix for GECOS fields with more than 3 commas
This commit is contained in:
commit
a5fe8f0fa6
1 changed files with 2 additions and 1 deletions
|
@ -329,6 +329,7 @@ def present(name,
|
|||
|
||||
homephone
|
||||
The user's home phone number (not supported in MacOS)
|
||||
If GECOS field contains more than 3 commas, this field will have the rest of 'em
|
||||
|
||||
.. versionchanged:: 2014.7.0
|
||||
Shadow attribute support added.
|
||||
|
@ -409,7 +410,7 @@ def present(name,
|
|||
|
||||
# the comma is used to separate field in GECOS, thus resulting into
|
||||
# salt adding the end of fullname each time this function is called
|
||||
for gecos_field in ['fullname', 'roomnumber', 'workphone', 'homephone']:
|
||||
for gecos_field in ['fullname', 'roomnumber', 'workphone']:
|
||||
if isinstance(gecos_field, string_types) and ',' in gecos_field:
|
||||
ret['comment'] = "Unsupported char ',' in {0}".format(gecos_field)
|
||||
ret['result'] = False
|
||||
|
|
Loading…
Add table
Reference in a new issue