<div dir="ltr"><div class="gmail_extra">done: <br><h1 id="trac-ticket-title"><a href="https://fedorahosted.org/sssd/ticket/2785">Ticket #2785</a></h1></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 11, 2015 at 10:17 AM, Alexander Bokovoy <span dir="ltr"><<a href="mailto:abokovoy@redhat.com" target="_blank">abokovoy@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Fri, 11 Sep 2015, Karl Forner wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
I kind of fixed my problem, but I share it there in case it can help others.<br>
<br>
I had problems with sparkleshare on my freeIPA-enrolled workstation, e.g. I<br>
got<br>
error messages like this:<br>
<br>
19:04:52 | Cmd | QB_resources | git ls-remote --heads --exit-code<br>
"ssh://xxxl@yyyy/secure/sparkleshare/resources" master<br>
19:04:52 | Git | projects | (Wed Sep  9 19:04:52:432246 2015)<br>
[/usr/bin/sss_ssh_knownhostsproxy] [main] (0x0020): set_locale() failed<br>
(5): Input/output error<br>
<br>
I went to see the source code of sss_ssh_knownhostsproxy, and it seems that<br>
the problem comes from these lines:<br>
  c = setlocale(LC_ALL, "");<br>
   if (c == NULL) {<br>
       return EIO;<br>
   }<br>
<br>
According to "man setlocale()", this is perfectly good:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
       On startup of the main program, the portable "C" locale is<br>
</blockquote>
selected as default.  A program may be made portable to all locales by<br>
calling:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          setlocale(LC_ALL, "");<br>
</blockquote>
and<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For glibc, first (regardless of<br>
</blockquote>
>      category), the environment variable LC_ALL is inspected, next the<br>
environment variable with the same name as the  category  (LC_COLLATE,<br>
LC_CTYPE,  LC_MESSAGES,  LC_MONETARY,  LC_NUMERIC,<br>
>      LC_TIME) and finally the environment variable LANG.  The first<br>
existing environment variable is used.  If its value is not a valid locale<br>
specification, the locale is unchanged, and setlo‐<br>
>      cale() returns NULL.<br>
<br>
In my case, apparently setlocate() returns NULL. I could not reproduce this<br>
setlocale() call by myself, event trying to use the environment of the<br>
sparkleshare process (which by the way is a mono program).<br>
<br>
But I noticed that running sparkleshare as followed fixed the problem:<br>
  LC_ALL="en_US.UTF-8" mono "/usr/lib/sparkleshare/SparkleShare.exe"<br>
<br>
So I just edited my /etc/default/locale to permanently fix my problem.<br>
Nonetheless, I'd be curious the understand why the setlocale() call fails<br>
when sss_ssh_knownhostsproxy is called via git via sparkleshare (via mono).<br>
</blockquote></div></div>
Thanks for the report. Could you please file a bug against sssd to have<br>
this fixed?<br>
<br>
There are multiple cases when your own locale is different from the<br>
remote environment and in cloud images you might not even have<br>
additional locale information available, so when SSH is configured to<br>
pass LC_* variables (like in Fedora or RHEL), they are forced in the<br>
remote shell and the setlocale() result is often NULL. I'm stumbling<br>
with this all the time.<span class=""><font color="#888888"><br>
-- <br>
/ Alexander Bokovoy<br>
</font></span></blockquote></div><br></div></div>