[Kolab-devel] Patch: Server Local Networks field

Maarten Stolte maarten.stolte at papuaos.org
Wed Sep 17 09:22:36 CEST 2003


Hello,

excuse my ignorance, but does this also apply to my (not earlier
reported) problem, where postfix sets a network to allow based on my ip
from my ADSL line, which should not be done imho, at least, it would
allow everyone in that part of my providers network to use my machine as
a relay, or wouldnt it?

Maarten

On Wed, 2003-09-17 at 08:11, Stephan Buys wrote:
> There has been no objections so far. Should I commit this? (Martin, certainly you
> want to handle this for the stable version?)

> Regards,
> Stephan
> 
> On Tuesday 09 September 2003 12:46, Stephan Buys wrote:
> > Hi all,
> >
> > Here is a patch for the bug reported on the list a couple of days ago.
> > It attempts to enforce proper formatting on the list of networks provided
> > to LDAP from the Local Networks field.
> >
> > Regards,
> > Stephan
> >
> > Index: index.php
> > ===================================================================
> > RCS file: /kolabrepository/server/kolab/kolab/admin/server/index.php,v
> > retrieving revision 1.6.2.1
> > diff -u -p -r1.6.2.1 index.php
> > --- index.php   18 Jul 2003 01:39:07 -0000      1.6.2.1
> > +++ index.php   9 Sep 2003 10:48:44 -0000
> > @@ -102,8 +102,18 @@ if (!$errors) {
> >                  ldap_free_result($result);
> >               }
> >           }
> > -         if ($mynetworks) $attrs['postfix-mynetworks'][0] = $mynetworks;
> > +         if ($mynetworks) {
> > +           #Do some basic sanity checks
> > +           preg_match_all ("/(\d+\.\d+\.\d+\.\d+\/\d+)/x",
> > +               $mynetworks, $networks);
> > +           for ($i = 0; $i < count($networks[0])-1; $i++) {
> > +               $parsednetworks = $parsednetworks.$networks[0][$i].", ";
> > +           }
> > +           $parsednetworks =
> > $parsednetworks.$networks[0][count($networks[0])-1];
> >
> > +           $attrs['postfix-mynetworks'][0] = $parsednetworks;
> > +
> > +        }
> >           if (!ldap_modify ($link,"k=kolab,".$_SESSION['base_dn'],$attrs))
> >              array_push($errors, "LDAP Error: failed to modify kolab config
> > object ".ldap_error($link)); break;
> > @@ -143,6 +153,7 @@ if (!$errors) {
> >  }
> >
> >  print("</center></td></tr></table>\n");
> > +
> >
> >  if ($errors) {
> >     print("<TABLE WIDTH=\"80%\" CELLSPACING=20 CELLPADDING=0 BORDER=0>\n");
> >
> > _______________________________________________
> > Kolab-devel mailing list
> > Kolab-devel at intevation.org
> > https://kroupware.org/mailman/listinfo/kolab-devel
> 
> 
> 
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at intevation.org
> https://kroupware.org/mailman/listinfo/kolab-devel




More information about the devel mailing list