From 4f877c6b6fcf5e812f5ab99f5f83c371201daf41 Mon Sep 17 00:00:00 2001 From: Dimitri Maziuk Date: Wed, 15 Feb 2017 15:08:59 -0600 Subject: [PATCH] Quick and dirty fix for GECOS fields with more than 3 commas Issue #39203 --- salt/states/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/states/user.py b/salt/states/user.py index b171ddaa24..c02ef12b0d 100644 --- a/salt/states/user.py +++ b/salt/states/user.py @@ -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']: #, 'homephone']: if isinstance(gecos_field, string_types) and ',' in gecos_field: ret['comment'] = "Unsupported char ',' in {0}".format(gecos_field) ret['result'] = False