Commit Graph

24 Commits

Author SHA1 Message Date
pandora-release 661dcbcdb9 Fixes to make the agent work on win64.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10242 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-20 11:16:42 +00:00
pandora-release 9ad03d2b5b 2013-11-14 Ramon Novoa <rnovoa@artica.es>
* main.cc: Quote the path to the service binary to avoid
          exploits.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-11-14 15:56:04 +00:00
vgilc 7389ead9b6 2011-07-14 Vanessa Gil <vanessa.gil@artica.es>
* win32/pandora_agent_conf.cc
	win32/pandora_windows_service.cc
	win32/main.cc: Created runtime enviroment variables for agents and fixed bug in drone agents.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4559 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-14 08:58:18 +00:00
Ramon Novoa b363210cba 2010-04-21 Ramon Novoa <rnovoa@artica.es>
* main.cc: Updated headers after tinyxml removal.

        * modules/pandora_module_list.cc,
          modules/pandora_module_factory.cc: Added support for plugin modules.

        * modules/pandora_module_exec.cc, modules/pandora_module.h,
          modules/pandora_module.cc: Added the module_timeout configuration
          token and replaced tinyxml related code.

        * bin/pandora_agent.conf: Added a sample plugin module. Added the
          group configuration token (was missing).

        * modules/pandora_module_plugin.cc,
          modules/pandora_module_plugin.h: Added to repository. Plugin module.

        * bin/util/df.vbs, bin/util/ps.vbs: Added to repository. Sample
          VBScript plugins.

        * pandora_windows_service.cc, pandora_windows_service.h,
          modules/pandora_module_inventory.cc, ssh/pandora_ssh_test.cc,
          ftp/pandora_ftp_test.cc, modules/pandora_module_inventory.h: Replaced
          tinyxml related code.

        * tinyxml, tinyxml/tinyxmlerror.cpp, tinyxml/tinystr.h,
          tinyxml/tinyxmlparser.cpp, tinyxml/tinyxml.cpp,
          tinyxml/tinyxml.h, tinyxml/tinystr.cpp: Removed from repository. No
          longer used.

        * installer/pandora.mpi, pandora.cc: Updated build to RC1.

        * Makefile.am: Updated sources. Removed tinyxml and added the plugin
          module.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2584 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-04-21 20:00:31 +00:00
Ramon Novoa 79376ea722 2009-10-06 Ramon Novoa <rnovoa@artica.es>
* main.cc: Fixed the agent interval when running in process mode.

        * pandora_windows_service.cc: Moved the startup delay to the right
          place.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2001 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-06 10:55:59 +00:00
Ramon Novoa 7358747348 2009-09-23 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.h, modules/pandora_module_inventory.cc: Changed
          the format of the inventory XML.

        * main.cc: Execute the agent and exit when compiled with debugging
          enabled.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1968 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-23 07:04:04 +00:00
Ramon Novoa f8e8bffe90 2009-09-22 Ramon Novoa <rnovoa@artica.es>
* debug_new.h, fast_mutex.h,
	  debug_new.cpp, static_assert.h: Added to repository. Wu Yongwei's
	  memory leak detection tool (part of Nvwa). Only compiled when
	  debugging is enabled.

	* bin/util/tentacle_client.exe: Added to repository. Tentacle client
	  needed to build the installer.

	* installer/pandora_2.0.mpi: moved to installer/pandora.mpi. Updated.
	  The installer can now be built directly from the installer
	  subdirectory.

	* configure.in, Makefile.am, autogen.sh: Created a proper
	  configure.in and Makefile.am. The agent can now be cross-compiled
	  from Linux :-D

	* bin/pandora_agent.conf: Fixed. A local configuration had been
	  uploaded.
	
	* pandora_windows_service.h,pandora_windows_service.cc,
	  udp_server/udp_server.cc, udp_server/udp_server.h: Properly shutdown
	  the UDP server.

	* modules/pandora_module_regexp.cc,
	  modules/pandora_module_inventory.cc,
	  modules/pandora_module_factory.cc,
	  modules/pandora_module.cc, pandora_strutils.cc,
	  pandora.h, pandora.cc: Fixed a couple of memory leaks. Small changes
	  to avoid compile warnings when cross-compiling from Linux.

	* windows_service.cc: Removed the interactive service flag to avoid
	  'black windows'.

	* main.cc: Include the memory leak detection tool if debugging is
	  enabled.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1966 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-09-22 11:48:25 +00:00
