nessus-core/nessusd attack.c,1.171.2.8,1.171.2.9
Update of /usr/local/cvs/nessus-core/nessusd
In directory raccoon.nessus.org:/tmp/cvs-serv66323
Modified Files:
Tag: NESSUS_SQL
attack.c
Log Message:
Other formatting changes.
Index: attack.c
===================================================================
RCS file: /usr/local/cvs/nessus-core/nessusd/attack.c,v
retrieving revision 1.171.2.8
retrieving revision 1.171.2.9
diff -u -d -r1.171.2.8 -r1.171.2.9
--- attack.c 3 Dec 2003 14:40:54 -0000 1.171.2.8
+++ attack.c 3 Dec 2003 14:44:24 -0000 1.171.2.9
@@ -274,17 +274,17 @@
* Start the plugin
*/
- #ifdef USE_DATABASE
- db_new_executed_plugin(globals, plugins->value, hostinfos);
- #endif
+#ifdef USE_DATABASE
+ db_new_executed_plugin(globals, plugins->value, hostinfos);
+#endif
pid = plugin_launch(globals, plugins, hostinfos, preferences, key, name, cl_ptr);
if(pid < 0)
{
plugin_set_running_state(plugins->value, PLUGIN_STATUS_UNRUN);
- #ifdef USE_DATABASE
- db_update_plugin(globals, plugins->value, hostinfos, "Failed");
- #endif
+#ifdef USE_DATABASE
+ db_update_plugin(globals, plugins->value, hostinfos, "Failed");
+#endif
return ERR_CANT_FORK;
}
@@ -315,16 +315,16 @@
efree(&name);
plugin_set_running_state(plugins->value, PLUGIN_STATUS_DONE);
- #ifdef USE_DATABASE
+#ifdef USE_DATABASE
db_update_plugin(globals, plugins->value, hostinfos, "Host Dead");
- #endif
+#endif
return ERR_HOST_DEAD;
}
- #ifdef USE_DATABASE
- db_update_plugin(globals, plugins->value, hostinfos, "Finished");
- #endif
+#ifdef USE_DATABASE
+ db_update_plugin(globals, plugins->value, hostinfos, "Finished");
+#endif
}
else /* requirements_plugin() failed */
@@ -420,9 +420,9 @@
- #ifdef USE_DATABASE
+#ifdef USE_DATABASE
db_new_host_scan( globals, hostinfos );
- #endif
+#endif
tmp = emalloc(sizeof(struct arglist));
@@ -471,9 +471,9 @@
* Remote host died
*/
if(e == ERR_HOST_DEAD) {
- #ifdef USE_DATABASE
- db_update_host_scan( globals, hostinfos, 0, "Dead Host" );
- #endif
+#ifdef USE_DATABASE
+ db_update_host_scan( globals, hostinfos, 0, "Dead Host" );
+#endif
goto host_died;
}
else if(e == ERR_CANT_FORK )
@@ -482,17 +482,17 @@
{
forks_retry++;
log_write("fork() failed - sleeping %d seconds", forks_retry);
- #ifdef USE_DATABASE
+#ifdef USE_DATABASE
db_update_host_scan( globals, hostinfos, 1, "SLEEP()" );
- #endif
+#endif
fork_sleep(forks_retry);
goto again;
}
else {
log_write("fork() failed too many times - aborting");
- #ifdef USE_DATABASE
+#ifdef USE_DATABASE
db_update_host_scan( globals, hostinfos, 0, "Fork Fail" );
- #endif
+#endif
goto host_died;
}
}
@@ -503,10 +503,10 @@
}
pluginlaunch_wait();
- #ifdef USE_DATABASE
- db_update_host_scan( globals, hostinfos, 1, "Finished" );
- db_dump_kb( globals, hostinfos, key );
- #endif
+#ifdef USE_DATABASE
+ db_update_host_scan( globals, hostinfos, 1, "Finished" );
+ db_dump_kb( globals, hostinfos, key );
+#endif
host_died:
@@ -735,12 +735,10 @@
hg_flags = preferences_get_host_expansion(preferences);
max_hosts = get_max_hosts_number(preferences);
- #ifdef USE_DATABASE
-
- db_open_connection( globals );
- db_new_scan_session( globals, "FIX VER" );
-
- #endif
+#ifdef USE_DATABASE
+ db_open_connection( globals );
+ db_new_scan_session( globals, "FIX VER" );
+#endif
if( restoring == 0)
{
@@ -928,10 +926,11 @@
while(hosts_read(globals) == 0);
log_write("user %s : test complete", attack_user_name(globals));
- #ifdef USE_DATABASE
- db_scan_session_complete( globals );
- db_close_connection( globals );
- #endif
+#ifdef USE_DATABASE
+ db_scan_session_complete( globals );
+ db_close_connection( globals );
+#endif
+
scan_stop:
/*
* Delete the files uploaded by the user, if any
- Previous by Date: nessus-core/nessusd attack.c,1.171.2.7,1.171.2.8
- Next by Date: nessus-plugins/scripts smb_login.nasl,1.54,1.55
- Previous by Thread: nessus-core/nessusd attack.c,1.171.2.7,1.171.2.8
- Next by Thread: nessus-core/nessusd auth.c, 1.31, 1.31.4.1 comm.c, 1.70.2.1, 1.70.2.2 users.c, 1.45, 1.45.2.1
-
Nessus-cvs December 2003 archives indexes sorted by: [ thread ]
[ subject ]
[ author ]
[ date ]
-
Nessus-cvs list archive Table of Contents
-
More information about the Nessus-cvs mailing list
This archive was generated by a fusion of
Pipermail 0.09 (Mailman edition) and
MHonArc 2.6.8.