Bug 95

Summary: Allow '%' expansion to work in ssh and ssh-add
Product: Portable OpenSSH Reporter: Jason Prondak <jprondak>
Component: sshAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED DUPLICATE    
Severity: enhancement    
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch to tildexpand.c and auth.c to allow '%' substitution everywhere none

Description Jason Prondak 2002-02-02 09:24:36 AEDT
By moving expand_filename() from auth.c into tildexpand.c,  '%' substitution can be used but any programs that use tilde_expand_filename()  as opposed 
to just sshd.

The reason for this was to allow for IdentityFile inclusion like as follows:

[..ssh_config..]
IdentityFile /var/spool/ssh/%u/idenity
IdentityFile ~/.ssh/identity
Comment 1 Jason Prondak 2002-02-02 09:25:52 AEDT
Created attachment 18 [details]
patch to tildexpand.c and auth.c to allow '%' substitution everywhere
Comment 2 Markus Friedl 2002-02-05 08:02:03 AEDT
you leak memory every time you call expand_filename().

so the patch expands ~ first and then % ?

hm, shouldn't there be only just _one_ interface.
Comment 3 Damien Miller 2005-06-06 22:39:56 AEST
There is now (OpenBSD -current 20050606) a misc.c:percent_expand() function that
you can use for things like this. Patches welcome.
Comment 4 Damien Miller 2006-03-12 16:06:03 AEDT
Closing as duplicate: this bug has been around longer, but Bug #1159 has a patch :)

*** This bug has been marked as a duplicate of bug 1159 ***
Comment 5 Darren Tucker 2006-10-07 11:35:23 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.