[Freeipa-users] [work-around] sss_ssh_knownhostsproxy problem with sparkleshare due to setlocale()
Karl Forner
karl.forner at gmail.com
Fri Sep 11 08:10:15 UTC 2015
Hi,
I kind of fixed my problem, but I share it there in case it can help others.
I had problems with sparkleshare on my freeIPA-enrolled workstation, e.g. I
got
error messages like this:
19:04:52 | Cmd | QB_resources | git ls-remote --heads --exit-code
"ssh://xxxl@yyyy/secure/sparkleshare/resources" master
19:04:52 | Git | projects | (Wed Sep 9 19:04:52:432246 2015)
[/usr/bin/sss_ssh_knownhostsproxy] [main] (0x0020): set_locale() failed
(5): Input/output error
I went to see the source code of sss_ssh_knownhostsproxy, and it seems that
the problem comes from these lines:
c = setlocale(LC_ALL, "");
if (c == NULL) {
return EIO;
}
According to "man setlocale()", this is perfectly good:
> On startup of the main program, the portable "C" locale is
selected as default. A program may be made portable to all locales by
calling:
> setlocale(LC_ALL, "");
and
> For glibc, first (regardless of
> category), the environment variable LC_ALL is inspected, next the
environment variable with the same name as the category (LC_COLLATE,
LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC,
> LC_TIME) and finally the environment variable LANG. The first
existing environment variable is used. If its value is not a valid locale
specification, the locale is unchanged, and setlo‐
> cale() returns NULL.
In my case, apparently setlocate() returns NULL. I could not reproduce this
setlocale() call by myself, event trying to use the environment of the
sparkleshare process (which by the way is a mono program).
But I noticed that running sparkleshare as followed fixed the problem:
LC_ALL="en_US.UTF-8" mono "/usr/lib/sparkleshare/SparkleShare.exe"
So I just edited my /etc/default/locale to permanently fix my problem.
Nonetheless, I'd be curious the understand why the setlocale() call fails
when sss_ssh_knownhostsproxy is called via git via sparkleshare (via mono).
Regards,
Karl Forner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20150911/212aabe5/attachment.htm>
More information about the Freeipa-users
mailing list