mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
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
This commit is contained in:
parent
a379c0891c
commit
6c16f6bc67
@ -1,3 +1,15 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2006-07-05 Esteban Sanchez <esteban@steve-o.org>
|
2006-07-05 Esteban Sanchez <esteban@steve-o.org>
|
||||||
|
|
||||||
* pandora.[cc,h]: Program name and display name of the application.
|
* pandora.[cc,h]: Program name and display name of the application.
|
||||||
|
@ -5,7 +5,7 @@ UnitCount=59
|
|||||||
Type=1
|
Type=1
|
||||||
Ver=1
|
Ver=1
|
||||||
ObjFiles=
|
ObjFiles=
|
||||||
Includes=
|
Includes=E:\work\common\Dev-Cpp\include\;E:\work\common\Dev-Cpp\include\c++\3.4.2\;E:\work\common\Dev-Cpp\include\c++\
|
||||||
Libs=
|
Libs=
|
||||||
PrivateResource=
|
PrivateResource=
|
||||||
ResourceIncludes=
|
ResourceIncludes=
|
||||||
@ -547,26 +547,6 @@ Priority=1000
|
|||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
[Unit52]
|
|
||||||
FileName=ssh\pandora_ssh_test.h
|
|
||||||
CompileCpp=1
|
|
||||||
Folder=SSH
|
|
||||||
Compile=1
|
|
||||||
Link=1
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit53]
|
|
||||||
FileName=ssh\pandora_ssh_test.cc
|
|
||||||
CompileCpp=1
|
|
||||||
Folder=SSH
|
|
||||||
Compile=1
|
|
||||||
Link=1
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit46]
|
[Unit46]
|
||||||
FileName=ssh\libssh2\hostkey.c
|
FileName=ssh\libssh2\hostkey.c
|
||||||
CompileCpp=1
|
CompileCpp=1
|
||||||
@ -578,26 +558,6 @@ OverrideBuildCmd=0
|
|||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
[Unit54]
|
[Unit54]
|
||||||
FileName=misc\pandora_file.cc
|
|
||||||
CompileCpp=1
|
|
||||||
Folder=Misc
|
|
||||||
Compile=1
|
|
||||||
Link=1
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit55]
|
|
||||||
FileName=misc\pandora_file.h
|
|
||||||
CompileCpp=1
|
|
||||||
Folder=Misc
|
|
||||||
Compile=1
|
|
||||||
Link=1
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit56]
|
|
||||||
FileName=windows\pandora_windows_info.h
|
FileName=windows\pandora_windows_info.h
|
||||||
CompileCpp=1
|
CompileCpp=1
|
||||||
Folder=Windows
|
Folder=Windows
|
||||||
@ -607,7 +567,7 @@ Priority=1000
|
|||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
[Unit57]
|
[Unit55]
|
||||||
FileName=windows\pandora_windows_info.cc
|
FileName=windows\pandora_windows_info.cc
|
||||||
CompileCpp=1
|
CompileCpp=1
|
||||||
Folder=Windows
|
Folder=Windows
|
||||||
@ -617,17 +577,7 @@ Priority=1000
|
|||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
[Unit59]
|
[Unit56]
|
||||||
FileName=modules\pandora_module_service.cc
|
|
||||||
CompileCpp=1
|
|
||||||
Folder=Modules
|
|
||||||
Compile=1
|
|
||||||
Link=1
|
|
||||||
Priority=1000
|
|
||||||
OverrideBuildCmd=0
|
|
||||||
BuildCmd=
|
|
||||||
|
|
||||||
[Unit58]
|
|
||||||
FileName=modules\pandora_module_service.h
|
FileName=modules\pandora_module_service.h
|
||||||
CompileCpp=1
|
CompileCpp=1
|
||||||
Folder=Modules
|
Folder=Modules
|
||||||
@ -637,3 +587,53 @@ Priority=1000
|
|||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit57]
|
||||||
|
FileName=modules\pandora_module_service.cc
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=Modules
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit52]
|
||||||
|
FileName=misc\pandora_file.cc
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=Misc
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit53]
|
||||||
|
FileName=misc\pandora_file.h
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=Misc
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit58]
|
||||||
|
FileName=ssh\pandora_ssh_test.h
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=SSH
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit59]
|
||||||
|
FileName=ssh\pandora_ssh_test.cc
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=SSH
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
Binary file not shown.
@ -20,10 +20,12 @@
|
|||||||
|
|
||||||
#include "pandora.h"
|
#include "pandora.h"
|
||||||
#include "pandora_windows_service.h"
|
#include "pandora_windows_service.h"
|
||||||
|
#include "ssh/pandora_ssh_test.h"
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define SERVICE_INSTALL_CMDLINE_PARAM "--install"
|
#define SERVICE_INSTALL_CMDLINE_PARAM "--install"
|
||||||
#define SERVICE_UNINSTALL_CMDLINE_PARAM "--uninstall"
|
#define SERVICE_UNINSTALL_CMDLINE_PARAM "--uninstall"
|
||||||
|
#define SSH_TEST_CMDLINE_PARAM "--test-ssh"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[]) {
|
main (int argc, char *argv[]) {
|
||||||
@ -53,6 +55,17 @@ main (int argc, char *argv[]) {
|
|||||||
|
|
||||||
delete service;
|
delete service;
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (_stricmp(argv[i], SSH_TEST_CMDLINE_PARAM) == 0) {
|
||||||
|
SSH::Pandora_SSH_Test ssh_test;
|
||||||
|
|
||||||
|
delete service;
|
||||||
|
|
||||||
|
try {
|
||||||
|
ssh_test.test ();
|
||||||
|
} catch (Pandora_Exception e) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
cerr << "Usage: " << argv[0] << "[" << SERVICE_INSTALL_CMDLINE_PARAM
|
cerr << "Usage: " << argv[0] << "[" << SERVICE_INSTALL_CMDLINE_PARAM
|
||||||
<< "] [" << SERVICE_UNINSTALL_CMDLINE_PARAM << "]" << endl;
|
<< "] [" << SERVICE_UNINSTALL_CMDLINE_PARAM << "]" << endl;
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PANDORA_FILE_H__
|
#ifndef __PANDORA_FILE__
|
||||||
#define __PANDORA_FILE_H__
|
#define __PANDORA_FILE__
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../pandora.h"
|
#include "../pandora.h"
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PANDORA_H__
|
#ifndef __PANDORA__
|
||||||
#define __PANDORA_H__
|
#define __PANDORA__
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -215,7 +215,7 @@ Pandora_Windows_Service::pandora_run () {
|
|||||||
privkey_file = Pandora::getPandoraInstallDir ();
|
privkey_file = Pandora::getPandoraInstallDir ();
|
||||||
privkey_file += "key\\id_dsa";
|
privkey_file += "key\\id_dsa";
|
||||||
|
|
||||||
ssh_client->connectWithPublicKey (remote_host.c_str (), 22, "babel",
|
ssh_client->connectWithPublicKey (remote_host.c_str (), 22, "pandora",
|
||||||
pubkey_file, privkey_file, "");
|
pubkey_file, privkey_file, "");
|
||||||
} catch (SSH::Authentication_Failed e) {
|
} catch (SSH::Authentication_Failed e) {
|
||||||
delete ssh_client;
|
delete ssh_client;
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PANDORA_SSH_CLIENT_H__
|
#ifndef __PANDORA_SSH_CLIENT__
|
||||||
#define __PANDORA_SSH_CLIENT_H__
|
#define __PANDORA_SSH_CLIENT__
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "../pandora.h"
|
#include "../pandora.h"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pandora_ssh_test.h"
|
#include "pandora_ssh_test.h"
|
||||||
#include "../pandora_agent_conf.h"
|
|
||||||
#include "../tinyxml/tinyxml.h"
|
#include "../tinyxml/tinyxml.h"
|
||||||
#include "../misc/pandora_file.h"
|
#include "../misc/pandora_file.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -117,6 +116,10 @@ Pandora_SSH_Test::test () {
|
|||||||
cout << "Created a blank XML file in " << tmp_filepath<< endl;
|
cout << "Created a blank XML file in " << tmp_filepath<< endl;
|
||||||
|
|
||||||
remote_filepath = conf->getValue ("server_path");
|
remote_filepath = conf->getValue ("server_path");
|
||||||
|
if (remote_filepath[remote_filepath.length () - 1] != '/') {
|
||||||
|
remote_filepath += "/";
|
||||||
|
}
|
||||||
|
|
||||||
cout << "Remote copying " << tmp_filepath << "on server " << remote_host
|
cout << "Remote copying " << tmp_filepath << "on server " << remote_host
|
||||||
<< " at " << remote_filepath << tmp_filename << endl;
|
<< " at " << remote_filepath << tmp_filename << endl;
|
||||||
try {
|
try {
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __PANDORA_SSH_TEST__
|
||||||
|
#define __PANDORA_SSH_TEST__
|
||||||
|
|
||||||
#include "pandora_ssh_client.h"
|
#include "pandora_ssh_client.h"
|
||||||
#include "../pandora_agent_conf.h"
|
#include "../pandora_agent_conf.h"
|
||||||
|
|
||||||
@ -32,3 +35,5 @@ namespace SSH {
|
|||||||
void test ();
|
void test ();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user