From alane@geeksrus.net  Mon Feb 25 18:50:52 2002
Return-Path: <alane@geeksrus.net>
Received: from wwweasel.geeksrus.net (wwweasel.geeksrus.net [64.8.210.226])
	by hub.freebsd.org (Postfix) with ESMTP id 539B537B404
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Feb 2002 18:50:51 -0800 (PST)
Received: (from alane@localhost)
	by wwweasel.geeksrus.net (8.11.6/8.11.6) id g1Q2m6W36765;
	Mon, 25 Feb 2002 21:48:06 -0500 (EST)
	(envelope-from alane)
Message-Id: <200202260248.g1Q2m6W36765@wwweasel.geeksrus.net>
Date: Mon, 25 Feb 2002 21:48:06 -0500 (EST)
From: Alan Eldridge <ports@geeksrus.net>
Reply-To: Alan Eldridge <ports@geeksrus.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Linking against libc_r.* provokes nasty linker messages about unsafe functions
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35329
>Category:       bin
>Synopsis:       Linking against libc_r.* provokes nasty linker messages about unsafe functions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-threads
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 25 19:00:01 PST 2002
>Closed-Date:    Sat Jul 12 22:48:29 PDT 2003
>Last-Modified:  Sat Jul 12 22:48:29 PDT 2003
>Originator:     Alan Eldridge
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Geeksrus.NET
>Environment:
System: FreeBSD wwweasel.geeksrus.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Fri Feb 8 21:25:34 EST 2002 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386

>Description:

The mere act of linking against libc_r.so produces a slew of linker messages
about unsafe functions. These are misleading, and inclined to make the casual
observer (or an automated build tool) think the program is unsafe and could
present a security risk.

>How-To-Repeat:

[alane ~]$ cat >foo.c
int main() {
return 0;
}
[alane ~]$ cc -o foo foo.c -lc_r
/usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is not recommended.
/usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider using mkstemp()
[alane ~]$

>Fix:




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-threads 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 18:33:42 PDT 2003 
Responsible-Changed-Why:  
Assign to threads mailing list 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35329 
State-Changed-From-To: open->closed 
State-Changed-By: deischen 
State-Changed-When: Sat Jul 12 22:47:23 PDT 2003 
State-Changed-Why:  
User error.  In 4.x, you can't link to libc_r with -lc_r; you need 
to use -pthread (so libc isn't included in the link!) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35329 
>Unformatted:
