From owner-freebsd-audit Mon Jul 16 8:10:56 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.39]) by hub.freebsd.org (Postfix) with SMTP id BF84637B407 for ; Mon, 16 Jul 2001 08:10:41 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 56553 invoked by uid 1000); 16 Jul 2001 15:14:56 -0000 Date: Mon, 16 Jul 2001 18:14:56 +0300 From: Peter Pentchev To: Mike Barcroft Cc: David Malone , audit@FreeBSD.org Subject: Re: inetd(8) warns patch Message-ID: <20010716181456.A56285@ringworld.oblivion.bg> Mail-Followup-To: Mike Barcroft , David Malone , audit@FreeBSD.org References: <200107161435.f6GEZM631927@coffee.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107161435.f6GEZM631927@coffee.q9media.com>; from mike@q9media.com on Mon, Jul 16, 2001 at 10:35:22AM -0400 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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