Unexpected behavior of dbutil.c's expand_tilde functionality
matt at ucc.asn.au
Sat Aug 1 21:17:36 AWST 2015
On Fri, Jul 31, 2015 at 05:07:23PM +0200, Guilhem Moulin wrote:
> Hi list,
> Helmut Grohne reported the following :
> > I note that the new tilde expansion functionality in the upstream
> > release is a bit strange. If my own home is "/home/helmut", it will
> > expand "~/foo" to "/home/helmut//foo" (note the double slash). Worse,
> > it will expand expand "~otheruser/foo" to
> > "/home/helmut/otheruser/foo", which does not match the general
> > expectation of tilde expansion.
> Not sure if that was intended or if that's a bug. In the former case,
> it might be helpful to explicitly write that ‘~foo’'s expansion isn't
> that of a POSIX compliant shell , i.e., doesn't expand to user foo's
> homedir as one could expect .
Thanks for pointing it out. I'll add a comment, I can't
think of a situation where ~user would be used. Will fix the
trailing extra slash though.
I will sort out the the m_free trailing semicolon too.
More information about the Dropbear