INN commit: trunk/nnrpd (perm.c)
INN Commit
rra at isc.org
Sun Jan 23 09:22:38 UTC 2011
Date: Sunday, January 23, 2011 @ 01:22:38
Author: iulius
Revision: 9157
Improve the logging of Perl and Python access hooks.
The origin wasn't previously mentioned:
"syntax error in (null)(2), Expected value."
Now, nnrpd will log:
"syntax error in perl_access-block(2), Expected value."
Modified:
trunk/nnrpd/perm.c
--------+
perm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Modified: perm.c
===================================================================
--- perm.c 2011-01-20 16:52:31 UTC (rev 9156)
+++ perm.c 2011-01-23 09:22:38 UTC (rev 9157)
@@ -1066,6 +1066,7 @@
SetDefaultAccess(acc);
str = xstrdup(name);
acc->name = str;
+ file->filename = str;
for (i = 0; i <= access_vec->count; i++) {
tok = CONFgettoken(PERMtoks, file);
@@ -1074,6 +1075,9 @@
accessdecl_parse(acc, file, tok);
}
}
+
+ /* No need to free str here; it is used by acc, and will be
+ * free'd when the access block is free'd. */
free(file);
return;
}
@@ -1605,7 +1609,7 @@
access_realms[0] = xcalloc(1, sizeof(ACCESSGROUP));
- PERMvectortoaccess(access_realms[0], "perl-dynamic", access_vec);
+ PERMvectortoaccess(access_realms[0], "perl_access-block", access_vec);
vector_free(access_vec);
} else {
@@ -1640,7 +1644,7 @@
access_realms[0] = xcalloc(1, sizeof(ACCESSGROUP));
memset(access_realms[0], 0, sizeof(ACCESSGROUP));
- PERMvectortoaccess(access_realms[0], "python-dynamic", access_vec);
+ PERMvectortoaccess(access_realms[0], "python_access-block", access_vec);
vector_free(access_vec);
} else {
More information about the inn-committers
mailing list