[PATCH] 2.4.2 nnrpd/perm.c possible problem

Chris Caputo ccaputo at alt.net
Wed Jul 20 20:24:58 UTC 2005


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