[PATCH] 2.4.2 nnrpd/perm.c possible problem (fwd)

Chris Caputo ccaputo at alt.net
Thu Aug 18 01:36:57 UTC 2005


Anyone have a chance to doublecheck this?

Also, slight cleanup, I believe the "WasMailed" global var in nnrpd/post.c 
can be safely removed.  It isn't checked anymore.

Thanks,
Chris

---------- Forwarded message ----------
Date: Wed, 20 Jul 2005 20:24:58 +0000 (GMT)
From: Chris Caputo <ccaputo at alt.net>
To: inn-workers at isc.org
Subject: [PATCH] 2.4.2 nnrpd/perm.c possible problem

Hi.  I was looking at PERMgetpermissions() in 2.4.2's nnrpd/perm.c today.

I think the "if" statement after "#ifdef DO_PERL" might need to be changed
from

    } else if (success_auth->access_script != NULL) {

to

    } else if ((success_auth->access_script != NULL) &&
               (success_auth->access_type == PERMperl_access)) {

so that it matches the check done a little lower by the
"#ifdef DO_PYTHON", which is:

    } else if ((success_auth->access_script != NULL) &&
               (success_auth->access_type == PERMpython_access)) {

Otherwise if both DO_PERL and DO_PYTHON are defined, unlikely as that is,
then there will be times where a perl script execution is attempted for a
python script.

Untested (not even actually compiled with DO_PERL) patch below, in case
folks agree this needs to be fixed.

Thanks,
Chris

--- perm.c.original     2004-12-22 04:21:19.000000000 +0000
+++ perm.c      2005-07-20 20:21:00.000000000 +0000
@@ -1544,7 +1562,7 @@ void PERMgetpermissions()
          SetDefaultAccess(PERMaccessconf);
          return;
   #ifdef DO_PERL
-    } else if (success_auth->access_script != NULL) {
+    } else if ((success_auth->access_script != NULL) && (success_auth->access_type == PERMperl_access)) {
         i = 0;
         cpp = xstrdup(success_auth->access_script);
         args = 0;


More information about the inn-workers mailing list