Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Mar 2001 04:40:06 -0800 (PST)
From:      Peter Pentchev <roam@orbitel.bg>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/25598: patch to let ftpd output message when changing directory
Message-ID:  <200103081240.f28Ce6o88949@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/25598; it has been noted by GNATS.

From: Peter Pentchev <roam@orbitel.bg>
To: bdluevel@heitec.net
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/25598: patch to let ftpd output message when changing directory
Date: Thu, 8 Mar 2001 14:33:46 +0200

 On Thu, Mar 08, 2001 at 03:08:58AM +0100, bdluevel@heitec.net wrote:
 > 
 > >Number:         25598
 > >Category:       bin
 > >Synopsis:       patch to let ftpd output message when changing directory
 > >Originator:     Bernd Luevelsmeyer
 > >Release:        FreeBSD 4.3-BETA i386
 > >Organization:
 > >Environment:
 > System: FreeBSD 4.3-BETA #0: Wed Mar 7 04:44:56 CET 2001
 > 
 > >Description:
 > The patch lets the FTP daemon (after a successful 'cwd' command)
 > look for a file '.message' in the current directory and, if
 > readable, send the contents to the client, preceding the
 > "250 CWD successful." message. The intent is to let
 > the FTP site admin announce directory descriptions, copyright
 > notices or the like.
 [snip the patch itself]
 
 Hmm I wonder if this should not stat() the file beforehand, to make
 sure it's a regular file; otherwise, problems might arise with a local
 user creating a FIFO or something, and then pointing a couple of clients
 there.. or just letting the FIFO lie dormant until some unsuspecting
 soul connects and CWD's :)
 
 Of course, then there's the issue of a race condition between a stat()
 and the actual opening.. this might be resolved with a fstat(fileno(fp))
 right after the fopen(), before the first read from the file.
 
 Or should FIFO's be considered an issue at all?  I believe yes, since
 something similar has been done to inetd recently..
 
 G'luck,
 Peter
 
 -- 
 Nostalgia ain't what it used to be.

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




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