mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Quick and dirty fix for GECOS fields with more than 3 commas
Issue #39203
This commit is contained in:
parent
881ebf2e93
commit
4f877c6b6f
@ -329,6 +329,7 @@ def present(name,
|
|||||||
|
|
||||||
homephone
|
homephone
|
||||||
The user's home phone number (not supported in MacOS)
|
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
|
.. versionchanged:: 2014.7.0
|
||||||
Shadow attribute support added.
|
Shadow attribute support added.
|
||||||
@ -409,7 +410,7 @@ def present(name,
|
|||||||
|
|
||||||
# the comma is used to separate field in GECOS, thus resulting into
|
# the comma is used to separate field in GECOS, thus resulting into
|
||||||
# salt adding the end of fullname each time this function is called
|
# 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']: #, 'homephone']:
|
||||||
if isinstance(gecos_field, string_types) and ',' in gecos_field:
|
if isinstance(gecos_field, string_types) and ',' in gecos_field:
|
||||||
ret['comment'] = "Unsupported char ',' in {0}".format(gecos_field)
|
ret['comment'] = "Unsupported char ',' in {0}".format(gecos_field)
|
||||||
ret['result'] = False
|
ret['result'] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user