From owner-freebsd-audit Thu Aug 9 5:29:19 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 10E7637B401 for ; Thu, 9 Aug 2001 05:29:16 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA10857; Thu, 9 Aug 2001 22:27:39 +1000 Date: Thu, 9 Aug 2001 22:25:09 +1000 (EST) From: Bruce Evans X-X-Sender: To: Mark Murray Cc: Subject: Re: [patch] su(1) WARNS=2 cleanup In-Reply-To: <200108082136.f78LaNf12227@grimreaper.grondar.za> Message-ID: <20010809220814.J15145-100000@besplex.bde.org> 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 On Wed, 8 Aug 2001, Mark Murray wrote: > > Removing all the casts and "fixing" the types of nargv and np gives the > > following patch. Now there is a fundamental fatal type mismatch between > > np and execv(2)'s second parameter. np needs to have type > > > > char const * * > > > > so that it can be initialized without warnings, but it needs to have type > > > > char * const * > > > > so that it can be passed to execv(). These requirements are incompatible. > > np must be cast to hide the apparent bug that it is incompatible with > > execve()'s second arg, but -Wcast-qual shows that the cast is a bug. > > So this means that unless something "heavyweight" got done, this is > unfixable? Yes. Heavyweight means fixing the C standard. Other alternatives for the type of execv()'s second parameter, including the correct one (with 2 "const"s) cause even more problems. POSIX.1-200x is a good reference for this. > OK to commit the rest, minus the execv() arg 2 (non-)fix? > (And obviously not the WARNS=2) Just the type changes and the PAM_END changes. Is that the rest? Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message