perl: Don't call detach after failed perl_parse #802

Merged
merged 1 commit into from Oct 1, 2014

Projects

None yet

2 participants

@spbnick
Collaborator
spbnick commented Sep 30, 2014

Don't call "detach" callback in rlm_perl, if perl_parse of the Perl
module failed.

This fixes segfault when the module file cannot be read:

Can't open perl script "/etc/raddb/mods-config/perl/example.pl": Permission denied
rlm_perl: perl_parse failed: /etc/raddb/mods-config/perl/example.pl not found or has syntax errors.
/etc/raddb/mods-enabled/perl[7]: Instantiation failed for module "perl"
Segmentation fault
@spbnick spbnick perl: Don't call detach after failed perl_parse
Don't call "detach" callback in rlm_perl, if perl_parse of the Perl
module failed.

This fixes segfault when the module file cannot be read:

    Can't open perl script "/etc/raddb/mods-config/perl/example.pl": Permission denied
    rlm_perl: perl_parse failed: /etc/raddb/mods-config/perl/example.pl not found or has syntax errors.
    /etc/raddb/mods-enabled/perl[7]: Instantiation failed for module "perl"
    Segmentation fault
e811b8e
@alandekok alandekok merged commit 1db4867 into FreeRADIUS:v3.0.x Oct 1, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment