gecos parser implementation Lassi Kortela 11 Aug 2019 17:30 UTC
> That survey suggests one more possibility: > > - Split the GECOS field at the first comma. > > - Return the part before that comma as the "user full name". > > - Ignore the remainder. > > - If there is no comma, return the entire field as "user full name". > > - Maybe also expand any ampersand (&) to the username. Here: <https://misc.lassi.io/2019/parse-gecos.c> It only expands the first ampersand. There should be at most one. Also, if we use this technique and return only the first comma-delimited field from pw_gecos, then we can repurpose the same user-info:full-name procedure for Windows and other operating systems.