Bug 2449

Summary: uid for expansion in ControlPath
Product: Portable OpenSSH Reporter: Christian Hesse <mail>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm, dtucker
Priority: P5    
Version: 7.0p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2451    
Attachments:
Description Flags
uid for expansion in ControlPath none

Description Christian Hesse 2015-08-21 20:38:03 AEST
Created attachment 2687 [details]
uid for expansion in ControlPath

Modern Linux systems create a private directory in /run/user/ for each
user, named by numeric user id (uid). This adds a new character sequence
'%i' for expansion in ControlPath to match this (and possibly other)
directory.
Comment 1 Damien Miller 2015-09-04 14:00:42 AEST
Comment on attachment 2687 [details]
uid for expansion in ControlPath

Looks fine to me
Comment 2 Darren Tucker 2015-09-04 14:08:47 AEST
Comment on attachment 2687 [details]
uid for expansion in ControlPath

>-	char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV];
>+	char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV],
>+	    uidstr[11];
> 	char cname[NI_MAXHOST];

I'd maybe make uidstr part of the following line for neatness.

Also, someone will eventually make a 64 bit uid_t, so perhaps you want to spend the extra 10 bytes of stacks space now?
Comment 3 Damien Miller 2015-09-11 13:48:00 AEST
applied (with uidstr sized to fit a 64-bit UID)
Comment 4 Damien Miller 2016-08-02 10:41:50 AEST
Close all resolved bugs after 7.3p1 release