[Mono-bugs] [Bug 681057] user's RealName has trailing commas

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Mar 19 11:29:50 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=681057

https://bugzilla.novell.com/show_bug.cgi?id=681057#c1


Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |CLOSED
                 CC|                            |jpryor at novell.com
         Resolution|                            |INVALID

--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2011-03-19 15:29:50 UTC ---
The real problem is that I "misnamed" the UnixUserInfo fields.

As per the UnixUserInfo source:

https://github.com/mono/mono/blob/master/mcs/class/Mono.Posix/Mono.Unix/UnixUserInfo.cs

The UnixUserInfo.RealName field returns the passwd::pw_gecos field, while
UnixUserInfo.UserName returns the passwd::pw_name field.

Based on IRC conversations, and the ubuntuforums.org entry, the real problem is
that you're reading the "pw_gecos" field -- which can be a comma-separated list
-- but expecting it to be the pw_name field.

The proper thing to do is to use UnixUserInfo.UserName if that's what you
actually want.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list