From owner-freebsd-audit Tue Mar 26 0:25:21 2002 Delivered-To: freebsd-audit@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 8FB3C37B400 for ; Tue, 26 Mar 2002 00:25:11 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g2Q8P8v88985; Tue, 26 Mar 2002 08:25:08 GMT (envelope-from mark@grimreaper.grondar.za) Received: from grimreaper (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.2/8.12.2) with ESMTP id g2Q8OrxG078620; Tue, 26 Mar 2002 08:24:54 GMT (envelope-from mark@grimreaper.grondar.za) Message-Id: <200203260824.g2Q8OrxG078620@grimreaper.grondar.org> To: Dag-Erling Smorgrav Cc: audit@FreeBSD.ORG Subject: Re: src/lib __progname cleanup ; review please References: In-Reply-To: ; from Dag-Erling Smorgrav "25 Mar 2002 18:16:34 +0100." Date: Tue, 26 Mar 2002 08:24:53 +0000 From: Mark Murray 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 > The name "getprogname" is in the application namespace. If an > application that calls err(3) (directly or indirectly) defines a > non-static function or variable called getprogname, then err(3) will > use that instead of the "real" getprogname(), possibly with very > unpleasant consequences. You should therefore rename getprogname() to > _getprogname(), which is in the implementation namespace, use only > _getprogname() internally in libc, and add getprogname() as a weak > alias for _getprogname() like this: > > __weak_alias(getprogname, _getprogname) This does not work (getprogname is not in the library, whereas _getprogname is). If I grep -r for __weak_alias, I only find what looks like deprecated uses in libraries. It is not documented or declared anywhere else. M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message