Description of problem: authd always returns an error if locale file is missing Version-Release number of selected component (if applicable): authd-1.4.3-8.1 How reproducible: Always Steps to Reproduce: 1. make sure there is a socket open on localhost 2. use netstat -t to find port numbers 3. LANG=en_AU in.authd <lport>,<rport> Actual results: <lport> , <rport> : ERROR :NO-USER Expected results: <lport> , <rport> : USERID : UNIX :<user> Additional info: This happens provided that LANG is set to a locale which doesn't have an auth.mo file. What happens is the errno gets set to ENOENT and is never cleared. Later code assumes that this is an error, even if a matching socket is found. Probably errno should be cleared after setlocale is called. See attached patch, which is only a partial solution as setlocale can also be called to handle a command line language setting.
Created attachment 132820 [details] Patch to reset errno, after call to setlocale().
I think setlocale doesn't set the errno value. And if setlocale fails, authd will abort, so this ENOENT must come from a different source....
Hm, this problem looks like an undocumented feature of setlocale(). This patch can't break anything so I'll apply it.