Hi
I would like to get ossec (only the agent) running in a TA (trusted application in a trusted execution environment). I have checked out the code and found that most of what I need is in the client-agent subdirectory. I have now moved this code (and only this code) to another folder and would like to compile it (adding anything that I need piece meal). Unfortunately there isn't a separate Makefile for the agent, it seems to be part of the 1310 line Makefile in the src directory :o) Does somebody maybe have a simpler Makefile just for the agent code?
I have tried to decipher the lines in the Makefile that I would need but am getting a bit stuck... I have found the line that compiles:
client-agent/%.o: client-agent/%.c
${OSSEC_CC} ${OSSEC_CFLAGS} -I./client-agent ${ZLIB_INCLUDE} -DARGV0=\"ossec-agentd\" -c $^ -o $@
I want to know that the compiler is:
OSSEC_CC=${QUIET_CC}${MING_BASE}${CC}
ok, so what is QUIET_CC
QUIET_CC = @printf ' %b %b\n' ${CCCOLOR}CC${ENDCOLOR} ${SRCCOLOR}$@${ENDCOLOR} 1>&2;
ok, not sure what that is for... just the colours for the line?
MING_BASE:=amd64-mingw32msvc-
as I am compiling for the Raspberry Pi 3. The
{$CC}
has me stumped as it has not been setup before the OSSEC_CC line?
I am also stumped about the C flags as
${OSSEC_CFLAGS}
is used but never set... not even in the install.sh file?
I have found the settings if I do a make with debug enabled:
CFLAGS -g -DMAX_AGENTS=2048 -DOSSECHIDS -DDEFAULTDIR="/var/ossec" -DUSER="ossec" -DREMUSER="ossecr" -DGROUPGLOBAL="ossec" -DMAILUSER="ossecm" -DLinux -DINOTIFY_ENABLED -DPICVIZ_OUTPUT_ENABLED -DLIBOPENSSL_ENABLED -DCLIENT -Wall -Wextra -I./ -I./headers/
LDFLAGS -lm -lpthread -lssl -lcrypto
CC cc
MAKE make
but was wondering where all the settings are from?
Oh, I am using version 2.9.0
Anyway, thank you for any help given
Cheers
Ursus