Bug 1783 - ssh-keygen -L and -l give misleading error messages when fopen() fails
Summary: ssh-keygen -L and -l give misleading error messages when fopen() fails
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-keygen (show other bugs)
Version: -current
Hardware: All All
: P2 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_6
  Show dependency treegraph
 
Reported: 2010-06-16 03:57 AEST by Iain Morgan
Modified: 2011-01-24 12:33 AEDT (History)
1 user (show)

See Also:


Attachments
fatal() with a useful message if fopen() fails (3.87 KB, patch)
2010-06-16 03:57 AEST, Iain Morgan
no flags Details | Diff
/home/djm/keygen-load-errors.diff (4.58 KB, patch)
2010-06-18 10:49 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 Iain Morgan 2010-06-16 03:57:18 AEST
Created attachment 1861 [details]
fatal() with a useful message if fopen() fails

ssh-keygen -L (and -l) will report misleading error messages if the
fopen() of the specified file fails. This may cause ssh-keygen to
complain about the format of the file when the real issue is a lack
of read permissions, etc.

The attached patch reports a more accurate error message
when fopen() fails in these cases.
Comment 1 Damien Miller 2010-06-18 10:49:53 AEST
Created attachment 1864 [details]
/home/djm/keygen-load-errors.diff

standardise format of a few more keyfile opens
Comment 2 Damien Miller 2010-06-22 14:36:30 AEST
patch applied - this will be released in OpenSSH-5.6. Thanks!
Comment 3 Damien Miller 2011-01-24 12:33:40 AEDT
Move resolved bugs to CLOSED after 5.7 release