
jan at nessus
May 18, 2006, 7:44 AM
Post #1 of 1
(612 views)
Permalink
|
|
NessusClient/nessus comm.c,1.19,1.20
|
|
Update of /usr/local/cvs/NessusClient/nessus In directory raccoon.nessus.org:/tmp/cvs-serv36369 Modified Files: comm.c Log Message: Use the factored out routin context_sync_plugin_prefs(). Index: comm.c =================================================================== RCS file: /usr/local/cvs/NessusClient/nessus/comm.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- comm.c 17 May 2006 12:28:18 -0000 1.19 +++ comm.c 18 May 2006 14:44:39 -0000 1.20 @@ -589,18 +589,13 @@ harglst *files_to_send = NULL; struct arglist *pref = arg_get_value(preferences, "SERVER_PREFS"); struct nessus_plugin *plugins[2]; - struct arglist *pprefs = arg_get_value(preferences, "PLUGINS_PREFS"); int i; + context_sync_plugin_prefs(context); plugins[0] = context->plugins; plugins[1] = context->scanners; - if(!pprefs) - { - pprefs = emalloc(sizeof(struct arglist)); - arg_add_value(preferences, "PLUGINS_PREFS", ARG_ARGLIST, -1, pprefs); - } network_printf(context->socket, "CLIENT <|> PREFERENCES <|>\n"); /* * workaround to use new features while keeping @@ -637,31 +632,6 @@ char *name = plugin_prefs->name; char *type = arg_get_value(plugin_prefs->value, "type"); char *value = arg_get_value(plugin_prefs->value, "value"); - char *fullname = arg_get_value(plugin_prefs->value, "fullname"); - - - if((arg_get_type(pprefs, fullname)) >= 0) - { - if((arg_get_type(pprefs, fullname)) == ARG_INT) - { - if(!strcmp(value, "yes")) - arg_set_value(pprefs, fullname, sizeof(int), (void *)1); - else - arg_set_value(pprefs, fullname, sizeof(int), NULL); - } - else - arg_set_value(pprefs, fullname, strlen(value), strdup(value)); - } - else - { - if(!strcmp(value, "yes")) - arg_add_value(pprefs, fullname, ARG_INT, sizeof(int), (void *)1); - else if(!strcmp(value, "no")) - arg_add_value(pprefs, fullname, ARG_INT, sizeof(int), NULL); - else - arg_add_value(pprefs, fullname, ARG_STRING, strlen(value), - strdup(value)); - } /* This cuts down the list of alternatives (separated by ';') * down to just the first element, because the Nessus Server _______________________________________________ Nessus-cvs mailing list Nessus-cvs [at] list http://mail.nessus.org/mailman/listinfo/nessus-cvs
|