Esteban Sanchez 1c2b3c35ad 2009-02-12 Esteban Sanchez <estebans@artica.es>
* main.cc: Added new parameter to help text.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1449 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-12 11:08:26 +00:00
Esteban Sanchez 1c59619df7 2009-02-09 Esteban Sanchez <estebans@artica.es>
* main.cc: Added a new parameter --process to run the agent as a
        single process instead of a service.

        * pandora_windows_service.h: Interval property is now public so it can
        be readed if it's running as a single process.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1432 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-02-09 10:26:07 +00:00
Esteban Sanchez 5a63e70b7b 2008-11-28 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module.[cc,h]: Added an async property. Added
	getLatestOutput() to get the latest output of a module.

	* modules/pandora_module_factory.cc: Parse async token in modules.

	* modules/pandora_module_list.[cc,h]: It can create empty lists now
	and add modules using new addModule() function.

	* modules/pandora_module_service.[cc,h]: Added an async thread to
	watch services events and track services status changes quickly and
	asynchronously.

	* windows/pandora_wmi.cc: Style correction.

	* pandora_windows_service.[cc,h]: Pandora Windows service object is
	now single instance, so the instance to the running service can be
	accessed anywhere (useful in async threads). The XML generation and
	sending process has been moved to a new function called sendXml()
	which is thread-safe.

	* windows_service.h: Some properties are now protected instead of
	public to make it easier the singleton pattern in child classes.

	* main.cc: Adopted to singleton pattern in Pandora windows service.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1268 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-11-28 10:51:03 +00:00
Esteban Sanchez 079acf2f6d 2007-08-28 Esteban Sanchez <estebans@artica.es>
* main.cc: Fixed an error with previous commit.

        * pandora_windows_service.cc, ftp/pandora_ftp_client.cc: Reduced log
         level.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@624 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-28 10:47:58 +00:00
Esteban Sanchez ce162b0ea8 2007-08-27 Esteban Sanchez <estebans@artica.es>
* pandora.cc: Updated buildname.

        * main.cc: Added a missing "]" character. Added version number when 
        showing the help. Fixes #1782569.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@623 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-27 16:55:33 +00:00
Esteban Sanchez 9e098ffe42 2007-08-23 Esteban Sanchez <estebans@artica.es>
* pandora_windows_service.cc: Reduced output log level in normal use.

        * main.cc: Added a new line on help output.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@613 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-23 16:22:56 +00:00
Esteban Sanchez 2857fc9e84 2007-08-16 Esteban Sanchez <estebans@artica.es>
* ftp/pandora_ftp_test.[cc,h]: Added to repository. Implements a FTP
        test to be run on command line.

        * main.cc: Added --test-ftp option to perform a FTP test.

        * PandoraAgent.dev: Added new files.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@599 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-16 12:37:28 +00:00
Esteban Sanchez cee0fa4897 2007-08-07 Esteban Sanchez <estebans@artica.es>
* pandora.cc: Updated agent version.

        * pandora.h, modules/pandora_module_exec.cc: Redefine WINVER, so
        CreateJobProject can be found without modifying windef.h.

        * pandora_agent_conf.cc: Rewritten a loop.

        * ftp/pandora_ftp_client.[cc,h]: Added to repository. Implemented FTP
        transfer protocol using libcurl. It adds a library dependency.

        * pandora_windows_service.cc: Added support for FTP transfers. Select
        between SSH (default) or FTP. Improved file structure to be cleaner.

        * pandora_windows_service.h: Added new private functions and removed
        unneccessary private attribute.

        * misc/pandora_file.[cc,h]: Added a function to get the filename of a
        path.

        * main.cc: Indentation fixed.

        * bin/libcurl.dll: Added to repository. New dependency.

        * bin/PandoraAgent.exe: Updated to last commit.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-08-07 14:28:14 +00:00
