Bug 1348 - Small code refinement to remove some duplication.
Summary: Small code refinement to remove some duplication.
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 4.6p1
Hardware: Other Other
: P4 trivial
Assignee: Markus Friedl
URL:
Keywords:
Depends on:
Blocks: V_5_1
  Show dependency treegraph
 
Reported: 2007-08-03 02:06 AEST by Rob Holland
Modified: 2008-07-22 12:19 AEST (History)
3 users (show)

See Also:


Attachments
Patch to tidy keyfile opening slightly. (7.72 KB, patch)
2007-08-03 02:06 AEST, Rob Holland
no flags Details | Diff
Update patch, without secure_filename relocation, update to -current. (4.80 KB, patch)
2008-06-15 05:02 AEST, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Holland 2007-08-03 02:06:20 AEST
Created attachment 1334 [details]
Patch to tidy keyfile opening slightly.

Damien,

This is a pre-cursor for the key abstraction patch that I discussed with you.

I'll submit things stage at a time for easier reviewing.

Let me know if any adjustments need making.

Thanks,

Rob
Comment 1 Rob Holland 2007-09-05 17:40:42 AEST
ping? :)
Comment 2 Darren Tucker 2008-06-15 05:00:15 AEST
Comment on attachment 1334 [details]
Patch to tidy keyfile opening slightly.

In user_key_allowed2():
>+	/* The authorized keys. */
>+	file = authorized_keys_file(pw);

This will break compatibility with AuthorizedKeysFile2, because user_key_allowed2() is called twice with 2 different keyfiles and this ends up ignoring that argument.

Also, I wouldn't put secure_filename and the new function in misc.c, because everything is linked with it, so the code would end up in every binary (probably, depending on how smart the linker is).

There has been some other work in this area of the code recently, I will attach an updated diff.
Comment 3 Darren Tucker 2008-06-15 05:02:15 AEST
Created attachment 1526 [details]
Update patch, without secure_filename relocation, update to -current.
Comment 4 Rob Holland 2008-06-15 07:04:15 AEST
I've long since ceased to care having gotten no response on here or the mailing list, so by all means amend as you see fit or drop it, whichever you prefer.
Comment 5 Darren Tucker 2008-07-02 22:10:20 AEST
The patch #1526 has been applied and will be in 5.1.  Thanks.
Comment 6 Damien Miller 2008-07-22 12:19:20 AEST
Mass update RESOLVED->CLOSED after release of openssh-5.1