projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'upstream/2.7'
[ossec-hids.git]
/
src
/
client-agent
/
main.c
diff --git
a/src/client-agent/main.c
b/src/client-agent/main.c
index
b78cd09
..
bda8ced
100755
(executable)
--- a/
src/client-agent/main.c
+++ b/
src/client-agent/main.c
@@
-1,4
+1,5
@@
-/* @(#) $Id$ */
+/* @(#) $Id: ./src/client-agent/main.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
@@
-35,15
+36,15
@@
int main(int argc, char **argv)
{
int c = 0;
int test_config = 0;
{
int c = 0;
int test_config = 0;
-
+
char *dir = DEFAULTDIR;
char *user = USER;
char *group = GROUPGLOBAL;
char *dir = DEFAULTDIR;
char *user = USER;
char *group = GROUPGLOBAL;
-
+
int uid = 0;
int gid = 0;
int uid = 0;
int gid = 0;
-
+
/* Setting the name */
OS_SetName(ARGV0);
/* Setting the name */
OS_SetName(ARGV0);
@@
-70,7
+71,7
@@
int main(int argc, char **argv)
group = optarg;
break;
case 't':
group = optarg;
break;
case 't':
- test_config = 1;
+ test_config = 1;
break;
case 'D':
if(!optarg)
break;
case 'D':
if(!optarg)
@@
-88,7
+89,7
@@
int main(int argc, char **argv)
ErrorExit(MEM_ERROR, ARGV0);
}
ErrorExit(MEM_ERROR, ARGV0);
}
-
+
/* Reading config */
if(ClientConf(DEFAULTCPATH) < 0)
{
/* Reading config */
if(ClientConf(DEFAULTCPATH) < 0)
{
@@
-98,7
+99,7
@@
int main(int argc, char **argv)
if(!logr->rip)
{
merror(AG_INV_IP, ARGV0);
if(!logr->rip)
{
merror(AG_INV_IP, ARGV0);
- ErrorExit(CLIENT_ERROR,ARGV0);
+ ErrorExit(CLIENT_ERROR,ARGV0);
}
}
@@
-108,7
+109,7
@@
int main(int argc, char **argv)
ErrorExit(AG_NOKEYS_EXIT, ARGV0);
}
ErrorExit(AG_NOKEYS_EXIT, ARGV0);
}
-
+
/* Check if the user/group given are valid */
uid = Privsep_GetUser(user);
gid = Privsep_GetGroup(group);
/* Check if the user/group given are valid */
uid = Privsep_GetUser(user);
gid = Privsep_GetGroup(group);
@@
-131,7
+132,7
@@
int main(int argc, char **argv)
/* Agentd Start */
AgentdStart(dir, uid, gid, user, group);
/* Agentd Start */
AgentdStart(dir, uid, gid, user, group);
-
+
return(0);
}
return(0);
}