Bug 1097665
Summary: | ssh-keygen with error : gethostname: File name too long | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | bkopilov <bkopilov> | |
Component: | openssh | Assignee: | Petr Lautrbach <plautrba> | |
Status: | CLOSED ERRATA | QA Contact: | Stanislav Zidek <szidek> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.0 | CC: | ashankar, filirom1, pfrankli, psimerda, pvrabec, spoyarek, szidek | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | openssh-6.6.1p1-1.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1161454 (view as bug list) | Environment: | ||
Last Closed: | 2015-03-05 09:27:48 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
bkopilov
2014-05-14 09:33:44 UTC
As `gethostname()` is a libc library call, I'm switching the bug report to the glibc package. gethostname tells it like it is - the hostname is longer than what the application anticipated (with its len argument). The fix to this is to increase the buffer size passed to gethostname and repeat the call. That is, it's not a bug in glibc. Thanks Siddhesh, (In reply to Siddhesh Poyarekar from comment #3) > gethostname tells it like it is - the hostname is longer than what the > application anticipated (with its len argument). The fix to this is to > increase the buffer size passed to gethostname and repeat the call. True enough, thanks. > That is, it's not a bug in glibc. Moving to OpenSSH then, where the calling program resides. According to my tests, this is more +-1 error than anything else. The problem is relevant only when the hostname is precisely 64 bytes long, in which case gethostname(lname, MAXHOSTNAMELEN) (where MAXHOSTNAMELEN is 64) can not accomodate terminating byte. (Well, the problem might be there for longer names but they are not allowed to be longer when I tested it with 'hostname' command.) Anyway, the patch helps, I just wanted to note my findings. *** Bug 1187689 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0425.html |