Date: Mon, 24 Jun 2002 19:50:05 -0700 (PDT) From: Garrett Wollman <wollman@lcs.mit.edu> To: freebsd-bugs@FreeBSD.org Subject: bin/39815: rpc.statd bug Message-ID: <200206250250.g5P2o5Q72035@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/39815; it has been noted by GNATS.
From: Garrett Wollman <wollman@lcs.mit.edu>
To: "C.S.Peron" <maneo@bsdpro.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: bin/39815: rpc.statd bug
Date: Mon, 24 Jun 2002 22:40:29 -0400 (EDT)
<<On 25 Jun 2002 02:23:18 -0000, "C.S.Peron" <maneo@bsdpro.com> said:
> + if ((err = sm_check_hostname(arg->mon_name)) == 0)
> + {
> + syslog(LOG_ERR, "sm_stat: hostname contained invalid characters.");
We have a library routine, strvis(3), which would be a more appropriate
solution.
{
char *p = malloc(4 * strlen(arg->mon_name) + 1);
if (p == 0)
do_whatever_I_need_to_do_to_abort();
strvis(p, arg->mon_name, VIS_WHITE);
syslog(LOG_ERR, "invalid hostname to sm_stat: %s", p);
res.res_stat = stat_fail;
free(p);
}
-GAWollman
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?200206250250.g5P2o5Q72035>
