Bug 484

Summary: name space collision - log function
Product: Portable OpenSSH Reporter: rusr
Component: sshdAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: major    
Priority: P2    
Version: -current   
Hardware: All   
OS: All   

Description rusr 2003-02-05 04:40:30 AEDT
The function log() (described in log.h) causes a name space collision with the
math library function log(3m). If any library that is linked with ssh (or any
component) should happen to call the math library log() function, problems will
arise.

For my own temporary workaround, I changed the name in log.h from log() to
ssh_log() and added this statement at the end of log.h:

#define log ssh_log
Comment 1 Markus Friedl 2003-02-05 06:40:48 AEDT
compiling with -Dlog=ssh_log works, too.

(why do you link -lm against ssh?).
Comment 2 rusr 2003-02-05 06:52:49 AEDT
I don't - I am using a PAM library that does (under certain circumstances and
configurations). When it called log(), it core'd in a child process and the
connection was lost.
Comment 3 Darren Tucker 2003-05-04 10:09:03 AEST
This is now fixed.  From ChangeLog:
20030409
[snip]
   - itojun@cvs.openbsd.org 2003/04/08 20:21:29
     [*.c *.h]
     rename log() into logit() to avoid name conflict.  markus ok, from
     netbsd
Comment 4 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED