Mailing List Archive

NessusClient/nessus preferences.c,1.6,1.7 pdf_output.c,1.6,1.7
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv72141/nessus

Modified Files:
preferences.c pdf_output.c
Log Message:
Add a preference option to enable/disable the appendix with the plugin
information in PDF exports


Index: preferences.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/preferences.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- preferences.c 28 Apr 2006 10:46:36 -0000 1.6
+++ preferences.c 4 May 2006 16:06:45 -0000 1.7
@@ -720,6 +720,8 @@
return (void *)1;
else if(!strcmp(name, "scopes_load_plugin_cache_immediately"))
return (void *)1;
+ else if(!strcmp(name, "report_plugin_details_in_pdf"))
+ return (void *)1;
else
return NULL;
}

Index: pdf_output.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/pdf_output.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pdf_output.c 4 May 2006 15:33:18 -0000 1.6
+++ pdf_output.c 4 May 2006 16:06:45 -0000 1.7
@@ -451,7 +451,8 @@
FILE *file;
struct arglist *hosts;
GHashTable * appendix_plugins = NULL;
- int has_plugins = context->plugins != NULL;
+ int include_plugins = (prefs_get_int(Global, "report_plugin_details_in_pdf")
+ && context->plugins != NULL);

if(!strcmp(filename, "-"))file = stdout;
else file = fopen(filename, "w");
@@ -461,7 +462,7 @@
return(-1);
}

- if (has_plugins)
+ if (include_plugins)
appendix_plugins = g_hash_table_new(g_str_hash, g_str_equal);

hosts = backend_convert(be);
@@ -612,8 +613,8 @@

fprintf(file, "\t<tr>\n");
fprintf(file, "\t\t<td>\n");
- print_data_with_links(file, desc, report->name, has_plugins);
- if (has_plugins)
+ print_data_with_links(file, desc, report->name, include_plugins);
+ if (include_plugins)
g_hash_table_insert(appendix_plugins, report->name, context);
fprintf(file, "\n\t\t</td>\t</tr>\n");
efree(&desc);
@@ -635,8 +636,8 @@
fprintf(file, ": ");
fprintf(file, "\t<tr>\n");
fprintf(file, "\t\t<td>\n");
- print_data_with_links(file, desc, info->name, has_plugins);
- if (has_plugins)
+ print_data_with_links(file, desc, info->name, include_plugins);
+ if (include_plugins)
g_hash_table_insert(appendix_plugins, info->name, context);
fprintf(file, "\n\t\t</td>\t</tr>\n");
efree(&desc);
@@ -662,8 +663,8 @@
fprintf(file, ": ");
fprintf(file, "\t<tr>\n");
fprintf(file, "\t\t<td>\n");
- print_data_with_links(file, desc, note->name, has_plugins);
- if (has_plugins)
+ print_data_with_links(file, desc, note->name, include_plugins);
+ if (include_plugins)
g_hash_table_insert(appendix_plugins, note->name, context);
fprintf(file, "\n\t\t</td>\t</tr>\n");
efree(&desc);
@@ -682,7 +683,7 @@
efree(&href);
}

- if (has_plugins && g_hash_table_size(appendix_plugins) > 0)
+ if (include_plugins && g_hash_table_size(appendix_plugins) > 0)
{
fprintf(file, "<hr>\n\n");
print_appendix(file, appendix_plugins);

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs