INN commit: trunk (5 files)
INN Commit
Russ_Allbery at isc.org
Fri Sep 26 22:41:49 UTC 2008
Date: Friday, September 26, 2008 @ 15:41:48
Author: iulius
Revision: 8054
Fix a bug since commit 6208 which made Python dynamic hooks not work.
Typos.
Modified:
trunk/nnrpd/group.c
trunk/nnrpd/misc.c
trunk/nnrpd/post.c
trunk/nnrpd/python.c
trunk/scripts/innreport_inn.pm
--------------------------+
nnrpd/group.c | 2 +-
nnrpd/misc.c | 2 +-
nnrpd/post.c | 2 +-
nnrpd/python.c | 11 +++++------
scripts/innreport_inn.pm | 2 +-
5 files changed, 9 insertions(+), 10 deletions(-)
Modified: nnrpd/group.c
===================================================================
--- nnrpd/group.c 2008-09-26 21:36:36 UTC (rev 8053)
+++ nnrpd/group.c 2008-09-26 22:41:48 UTC (rev 8054)
@@ -72,7 +72,7 @@
/* Authorize user using Python module method dynamic. */
if (PY_dynamic(PERMuser, group, false, &reply) < 0) {
- syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined.");
+ syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined");
} else {
if (reply != NULL) {
syslog(L_TRACE, "PY_dynamic() returned a refuse string for user %s at %s who wants to read %s: %s", PERMuser, Client.host, group, reply);
Modified: nnrpd/misc.c
===================================================================
--- nnrpd/misc.c 2008-09-26 21:36:36 UTC (rev 8053)
+++ nnrpd/misc.c 2008-09-26 22:41:48 UTC (rev 8054)
@@ -169,7 +169,7 @@
/* Authorize user at a Python authorization module. */
if (PY_dynamic(PERMuser, p, false, &reply) < 0) {
- syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined.");
+ syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined");
} else {
if (reply != NULL) {
syslog(L_TRACE, "PY_dynamic() returned a refuse string for user %s at %s who wants to read %s: %s", PERMuser, Client.host, p, reply);
Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c 2008-09-26 21:36:36 UTC (rev 8053)
+++ nnrpd/post.c 2008-09-26 22:41:48 UTC (rev 8054)
@@ -703,7 +703,7 @@
/* Authorize user using Python module method dynamic. */
if (PY_dynamic(PERMuser, p, true, &reply) < 0) {
- syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined.");
+ syslog(L_NOTICE, "PY_dynamic(): authorization skipped due to no Python dynamic method defined");
} else {
if (reply != NULL) {
syslog(L_TRACE, "PY_dynamic() returned a refuse string for user %s at %s who wants to read %s: %s", PERMuser, Client.host, p, reply);
Modified: nnrpd/python.c
===================================================================
--- nnrpd/python.c 2008-09-26 21:36:36 UTC (rev 8053)
+++ nnrpd/python.c 2008-09-26 22:41:48 UTC (rev 8054)
@@ -468,7 +468,7 @@
}
/* Log auth result. */
- syslog(L_NOTICE, "python dynamic method (%s access) succeeded, refusion string: %s", PostFlag ? "post" : "read", string == NULL ? "<empty>" : string);
+ syslog(L_NOTICE, "python dynamic method (%s access) succeeded, refuse string: %s", PostFlag ? "post" : "read", string == NULL ? "<empty>" : string);
/* Initialize reply string. */
if (reply_message != NULL)
@@ -741,12 +741,12 @@
PyObject*
PY_setup(int type, int method, char *file)
{
- int i;
+ int i;
PyFile *fp;
- PyObject *result;
+ PyObject *result;
/* Check to see if this file is in files. */
- if (!(hash_lookup(files, file))) {
+ if ((fp = hash_lookup(files, file)) == NULL) {
fp = xmalloc(sizeof(PyFile));
fp->file = xstrdup(file);
@@ -776,9 +776,8 @@
}
fp->loaded[type] = true;
}
- return fp->procs[type][method];
}
- return NULL;
+ return fp->procs[type][method];
}
Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm 2008-09-26 21:36:36 UTC (rev 8053)
+++ scripts/innreport_inn.pm 2008-09-26 22:41:48 UTC (rev 8054)
@@ -1520,7 +1520,7 @@
return 1 if $left =~ /^python method \S+ not found$/o;
return 1 if $left =~ /^python authenticate method succeeded, return code \d+, error string /o;
return 1 if $left =~ /^python access method succeeded$/o;
- return 1 if $left =~ /^python dynamic method \(\w+ access\) succeeded, refusion string: /o;
+ return 1 if $left =~ /^python dynamic method \(\w+ access\) succeeded, refuse string: /o;
return 1 if $left =~ /^python: .+ module successfully hooked into nnrpd$/o;
return 1 if $left =~ /^python: nnrpd .+ class instance created$/o;
return 1 if $left =~ /^python: n_a authenticate\(\) invoked: hostname \S+, ipaddress \S+, interface \S+, user /o;
More information about the inn-committers
mailing list