-/* @(#) $Id: main.c,v 1.16 2009/06/24 17:06:24 dcid Exp $ */
+/* @(#) $Id: ./src/client-agent/main.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
{
int c = 0;
int test_config = 0;
-
+
char *dir = DEFAULTDIR;
char *user = USER;
char *group = GROUPGLOBAL;
-
+
int uid = 0;
int gid = 0;
-
+
/* Setting the name */
OS_SetName(ARGV0);
group = optarg;
break;
case 't':
- test_config = 1;
+ test_config = 1;
break;
case 'D':
if(!optarg)
ErrorExit(MEM_ERROR, ARGV0);
}
-
+
/* Reading config */
if(ClientConf(DEFAULTCPATH) < 0)
{
if(!logr->rip)
{
merror(AG_INV_IP, ARGV0);
- ErrorExit(CLIENT_ERROR,ARGV0);
+ ErrorExit(CLIENT_ERROR,ARGV0);
}
ErrorExit(AG_NOKEYS_EXIT, ARGV0);
}
-
+
/* Check if the user/group given are valid */
uid = Privsep_GetUser(user);
gid = Privsep_GetGroup(group);
/* Agentd Start */
AgentdStart(dir, uid, gid, user, group);
-
+
return(0);
}