Bug 1348

Summary: Small code refinement to remove some duplication.
Product: Portable OpenSSH Reporter: Rob Holland <rob>
Component: sshdAssignee: Markus Friedl <markus>
Status: CLOSED FIXED    
Severity: trivial CC: dtucker, markus, public
Priority: P4    
Version: 4.6p1   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 1452    
Attachments:
Description Flags
Patch to tidy keyfile opening slightly.
none
Update patch, without secure_filename relocation, update to -current. none

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