Esteban Sanchez f0ca607e09 2006-08-15 Esteban Sanchez <estebans@artica.es>
* autogen.sh, configure.in, Makefile.am, Doxyfile.in: Added to
        repository. They are used to generate documentation, not to compile.

        * main.cc: Added some comments. Style correction.

        * pandora.[cc,h]: Added documentation comments. Changed visibility of
        some attributes.

        * pandora_agent_conf.[cc,h]: Added to Pandora namespace. Added
        documentation comments.

        * pandora_windows_service.[cc,h], pandora_strutils.[cc,h],
        windows/pandora_windows_infp.[cc,h], ssh/pandora_ssh_test.[cc,h]:
	Added documentation comments.

        * ssh/pandora_ssh_client.[cc,h]:Added documentation comments. Removed
        old method to connect with user and password. Style correction.

        * misc/pandora_file.[cc,h]: Added documentation comments. Renamed some
        parameters.

        * modules/pandora_module.[cc,h]: Added documentation comments. Put a
        name to the enumerators. Added a new class to agroupate all exceptions
        produced by Pandora_Module child class objects. Changed visibility of
        some attributes. Added some new methods and renamed others.

        * modules/pandora_module_cpuusage.[cc,h],
        modules/pandora_module_exec.[cc,h],
        modules/pandora_module_freememory.[cc,h],
        modules/pandora_module_freedisk.[cc,h], modules/pandora_module_proc.[cc,h],
        modules/pandora_module_service.[cc,h]: Added documentation comments.
        Some changes to adapt the objects to the Pandora_Module changes.

        * modules/pandora_module_list.[cc,h]: Added documentation comments.
        Some changes to adapt the objects to the Pandora_Module changes. Added
        to Pandora_Modules namespace.

        * windows/pandora_windows_wmi.[cc,h]: Added documentation comments.
        Renamed Pandora_Wmi_Error to Pandora_Wmi_Exception.

        * windows_service.[cc,h]: Added documentation comments. Changed
        visibility of some attributes. Style correction.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@150 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-08-25 13:02:03 +00:00
Esteban Sanchez 8805e64e60 2006-07-17 Esteban Sanchez <estebans@artica.es>
* main.cc: Added "--help" option.

        * pandora_strutils.cpp: Renamed to pandora_strutils.cc

        * bin/PandoraAgent.exe: Updated to the new commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-17 11:18:12 +00:00
Esteban Sanchez 05df7536d4 2006-07-12 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_freememory.[cc,h]: Added to repository. Implements a module to the the amount of free memory.

        * modules/pandora_module.h, modules/pandora_module_factory.cc, modules/pandora_module_list.cc: Added support to Pandora_Module_Freememory.

        * modules/pandora_wmi.[cc,h]: Added getFreememory () to get the amount of free memory.

        * pandora_windows_service.h: Removed public specificator from some functions.

        * PandoraAgent.dev: Added new files.

        * bin/PandoraAgent.exe: Updated to the new commit.

        * bin/pandora_agent.conf: Added example of free memory module.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@133 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-13 10:38:32 +00:00
Esteban Sanchez 207f8052b3 2006-07-11 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_cpuusage.[cc,h]: Added to repository. Implements a module to get the CPU usage percentage.

        * modules/pandora_module.h, modules/pandora_module_factory.cc, modules/pandora_module_list.cc: Added support to Pandora_Module_Cpuusage.

        * modules/pandora_module_freedisk.cc: Removed unnecessary debug output.

        * modules/pandora_module_service.h: Style correction.

        * windows/pandora_wmi.[cc,h]: Added getCpuUsagePercentage(). Removed unnecessary debug output.

        * PandoraAgent.dev: Added new files to the project.

        * bin/PandoraAgent.exe: Updated to the new commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@129 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-12 09:15:00 +00:00
