Subject: Re: calling setlogin before setsid
To: David Laight <david@l8s.co.uk>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 02/13/2003 09:34:34
>The following bits of code call setlogin() before setsid().
>Since setlogin affects all processes in the session, this can
>change the logname of a different child.

and of the parent.

	# /etc/rc.d/inetd start
	Starting inetd.
	this# ps -ologname -p`cat /var/run/inetd.pid`
	LOGIN
	andrew					(okay, i did su to root)
	# ftp ftp://localhost/
	Trying ::1...
	Connected to localhost.
	...
	ftp> ^D
	# ps -ologname -p`cat /var/run/inetd.pid`
	LOGIN
	ftp  
	# 

maybe inetd should setsid() after forking?

>There may be a problem in gnu/dist/sendmail/sendmail/conf.c

whereabouts?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."