X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=src%2Faddagent%2Fmanage_agents.h;h=1110a01bca38eacb02a6fbd24f053d2466266e91;hb=789cbc8e52da68eba3517b920ef22e000cf3c9fd;hp=e9ba6fc50358fb028edf1e0ea3eb68a5e6836d03;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;p=ossec-hids.git diff --git a/src/addagent/manage_agents.h b/src/addagent/manage_agents.h index e9ba6fc..1110a01 100755 --- a/src/addagent/manage_agents.h +++ b/src/addagent/manage_agents.h @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/addagent/manage_agents.h, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -8,7 +9,7 @@ * License (version 2) as published by the FSF - Free Software * Foundation. * - * License details at the LICENSE file included with OSSEC or + * License details at the LICENSE file included with OSSEC or * online at: http://www.ossec.net/en/licensing.html */ @@ -29,6 +30,7 @@ int remove_agent(); /* Extract or import a key */ int k_extract(char *cmdextract); int k_import(char *cmdimport); +int k_bulkload(char *cmdbulk); /* Validation functions */ int OS_IsValidName(char *u_name); @@ -36,12 +38,14 @@ int OS_IsValidID(char *id); int IDExist(char *id); int NameExist(char *u_name); char *getFullnameById(char *id); +char *OS_AddNewAgent(char *name, char *ip, char *id, char *key); + /* Print available agents */ int print_agents(int print_status, int active_only, int csv_output); int list_agents(int cmdlist); - + /* clear a line */ char *chomp(char *str); @@ -84,8 +88,8 @@ fpos_t fp_pos; #define ADDED "Added.\n" #define ADD_NOT "Not Adding ..\n" #define PRESS_ENTER "** Press ENTER to return to the main menu.\n" -#define MUST_RESTART "\n** You must restart the server for your changes" \ - " to have effect.\n\n" +#define MUST_RESTART "\n** You must restart OSSEC for your changes" \ + " to take effect.\n\n" /* Add errors */ #define ADD_ERROR_ID "\n** ID '%s' already present. They must be unique.\n\n" @@ -94,8 +98,9 @@ fpos_t fp_pos; #define NO_AGENT "\n** No agent available. You need to add one first.\n" #define NO_ID "\n** Invalid ID '%s' given. ID is not present.\n" #define NO_KEY "\n** Invalid authentication key. Starting over again.\n" -#define INVALID_ID "\n** Invalid ID '%s' given. ID must be numeric (max 5 digits).\n\n" +#define INVALID_ID "\n** Invalid ID '%s' given. ID must be numeric (max 8 digits).\n\n" #define INVALID_NAME "\n** Invalid name '%s' given. Name must contain only alphanumeric characters (min=2, max=32).\n\n" +#define NO_DEFAULT "\n** Could not get default ID. Ran out of IDs to try with a max of '%d'. Either need to raise max agents or clean out client.keys.\n\n" /* Remove agent */ #define REMOVE_ID "Provide the ID of the agent to be removed (or '\\q' to quit): " @@ -103,13 +108,13 @@ fpos_t fp_pos; #define REMOVE_DONE "Agent '%s' removed.\n" #define REMOVE_NOT "Not removing ..\n" -/* Import agent */ +/* Import agent */ #define IMPORT_KEY "\n* Provide the Key generated by the server.\n" \ "* The best approach is to cut and paste it.\n" \ "*** OBS: Do not include spaces or new lines.\n\n" \ "Paste it here (or '\\q' to quit): " - -/* extract key */ + +/* extract key */ #define EXTRACT_KEY "Provide the ID of the agent to extract " \ "the key (or '\\q' to quit): " #define EXTRACT_MSG "\nAgent key information for '%s' is: \n%s\n" @@ -125,7 +130,7 @@ fpos_t fp_pos; "\n* %s %s Agent manager. *" \ "\n* The following options are available: *" \ "\n****************************************\n" - + #define BANNER_OPT " (A)dd an agent (A).\n" \ " (E)xtract key for an agent (E).\n" \ " (L)ist already added agents (L).\n" \ @@ -136,5 +141,17 @@ fpos_t fp_pos; #define BANNER_CLIENT " (I)mport key from the server (I).\n" \ " (Q)uit.\n" \ "Choose your action: I or Q: " - + +/* WIN32 errors */ +#define CHDIR_ERROR ARGV0 ": Could not chdir (%s) (Make sure path exists and executable is running with Administrative priviliges).\n" +#define CONF_ERROR ARGV0 ": Could not read (%s) (Make sure config exists and executable is running with Administrative priviliges).\n" +#define COMPSEC_ERROR ARGV0 ": Could not find cmd.exe using COMPSEC environment variable.\n" +#define PROC_ERROR ARGV0 ": Could not start process running command (%s).\n" +#define RESULT_ERROR ARGV0 ": Could not run command (%s) which returned (%ld).\n" +#define CACLS_ERROR ARGV0 ": Could not set permissions running (%s) which exited with (%ld).\n" +#define GMF_ERROR ARGV0 ": Could not run GetModuleFileName.\n" +#define GMF_BUFF_ERROR ARGV0 ": Could not get path because it is too long and was shrunk by (%d) characters with a max of (%d).\n" +#define GMF_UNKN_ERROR ARGV0 ": Could not run GetModuleFileName with returned (%ld).\n" +#define AGENT_DELETE_ERROR ARGV0 ": Could not unlink file (%s).\n" + /* EOF */