Esteban Sanchez 1919501250 2006-07-10 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_list.cc: Delete modules from the list 
in the destructor.

        * ssh/libssh2/*: Updated to a new version of libssh2 (v 0.14). 
It solves a very important leak.

        * PandoraAgent.dev: Linker options modified. Libssh2 files are 
not compiled as C++.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@117 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-10 10:43:11 +00:00
Esteban Sanchez 6c16f6bc67 2006-07-05 Esteban Sanchez <esteban@steve-o.org>
* pandora.h, ssh/padora_ssh_client.h: Define renamed.

        * pandora_windows_service.cc: SSH user modified.

        * main.cc: Added Pandora_SSH_Test

        * ssh/pandora_ssh_test.h: Added define to avoid recursive inclusion.

        * ssh/pandora_ssh_test.cc: Unnecessary includes removed.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@93 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-05 15:02:28 +00:00
Esteban Sanchez e6c81809f4 2006-07-05 Esteban Sanchez <esteban@steve-o.org>
* windows/pandora_wmi.cc: Removed unnecessary debug. Check the service state on isRunningService ()

        * pandora_agent_conf.cc, modules/pandora_module_factory.cc: Removed unnecessary debug.

        * bin/PandoraAgent.tar.gz: Added to repository.

        * ssh/pandora_ssh_client.cc: Debug converted into log.

        * pandora_windows_service.cc:  Get the interval value (in minutes) and set it to the service.
        Check if the XML of the module is NULL before adding it to the file. Added log output on error.
        Delete temporal file before finishing the run.

        * pandora_windows_service.h: Macro modified.

        * modules/pandora_module.h, modules/pandora_module.cc: Added new exception, raised when the interval
        is not fulfilled. Added code to the run funtion of the Pandora_Module class, to check the execution
        interval.

        * modules/pandora_module_proc.cc, modules/pandora_module_exec.cc, modules/pandora_module_service.cc:
        Call to the run() base class function before running the specific code.

        * modules/pandora_module_list.cc: Removed use of namespace and use a explicit specification.

        * Changelog: Renamed to ChangeLog.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@85 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-05 08:46:51 +00:00
Esteban Sanchez 54a0db6509 2006-07-04 Esteban Sanchez <esteban@steve-o.org>
* windows/pandora_wmi.*, windows/pandora_windows_info.*, windows/wmi/disphelper.*,
          misc/pandora_file.*, ssh/*, ssh/libssh2/*, modules/pandora_module_service.*,
        modules/pandora_module_proc.*: Added to repository

        * pandora_windows_service.cc, pandora_windows_service.h: getXMLHeader renamed to getXmlHeader
        and modified its behavior. Updated to the Pandora XML specification. Add SSH and XML generation
        functionallity.

        * modules/pandora_module_exec.cc: Added the execution to a job to prevent zombies process. Update
        the execution command.

        * modules/pandora_module_factory.cc: Added Pandora_Module_Proc and Pandora_Module_Service. Added
        the interval parameter.

        * modules/pandora_module_list.cc: Added support to Pandora_Module_Proc and Pandora_Module_Service.

        * modules/pandora_module.h: Added new types of modules. Added execution times and module description
        to the Pandora_Module class. Added support to Pandora_Module_Proc and Pandora_Module_Service. Added
        getXml, setInterval and setDescription functions.

        * pandora.h: Commentary fixed.

        * Changelog: Renamed to ChangeLog.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@83 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-07-04 14:07:08 +00:00
Esteban Sanchez ace464380f 2006-06-20 Esteban Sánchez
* win32: Initial import.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@48 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2006-06-20 17:05:19 +00:00