Re: ipsvd $USER

Charlie Brady <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <Pine.LNX.4.44.0405262311380.1681-100000@e-smith.charlieb.ott.istop.com>
On Wed, 26 May 2004, Atom 'Smasher' wrote:

> i'm trying to accept connections via ssh (port forwarding) and keep the
> environment variables set by sshd (HOME, LOGNAME, MAIL, PATH, USER,
> USERNAME) but they all get hosed and reset as the user who started the
> `tcpsvd` process (typically root).
> 
> the only way around this, is to test for TCPREMOTEIP and set a USER based
> on that... not the best way to do things...

Indeed. Not the best at all. Why are you using portforwarding, rather than 
just running whatever it is that you want to run, as the user, via ssh?

> is there a way to have ipsvd drop permissions based on environment
> variables of the process connecting to it?

ipsvd can run as root, and whatever it spawns can do whatever it likes. 
But what are you really trying to do?

---
Charlie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.