Bug 1740 - Misleading error message in ssh-keygen
Summary: Misleading error message in ssh-keygen
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-keygen (show other bugs)
Version: 5.4p1
Hardware: All Linux
: P2 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-24 22:04 AEDT by jchadima
Modified: 2011-01-24 12:33 AEDT (History)
2 users (show)

See Also:


Attachments
patch solving the problem (729 bytes, patch)
2010-03-24 22:05 AEDT, jchadima
no flags Details | Diff
keygen-report-stat-errors.diff (1.35 KB, patch)
2010-04-23 11:12 AEST, Damien Miller
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jchadima 2010-03-24 22:04:20 AEDT
In the case of unaccessible $HOME the ssh-keygen writes misleading error message
Comment 1 jchadima 2010-03-24 22:05:45 AEDT
Created attachment 1818 [details]
patch solving the problem
Comment 2 Damien Miller 2010-04-09 11:09:41 AEST
Is the error message that you are talking about "Could not create directory '/home/djm/.ssh'"? That doesn't seem misleading to me.
Comment 3 jchadima 2010-04-09 16:44:11 AEST
In the case when the directory exists it's misleading. One user contact me me asking why it prints "Could not create
directory '/home/luser/.ssh'" when I have one? 

The stat() result EPERM means that user have insufficient permissions to existing file, respectively to the directory containing the file.
Comment 4 Damien Miller 2010-04-23 11:12:12 AEST
Created attachment 1842 [details]
keygen-report-stat-errors.diff

tweaked patch
Comment 5 Damien Miller 2010-04-23 11:49:42 AEST
patch applied. Will be in OpenSSH-5.6p1
Comment 6 Damien Miller 2011-01-24 12:33:35 AEDT
Move resolved bugs to CLOSED after 5.7 release