From owner-freebsd-audit Tue Jul 17 12:43:23 2001 Delivered-To: freebsd-audit@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 92EB837B408 for ; Tue, 17 Jul 2001 12:43:20 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id VAA99271; Tue, 17 Jul 2001 21:43:17 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Peter Pentchev Cc: Mike Barcroft , David Malone , audit@FreeBSD.ORG Subject: Re: inetd(8) warns patch References: <200107161435.f6GEZM631927@coffee.q9media.com> <20010716181456.A56285@ringworld.oblivion.bg> From: Dag-Erling Smorgrav Date: 17 Jul 2001 21:43:17 +0200 In-Reply-To: <20010716181456.A56285@ringworld.oblivion.bg> Message-ID: Lines: 17 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Peter Pentchev writes: > On Mon, Jul 16, 2001 at 10:35:22AM -0400, Mike Barcroft wrote: > > 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. You can work around this by casting the LHS to (const char *): (const char *)iov[n].iov_base = str; iov[n].iov_len = len; DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message