Subject: Re: ssh use of $HOME
To: NetBSD current-users <current-users@netbsd.org>
From: Andreas Wrede <andreas@planix.com>
List: current-users
Date: 01/31/2007 18:24:25
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-3-852620916
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On Jan 31, 2007, at 15:17 , Christos Zoulas wrote:

> What is the meaning of `~'? I presume that you would like `~' to
> mean "the user's home directory as specified in /etc/passwd (pw_dir)".
> Well, this is not exactly right. The `~' first got a special meaning
> when it became part of the globbing special characters in csh(1)
> meaning the current location of the home directory (from the value of
> $HOME). So still today:
>
> % set home=/var/tmp	# csh mirrors $home -> $HOME
> % echo $HOME
> /var/tmp
> % cd ~
> % pwd
> /var/tmp
>
> So even if the patch is reversed, the manual page needs to be  
> corrected.

Short of replacing all occurrences of ~/... with <home_dir> or  
something, maybe this will suffice:

RCS file: /cvsroot/src/crypto/dist/ssh/ssh.1,v
retrieving revision 1.35
diff -u -r1.35 ssh.1
--- ssh.1       28 Sep 2006 21:22:15 -0000      1.35
+++ ssh.1       31 Jan 2007 23:22:47 -0000
@@ -109,6 +109,9 @@
is specified,
it is executed on the remote host instead of a login shell.
.Pp
+Note that the tilde (~) character used in pathnames below is replaced
+with the user's home directory, not the content of $HOME.
+.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 1


>
> christos
>
>

-- 
     aew


--Apple-Mail-3-852620916
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFwSUsEh/h9J/TQyERAr1MAKDMg4O742FVNzjjMU7oI6iCwN1iHwCeNaIM
ZRDb+nrOYhey98/apaoanYA=
=HmSn
-----END PGP SIGNATURE-----

--Apple-Mail-3-852620916--