Bug 95 - Allow '%' expansion to work in ssh and ssh-add
Summary: Allow '%' expansion to work in ssh and ssh-add
Status: CLOSED DUPLICATE of bug 1159
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: All All
: P2 enhancement
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-02 09:24 AEDT by Jason Prondak
Modified: 2006-10-07 11:35 AEST (History)
0 users

See Also:


Attachments
patch to tildexpand.c and auth.c to allow '%' substitution everywhere (5.27 KB, patch)
2002-02-02 09:25 AEDT, Jason Prondak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.