Skip to content

Commit

Permalink
Merge pull request #1170 from AnthonyLoganMitchell/master
Browse files Browse the repository at this point in the history
These are patches to various src files for winagents.
  • Loading branch information
ddpbsd authored Sep 6, 2017
2 parents 55fc78d + 4132726 commit 853f440
Show file tree
Hide file tree
Showing 8 changed files with 498 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ endif
agent: ${BUILD_AGENT}


WINDOWS_BINS:=win32/ossec-agent.exe win32/ossec-agent-eventchannel.exe win32/ossec-rootcheck.exe win32/manage_agents.exe win32/setup-windows.exe win32/setup-syscheck.exe win32/setup-iis.exe win32/add-localfile.exe win32/os_win32ui.exe
WINDOWS_BINS:=win32/ossec-agent.exe win32/ossec-agent-eventchannel.exe win32/ossec-rootcheck.exe win32/manage_agents.exe win32/setup-windows.exe win32/setup-syscheck.exe win32/setup-iis.exe win32/add-localfile.exe win32/os_win32ui.exe win32/agent-auth.exe

ifeq (${MAKECMDGOALS},winagent)
$(error Do not use 'winagent' directly, use 'TARGET=winagent')
Expand Down Expand Up @@ -1245,6 +1245,11 @@ win32/resource.o: win32/ui/win32ui.rc
win32/os_win32ui.exe: win32/resource.o win32/win_service_rk.o ${win32_ui_o} addagent/b64.o ${ossec_libs}
${OSSEC_CCBIN} -DARGV0=\"ossec-win32ui\" ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -mwindows -o $@

win32/agent-auth.exe: win32/win_service_rk.o addagent/validate.c ${ossec_libs} ${ZLIB_LIB} ${JSON_LIB} win32/agent_auth.c os_regex/*.c os_net/*.c os_xml/*.c
${OSSEC_CCBIN} -DARGV0=\"agent-auth\" -DOSSECHIDS ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -lshlwapi -lwsock32 -lsecur32 -flto -o $@




####################
#### Clean #########
Expand Down
2 changes: 2 additions & 0 deletions src/headers/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ published by the Free Software Foundation. For more details, go to \n\
#else
#define KEYS_FILE "client.keys"
#define KEYSFILE_PATH KEYS_FILE
#define AUTHD_PASS "authd.pass"
#define AUTHDPASS_PATH AUTHD_PASS
#endif

#ifndef AUTH_FILE
Expand Down
2 changes: 1 addition & 1 deletion src/init/ossec-hids.init
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# OSSEC Controls OSSEC HIDS
# OSSEC Controls OSSEC HIDS
# Author: Daniel B. Cid <[email protected]>
# Modified for slackware by Jack S. Lai

Expand Down
8 changes: 7 additions & 1 deletion src/os_net/os_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ extern agent *agt;
typedef unsigned short int sa_family_t;
#endif /* WIN32 */


#ifndef __OS_NET_H
#define __OS_NET_H

#ifdef _WIN32
#include <stdint.h>
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
#endif
/* OS_Bindport*
* Bind a specific port (protocol and a ip).
* If the IP is not set, it is going to use ADDR_ANY
Expand Down
5 changes: 4 additions & 1 deletion src/shared/file_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,11 @@
#endif
#endif /* WIN32 */

const char *__local_name = "unset";
#ifdef WIN32
#define mkstemp(x) 0
#endif

const char *__local_name = "unset";

/* Set the name of the starting program */
void OS_SetName(const char *name)
Expand Down
Loading

0 comments on commit 853f440

Please sign in to comment.