Author: bh
Date: 2007-10-04 20:44:07 +0200 (Thu, 04 Oct 2007)
New Revision: 407
Modified:
trunk/openvas-libnasl/nasl/nasl_grammar.y
Log:
Fix code formatting
Modified: trunk/openvas-libnasl/nasl/nasl_grammar.y
===================================================================
--- trunk/openvas-libnasl/nasl/nasl_grammar.y 2007-10-04 14:37:26 UTC (rev
406)
+++ trunk/openvas-libnasl/nasl/nasl_grammar.y 2007-10-04 18:44:07 UTC (rev
407)
@@ -503,7 +503,7 @@
#ifdef MULTIPLE_INCLUDE_DIRS
else
{
- int i;
+ int i;
for (i = 0; i < sizeof(inc_dirs) / sizeof(*inc_dirs); i ++)
{
@@ -516,36 +516,39 @@
}
#endif
-authenticate:
- if ( pc->always_authenticated )
- pc->authenticated = 1;
- else
- {
- fgets(line, sizeof(line) - 1, pc->fp);
- line[sizeof(line) - 1] = '\0';
- if ( strncmp(line, "#TRUSTED", strlen("#TRUSTED") ) == 0 )
- {
- int sig;
- full_name[sizeof(full_name) - 1] = '\0';
- sig = verify_script_signature(full_name);
- if ( sig == 0 )
- pc->authenticated = 1;
+ authenticate:
+ if (pc->always_authenticated)
+ pc->authenticated = 1;
else
- pc->authenticated = 0;
-
- if ( sig > 0 )
+ {
+ fgets(line, sizeof(line) - 1, pc->fp);
+ line[sizeof(line) - 1] = '\0';
+ if (strncmp(line, "#TRUSTED", strlen("#TRUSTED")) == 0)
{
- fprintf(stderr, "%s: bad signature. Will not execute this script\n",
full_name);
- fclose(pc->fp);
- pc->fp = NULL;
- return -1;
+ int sig;
+ full_name[sizeof(full_name) - 1] = '\0';
+ sig = verify_script_signature(full_name);
+ if (sig == 0)
+ pc->authenticated = 1;
+ else
+ pc->authenticated = 0;
+
+ if (sig > 0)
+ {
+ fprintf(stderr, "%s: bad signature."
+ " Will not execute this script\n", full_name);
+ fclose(pc->fp);
+ pc->fp = NULL;
+ return -1;
+ }
+ else if (sig < 0)
+ fprintf(stderr, "%s: Could not verify the signature -"
+ " this script will be run in non-authenticated mode\n",
+ full_name);
}
- else if ( sig < 0 )
- fprintf(stderr, "%s: Could not verify the signature - this script
will be run in non-authenticated mode\n", full_name);
- }
- rewind(pc->fp);
- }
- return 0;
+ rewind(pc->fp);
+ }
+ return 0;
}
void
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits