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:
Yaroslav Tykhiy 2003-06-16 11:30:23 +00:00
parent c82b8dcedd
commit a278e092d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116439

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);
}
}
/*