Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 18:14:56 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Mike Barcroft <mike@q9media.com>
Cc:        David Malone <dwmalone@maths.tcd.ie>, audit@FreeBSD.org
Subject:   Re: inetd(8) warns patch
Message-ID:  <20010716181456.A56285@ringworld.oblivion.bg>
In-Reply-To: <200107161435.f6GEZM631927@coffee.q9media.com>; from mike@q9media.com on Mon, Jul 16, 2001 at 10:35:22AM -0400
References:  <200107161435.f6GEZM631927@coffee.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 16, 2001 at 10:35:22AM -0400, Mike Barcroft wrote:
[snip]
> > BTW - I was looking at doing WARNS stuff for syslogd and it doesn't
> > seem to be very easy 'cos syslogd uses writev(2) and iov_base
> > pointers are of type "char *" not "const char *". I'm not subscribed
> > to -audit so I don't know if anyone has a suggested workaround for
> > these situations.
> 
> Gererally speaking, it's usually a good idea to fix the root problem.
> If writev(2) and friends don't need to write to that variable, it's
> questionable why it's a char *.  Some things just don't work with
> WARNS, such as RPC, because of library evilness.

Basically, the problem is that although writev(2) doesn't need to write
to the buffer pointed to in its iov parameter, readv(2) does.
The obvious solution would be to separate the write- and read-vector
structures into two different iov_r and iov_w structures, but this
was not done back in 4.2BSD (when writev() and readv() appeared),
and trying to do it now would just create a gratuitous incompatibility
with next to all OS's out there..

G'luck,
Peter

-- 
I am the thought you are now thinking.

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




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