Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Sep 2000 20:06:06 +0200
From:      sthaug@nethelp.no
To:        phk@critter.freebsd.dk
Cc:        n@nectar.com, ume@FreeBSD.ORG, arch@FreeBSD.ORG
Subject:   Re: Request for review: nsswitch 
Message-ID:  <61643.967917966@verdi.nethelp.no>
In-Reply-To: Your message of "Sat, 02 Sep 2000 19:02:46 %2B0200"
References:  <41094.967914166@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
> Since we're on this topic anyway, there is one thing which has always
> bothered me:  Why don't we have the option of a per user alias file
> for hostnames ? 
> 
> I would love to be able to say:
> 
> 	echo "freefall freefall.freebsd.org" >> $HOME/.hostaliases
> 
> and be able to say just:
> 
> 	ssh freefall
> 
> no matter how the local resolver and/or /etc/hosts file were configured...

The mechanism already exists. See libc/net/res_query.c, the hostalias()
routine:

	if (_res.options & RES_NOALIASES)
		return (NULL);
	if (issetugid())
		return (NULL);
	file = getenv("HOSTALIASES");

and the environment variable needs to point to a file with lines in the
format

short-name	full.name.dom.ain

As you can see, it is explicitly disabled for setuid programs. It works
for ssh as soon as you make ssh non-setuid (which I think is a good idea
in any case...)

Steinar Haug, Nethelp consulting, sthaug@nethelp.no


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61643.967917966>