mirror of
https://github.com/nmap/nmap.git
synced 2026-01-07 15:09:01 +00:00
Define _FORTIFY_SOURCE=2 in nmap, nbase, ncat, and nsock. This
definition causes GCC to add extra security checks to compiled source code. See http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html. -D_FORTIFY_SOURCE=1 adds only those checks that are not supposed to cause any "conforming" program to fail. (Conforming to what I'm not sure, probably one of the C standards.) -D_FORTIFY_SOURCE=2 adds extra checks above that. Some light testing hasn't shown any obvious problems.
This commit is contained in:
@@ -31,6 +31,11 @@ ZENMAPDIR = zenmap
|
||||
NDIFFDIR = ndiff
|
||||
PYTHON = @PYTHON@
|
||||
DEFS = @DEFS@ -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
|
||||
# With GCC, add extra security checks to source code.
|
||||
# http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
|
||||
# Level 1 only makes changes that don't affect "conforming" programs,
|
||||
# while level 2 enforces additional restrictions.
|
||||
DEFS += -D_FORTIFY_SOURCE=2
|
||||
# For mtrace debugging -- see MTRACE define in main.cc for instructions
|
||||
# Should only be enabled during debugging and not in any real release.
|
||||
# DEFS += -DMTRACE=1
|
||||
|
||||
Reference in New Issue
Block a user