Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
Update OPSEC SDK for Linux to version 50, switch to dynamic linking
Browse files Browse the repository at this point in the history
This commit should fix issue #12 but people will no longer be able to
build fw1-loggrabber using the old OPSEC SDK for Linux version 30.
  • Loading branch information
Andrea De Pasquale committed Apr 5, 2016
1 parent 581f231 commit 4ad0557
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
*.i*86
*.x86_64
*.hex

# Output binary
fw1-loggrabber

56 changes: 32 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,54 @@
# Change the following variables according to your system environment
GCC_PREFIX = /usr
CC_CMD = gcc
LD_CMD = gcc
CC = $(GCC_PREFIX)/bin/$(CC_CMD)
LD = $(GCC_PREFIX)/bin/$(LD_CMD)
PKG_DIR = ../OPSEC_SDK_6_0.linux30
INSTALL_PREFIX = /usr/local/fw1-loggrabber

EXE_NAME = fw1-loggrabber
OBJ_FILES = thread.o queue.o fw1-loggrabber.o

SYSCONFDIR=${INSTALL_PREFIX}/etc
BINDIR=${INSTALL_PREFIX}/bin
MANDIR=${INSTALL_PREFIX}/man
TEMPDIR=/tmp
CFLAGS += -m32 -g -Wall -fpic -DLINUX -DUNIXOS=1 -DDEBUG
SYSTEM_LIBS = -lpthread -lresolv -ldl -lnsl -lelf -lstdc++ -lz

LIB_DIR = $(PKG_DIR)/lib/release.static
STATIC_LIBS = \
OPSEC_PKG_DIR = OPSEC_SDK/pkg_rel
OPSEC_INC_DIR = $(OPSEC_PKG_DIR)/include
OPSEC_LIB_DIR = $(OPSEC_PKG_DIR)/lib/release.dynamic
OPSEC_LIBS = \
-lopsec \
-lsicauth -lsic \
-lcp_policy \
-lcpprod50 \
-lsicauth \
-lskey \
-lfwsetdb \
-lndb \
-lckpssl -lcpcert \
-lcpcryptutil -lcpprng \
-lcpbcrypt -lcpca \
-lasn1cpp \
-lsic \
-lcp_policy \
-lcpca \
-lckpssl \
-lcpcert \
-lcpcryptutil \
-lEncode \
-lcpprng \
-lProdUtils \
-lcpbcrypt \
-lcpopenssl \
-lAppUtils -lEventUtils \
-lEncode -lComUtils \
-lResolve -lDataStruct \
-lOS \
-lcpprod50
-lAppUtils \
-lComUtils \
-lResolve \
-lEventUtils \
-lDataStruct \
-lOS

LIBS = -lpthread -lresolv -ldl -lnsl -lelf -lstdc++
CFLAGS += -m32 -g -Wall -fpic -I$(PKG_DIR)/include -DLINUX -DUNIXOS=1 -DDEBUG
INSTALL_PREFIX = /usr/local/fw1-loggrabber
SYSCONFDIR=${INSTALL_PREFIX}/etc
BINDIR=${INSTALL_PREFIX}/bin
MANDIR=${INSTALL_PREFIX}/man
TEMPDIR=/tmp

%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $*.c
$(CC) $(CFLAGS) -I$(OPSEC_INC_DIR) -c -o $@ $*.c

$(EXE_NAME): $(OBJ_FILES)
$(LD) $(CFLAGS) -L$(LIB_DIR) -o $@ $(OBJ_FILES) $(STATIC_LIBS) $(LIBS)
$(LD) $(CFLAGS) -L$(OPSEC_LIB_DIR) -o $@ $(OBJ_FILES) $(OPSEC_LIBS) $(SYSTEM_LIBS)

install:
@echo
Expand Down
2 changes: 2 additions & 0 deletions OPSEC_SDK/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!.gitignore
*
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ FW1-LogGrabber is a command-line tool to grab logfiles from Checkpoint FW-1 remo
## Installation

Building FW1-LogGrabber is supported for the Linux platform only, and has been tested with:
* Ubuntu 12.04, GNU GCC 4.6.3
* Gentoo ~amd64, GNU GCC 4.8.2
* Gentoo ~amd64, GNU GCC 5.3.0

FW1-LogGrabber uses API-functions from Checkpoint's [OPSEC SDK 6.0 linux30](http://supportcontent.checkpoint.com/file_download?id=7385).
FW1-LogGrabber uses API-functions from Checkpoint's [OPSEC SDK 6.0 for Linux 50](http://supportcontent.checkpoint.com/file_download?id=48148). You must take care of downloading the Checkpoint OPSEC SDK and extracting it inside the ``OPSEC_SDK`` folder.

If you are using Ubuntu, install required libraries with ``sudo apt-get install gcc-multilib g++-multilib libelf-dev:i386``

Edit ``Makefile`` and change the variables CC, LD and PKG_DIR according to your environment.
If you are using Ubuntu, install required libraries with ``sudo apt-get install gcc-multilib g++-multilib libelf-dev:i386``. You might also need to tweak some ``Makefile`` variables (e.g. ``CC``, ``LD`` and ``OPSEC_PKG_DIR``) according to your environment.

Then run ``make`` to build and ``sudo make install`` to install.

Expand All @@ -28,7 +25,7 @@ This program is released under the GNU General Public License version 2 (GPLv2).

Copyright (c) 2003-2005 Torsten Fellhauer, Xiaodong Lin

Copyright (c) 2014 CERTEGO s.r.l.
Copyright (c) 2014-2016 CERTEGO s.r.l.

All rights reserved.

Expand Down

0 comments on commit 4ad0557

Please sign in to comment.