bin/74823: ftpd should not use warn(x) more carefully when used from inetd [patch]

Alexander Melkov melkov at comptek.ru
Tue Dec 7 14:10:27 PST 2004


The following reply was made to PR bin/74823; it has been noted by GNATS.

From: "Alexander Melkov" <melkov at comptek.ru>
To: <freebsd-gnats-submit at FreeBSD.org>,
	"Alexander Melkov" <melkov at comptek.ru>
Cc:  
Subject: Re: bin/74823: ftpd should not use warn(x) more carefully when used from inetd [patch]
Date: Wed, 8 Dec 2004 01:04:39 +0300

 I'm sorry, my previous patch was slightly inaccurate.
 Because ftpd uses compiled-in ls, which in turn uses warn(x) in correct way,
 __progname should be restored
 
 Correct patch:
 diff ftpd.c.1.163 ftpd.c
 286a287,288
 >       struct stat st;
 >       char *old_progname = NULL;
 291a294,299
 >       if (fstat(0, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
 >               extern char *__progname;
 >               old_progname = __progname;
 >               __progname = "220-";
 >       }
 >
 422a431,434
 >       if (old_progname) {
 >               extern char *__progname;
 >               __progname = old_progname;
 >       }
 


More information about the freebsd-bugs mailing list