If ftpd is run with an -h option (hide host-specific info,)

don't reveal the info in reply to the SYST command.

Get rid of using the "unix" macro at the same time.  It was a rather
poor way to check if the system was Unix since there were quite a
few Unix clones out there whose cc didn't define "unix" (e.g.,
NetBSD.)  It was also sensitive to the C standard used, which caused
unnecessary trouble:  With -std=c99, it should have been "__unix__",
and so on.

PR:		bin/50690
Submitted by:	Alex Semenyaka <alexs _at_ snark.ratmir.ru>
MFC after:	1 week
This commit is contained in:
yar 2003-06-16 11:30:23 +00:00
parent 5a341ceea0
commit 478d73b235

View File

@ -688,17 +688,17 @@ cmd
}
| SYST check_login CRLF
{
if ($2)
#ifdef unix
if ($2) {
if (hostinfo)
#ifdef BSD
reply(215, "UNIX Type: L%d Version: BSD-%d",
CHAR_BIT, BSD);
reply(215, "UNIX Type: L%d Version: BSD-%d",
CHAR_BIT, BSD);
#else /* BSD */
reply(215, "UNIX Type: L%d", CHAR_BIT);
reply(215, "UNIX Type: L%d", CHAR_BIT);
#endif /* BSD */
#else /* unix */
reply(215, "UNKNOWN Type: L%d", CHAR_BIT);
#endif /* unix */
else
reply(215, "UNKNOWN Type: L%d", CHAR_BIT);
}
}
/*