From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] tftpd vs assumptions about user none? (to have or have Date: Wed, 26 Jan 2005 21:21:06 -0500 From: Sape Mullender In-Reply-To: <31210468ab0a3b26d1840341520b0129@ar.aichi-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 376b7b1a-eace-11e9-9e20-41e7f4b1d025 > I examined tftpd. > > Current source code tftpd.c is this order: > chdir(dir) -> listen -> setuser() > But I suspect distributed binary: Nicely spotted! I changed that code because, although it runs fine on a cpu, it doesn't seem to work in a terminal. Now the setuser happens after the listen completes but before any of the work is done. I had presotto and ehg look at it and they both believe it's safe the way it is now. In other words, the process becomes none before it opens any files. Sape