URL: https://github.com/SSSD/sssd/pull/783 Author: branen Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN Action: opened
PR body: """ This patch writes a brief, familiar error message to stderr when no addresses are able to be resolved for the host specified in argv:
``` (with patch)$ ssh the-void sss_ssh_knownhostsproxy: Could not resolve hostname the-void ssh_exchange_identification: Connection closed by remote host ```
Users accustomed to using SSH in environments where SSSD is not deployed may expect the usual "Could not resolve hostname" error from SSH when a domain name is misspelled or otherwise invalid:
``` (no sssd)$ ssh the-void ssh: Could not resolve hostname the-void: Name or service not known ```
When such users begin using SSH in an SSSD-enabled environment, they may be confused when this familiar and straightforward message is replaced by a new one:
``` (sssd)$ ssh the-void ssh_exchange_identification: Connection closed by remote host ```
If such users aren't aware that the system `ssh_config` is proxying their connection through `sss_ssh_knownhostsproxy`, they may mistakenly conclude that a connection had been made all the way to a remote host and, therefore, that the hostname they specified was valid and able to be resolved. This patch mitigates this opportunity for confusion. """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/783/head:pr783 git checkout pr783
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
centos-ci commented: """ Can one of the admins verify this patch? """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-474517802
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
alexey-tikhonov commented: """ OK to test """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-476186410
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
alexey-tikhonov commented: """ Looks fine. But I wonder if it would be safer to use `sss_atomic_write_s(STDERR_FILENO, ...)` instead of `fprintf` """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-476260892
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
jhrozek commented: """ ok to test """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-476676374
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
pbrezina commented: """ I think `fprintf` is fine in this case. But the string should be wrapped with gettext, i.e. `_(str)`. """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-487521933
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
Label: +Changes requested
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
jhrozek commented: """ @pbrezina @alexey-tikhonov Does either of you have anything against me pushing the patch with the following diff: ``` diff --git a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c index d2a171dea..c71450632 100644 --- a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c +++ b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c @@ -339,9 +339,8 @@ int main(int argc, const char **argv) } } } else { - fprintf(stderr, - "sss_ssh_knownhostsproxy: Could not resolve hostname %s\n", - pc_host); + ERROR("sss_ssh_knownhostsproxy: Could not resolve hostname %s\n", + pc_host); ret = EFAULT; } ret = (ret == EOK) ? EXIT_SUCCESS : EXIT_FAILURE; ```
(Of course retaining the original authorship..) """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-494953481
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
pbrezina commented: """ No, go ahead. """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-495099612
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
alexey-tikhonov commented: """
@pbrezina @alexey-tikhonov Does either of you have anything against me pushing the patch with the following diff:
Ok """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-495124934
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
jhrozek commented: """ * master: 9a7b04690e30fc57dce45c82b918b8d95b978df1 * sssd-1-16: 7fe2b44654d93e8c2985264de53c3137f6f1b04e """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-496673473
URL: https://github.com/SSSD/sssd/pull/783 Author: branen Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/783/head:pr783 git checkout pr783
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
Label: +Pushed
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
Label: -Changes requested
URL: https://github.com/SSSD/sssd/pull/783 Title: #783: knownhostsproxy: friendly error msg for NXDOMAIN
jhrozek commented: """ Sorry it took us so long to merge this PR. """
See the full comment at https://github.com/SSSD/sssd/pull/783#issuecomment-496673641
sssd-devel@lists.fedorahosted.org