[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] ntop, msql & allow_severity tcpwrappers
From:       Marko Mikulicic <marko () seul ! org>
Date:       2002-07-10 23:10:24
[Download RAW message or body]

Hello,

I have noticed something strange in the handling of tcpwrapper's
global variables "allow_severity" and "deny_severity".

I'm using gcc 2.95.3.

The tcp_wrappers library requires the main program to define
those symbols. The ntop package, for example, declares  the variables in 
an include file, and never initializes them.
  I have changed the code to conditionally initialize the variables
and it compiles fine. (this should fix bug #4678).

However I would like to look deeply in the problem.
I don't understand why those symbols are required to be initialized.
Declared symbols should be marked as "C" (common) on compilation
and promoted to "B" (bss uninitialized). I tried with test programs
and also linking libwrap.a, the variables are marked "B" by nm.

The only reference to allow_severity in ntop is in "globals.h" file
and is *not* marked as extern. In tcp_wrappers is marked as extern.

I cannot regenerate the problem with a simpler program, it
always correctly resolves the non extern multiple declaration
in bss unitialized symbol.

Does anyone know why is this happening, and why this
thing does obviously not happen to the ntop and mysql developers ?

Marko

_______________________________________________
gentoo-dev mailing list
gentoo-dev@gentoo.org
http://lists.gentoo.org/mailman/listinfo/gentoo-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic