Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove picviz support. #1089

Merged
merged 1 commit into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
- DB=pgsql OSSEC_TYPE=server GEOIP=no
- DB=none OSSEC_TYPE=server GEOIP=yes
- DB=none OSSEC_TYPE=server GEOIP=no
- DB=none OSSEC_TYPE=server PRELUDE=yes ZEROMQ=yes PICVIZ=yes
- DB=none OSSEC_TYPE=server PRELUDE=yes ZEROMQ=yes
- DB=none OSSEC_TYPE=local GEOIP=no
- DB=none OSSEC_TYPE=hybrid GEOIP=no
- DB=none OSSEC_TYPE=agent GEOIP=no
Expand Down Expand Up @@ -55,7 +55,6 @@ script:
&& if ! [[ "${DB}" = "none" ]]; then COMMAND="${COMMAND} DATABASE=${DB}"; fi
&& if [[ "${GEOIP}" = "yes" ]]; then COMMAND="${COMMAND} USE_GEOIP=1"; fi
&& if [[ "${PRELUDE}" = "yes" ]]; then COMMAND="${COMMAND} USE_PRELUDE=1"; fi
&& if [[ "${PICVIZ}" = "yes" ]]; then COMMAND="${COMMAND} USE_PICVIZ=1"; fi
&& if [[ "${ZEROMQ}" = "yes" ]]; then COMMAND="${COMMAND} USE_ZEROMQ=1"; fi
&& ( cd src/ && make --warn-undefined-variables ${COMMAND} settings && make --warn-undefined-variables ${COMMAND} -j )
&& if ! [[ "${OSSEC_TYPE}" = "test" || "${OSSEC_TYPE}" = "winagent" ]]; then ( cd src/ && sudo make --warn-undefined-variables ${COMMAND} install ) fi
Expand Down
1 change: 0 additions & 1 deletion etc/ossec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<smtp_server>smtp.example.com.</smtp_server>
<email_from>ossecm@ossec.example.com.</email_from>
<!-- <email_reply_to>replyto@ossec.example.com.</email_reply_to> -->
<picviz_output>no</picviz_output>
</global>

<rules>
Expand Down
7 changes: 0 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ USE_GEOIP?=no
USE_INOTIFY=no

ifneq (${TARGET},winagent)
USE_PICVIZ?=yes
USE_OPENSSL?=auto
else
USE_PICVIZ?=no
USE_OPENSSL?=no
endif

Expand Down Expand Up @@ -192,10 +190,6 @@ ifneq (,$(filter ${USE_ZEROMQ},auto yes y Y 1))
OSSEC_LDFLAGS+=-lzmq -lczmq -lm
endif # USE_ZEROMQ

ifneq (,$(filter ${USE_PICVIZ},auto yes y Y 1))
DEFINES+=-DPICVIZ_OUTPUT_ENABLED
endif # USE_PICVIZ

ifneq (,$(filter ${USE_GEOIP},auto yes y Y 1))
DEFINES+=-DLIBGEOIP_ENABLED
OSSEC_LDFLAGS+=-lGeoIP
Expand Down Expand Up @@ -536,7 +530,6 @@ settings:
@echo " USE_GEOIP: ${USE_GEOIP}"
@echo " USE_PRELUDE: ${USE_PRELUDE}"
@echo " USE_OPENSSL: ${USE_OPENSSL}"
@echo " USE_PICVIZ: ${USE_PICVIZ}"
@echo " USE_INOTIFY: ${USE_INOTIFY}"
@echo "Mysql settings:"
@echo " includes: ${MI}"
Expand Down
28 changes: 0 additions & 28 deletions src/analysisd/analysisd.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
#include "dodiff.h"
#include "output/jsonout.h"

#ifdef PICVIZ_OUTPUT_ENABLED
#include "output/picviz.h"
#endif

#ifdef PRELUDE_OUTPUT_ENABLED
#include "output/prelude.h"
#endif
Expand Down Expand Up @@ -286,17 +282,6 @@ int main_analysisd(int argc, char **argv)
}
#endif

#ifdef PICVIZ_OUTPUT_ENABLED
/* Open the Picviz socket */
if (Config.picviz) {
OS_PicvizOpen(Config.picviz_socket);

if (chown(Config.picviz_socket, uid, gid) == -1) {
ErrorExit(CHOWN_ERROR, ARGV0, Config.picviz_socket, errno, strerror(errno));
}
}
#endif

/* Set the group */
if (Privsep_SetGroup(gid) < 0) {
ErrorExit(SETGID_ERROR, ARGV0, group, errno, strerror(errno));
Expand Down Expand Up @@ -531,12 +516,6 @@ int main_analysisd(int argc, char **argv)
/* Going to main loop */
OS_ReadMSG(m_queue);

#ifdef PICVIZ_OUTPUT_ENABLED
if (Config.picviz) {
OS_PicvizClose();
}
#endif

exit(0);
}

Expand Down Expand Up @@ -962,13 +941,6 @@ void OS_ReadMSG_analysisd(int m_queue)
#endif


#ifdef PICVIZ_OUTPUT_ENABLED
/* Log to Picviz */
if (Config.picviz) {
OS_PicvizLog(lf);
}
#endif

/* Execute an active response */
if (currently_rule->ar) {
int do_ar;
Expand Down
1 change: 0 additions & 1 deletion src/analysisd/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ int GlobalConf(const char *cfgfile)
Config.integrity = 8;
Config.rootcheck = 8;
Config.hostinfo = 8;
Config.picviz = 0;
Config.prelude = 0;
Config.zeromq_output = 0;
Config.zeromq_output_uri = NULL;
Expand Down
68 changes: 0 additions & 68 deletions src/analysisd/output/picviz.c

This file was deleted.

24 changes: 0 additions & 24 deletions src/analysisd/output/picviz.h

This file was deleted.

21 changes: 0 additions & 21 deletions src/config/global-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ int Read_Global(XML_NODE node, void *configp, void *mailp)
const char *xml_integrity = "integrity_checking";
const char *xml_rootcheckd = "rootkit_detection";
const char *xml_hostinfo = "host_information";
const char *xml_picviz = "picviz_output";
const char *xml_picviz_socket = "picviz_socket";
const char *xml_prelude = "prelude_output";
const char *xml_prelude_profile = "prelude_profile";
const char *xml_prelude_log_level = "prelude_log_level";
Expand Down Expand Up @@ -200,25 +198,6 @@ int Read_Global(XML_NODE node, void *configp, void *mailp)
return (OS_INVALID);
}
}
/* Picviz support */
else if (strcmp(node[i]->element, xml_picviz) == 0) {
if (strcmp(node[i]->content, "yes") == 0) {
if (Config) {
Config->picviz = 1;
}
} else if (strcmp(node[i]->content, "no") == 0) {
if (Config) {
Config->picviz = 0;
}
} else {
merror(XML_VALUEERR, __local_name, node[i]->element, node[i]->content);
return (OS_INVALID);
}
} else if (strcmp(node[i]->element, xml_picviz_socket) == 0) {
if (Config) {
os_strdup(node[i]->content, Config->picviz_socket);
}
}
/* Prelude support */
else if (strcmp(node[i]->element, xml_prelude) == 0) {
if (strcmp(node[i]->content, "yes") == 0) {
Expand Down
4 changes: 0 additions & 4 deletions src/config/global-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ typedef struct __Config {
/* JSONOUT Export */
u_int8_t jsonout_output;

/* Picviz support */
u_int8_t picviz;
char *picviz_socket;

/* Not currently used */
u_int8_t keeplogdate;

Expand Down