This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11924] New: Gecos parsing with g_get_real_name causes headaches with network authentication.


I could go through a whole lot of repetition, but the entirety of this problem
is synopsized elsehwere by me:

https://bugs.launchpad.net/indicator-applet/+bug/484238

The short version is that g_get_real_name parses the gecos field up to the first
comma.  The problem is that when tying into a network authentication schemes,
often you will have the format last name, first name.  g_get_real_name blindly
presumes that you have legacy gecos data there:

"Interpretation of the gecos field varies between systems, but traditionally
holds 4 comma-separated fields containing the user's full name, office location,
work phone number, and home phone number. An & in the gecos field should be
replaced by the user's properly capitalized login name ."

Of course things like a Windows domain could care less about this.  The only
solution I could come up with was to count commas.  If there's only one comma
there, presume that it's part of the name.  In my case, right now my gecos field
has "Shadwick, Tony" since I use likewise-open for authentication. 
g_get_real_name returns "Shadwick".  Now if I had Shadwick, Tony,, Then I might
understand.  Reality is that in situations where legacy data gets entered (such
as local authentication systems), the blank fields are present with repeating
commas.  I struggle to find a situation where the commas are present without
legacy GECOS data being there.

I'm open to alternatives to this, but it is a bit of a problem.

-- 
           Summary: Gecos parsing with g_get_real_name causes headaches with
                    network authentication.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: tony dot shadwick at usa dot gknaerospace dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11924

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]