I'd like to implement the rlm_perl to rewrite some attributes, and I get a
segfault.  I've included the debug and the perl -VV so maybe someone more
knowledgeable can tell me why it fails (or give me a good pointer).

I'll also mention what I'm trying to do.

We have a couple of SSID's on a Cisco Airopoint.  

SSID 1: eap_mac ( the eap and mac have to work to join)
SSID 2: mac_only (only the mac has to match to join)

We'd like to have the mac addresses be differentiated between the two
SSID's, but of course any given client can only have one MAC (which shows up
in the User-Name when the authentication is mac-only).  So I thought that
with perl I could catch the Cisco-AVPair="ssid=mac_only" and add something
to the User-Name=(mac_addr) that will signify that it came in on the
mac_only ssid.

Attr_rewrite won't work for this, because I want to change the User-Name
based on what the Cisco-AVPair is.  If attr_rewrite will work for this
situation, I'm all ears (or eyes as the case may be), but I couldn't see how
to do that from the faq/doc/googles.

-atkinson

------------------------------
Module: Loaded perl 
 perl: module = "/opt/local/etc/raddb/attr_rewrite.pl"
 perl: func_authorize = "authorize"
 perl: func_authenticate = "authenticate"
 perl: func_accounting = "accounting"
 perl: func_preacct = "preacct"
 perl: func_checksimul = "checksimul"
 perl: func_detach = "detach"
 perl: func_xlat = "xlat"
 perl: perl_flags = "(null)"
 perl: func_start_accounting = "(null)"
 perl: func_stop_accounting = "(null)"
Segmentation Fault (core dumped)
------------------------------

Perl -VV:

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
    uname='sunos nasvr5 5.8 generic_108528-27 sun4u sparc
sunw,sun-blade-1000 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing
-I/usr/local/include -I/opt/local/include -I/opt/gnu/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include
-I/opt/local/include -I/opt/gnu/include'
    ccversion='', gccversion='3.4.2', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib '
    libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -ldld -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -ldld -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R
/opt/local/stow/perl-5.8.4/lib/5.8.4/sun4-solaris-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib
-L/opt/gnu/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Feb 12 2005 00:15:02
  @INC:
    /opt/local/stow/perl-5.8.4/lib/5.8.4/sun4-solaris-thread-multi
    /opt/local/stow/perl-5.8.4/lib/5.8.4
    /opt/local/stow/perl-5.8.4/lib/site_perl/5.8.4/sun4-solaris-thread-multi
    /opt/local/stow/perl-5.8.4/lib/site_perl/5.8.4
    /opt/local/stow/perl-5.8.4/lib/site_perl
    .
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
    uname='sunos nasvr5 5.8 generic_108528-27 sun4u sparc
sunw,sun-blade-1000 '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing
-I/usr/local/include -I/opt/local/include -I/opt/gnu/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include
-I/opt/local/include -I/opt/gnu/include'
    ccversion='', gccversion='3.4.2', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib '
    libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -ldld -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -ldld -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R
/opt/local/stow/perl-5.8.4/lib/5.8.4/sun4-solaris-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib
-L/opt/gnu/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Feb 12 2005 00:15:02
  @INC:
    /opt/local/stow/perl-5.8.4/lib/5.8.4/sun4-solaris-thread-multi
    /opt/local/stow/perl-5.8.4/lib/5.8.4
    /opt/local/stow/perl-5.8.4/lib/site_perl/5.8.4/sun4-solaris-thread-multi
    /opt/local/stow/perl-5.8.4/lib/site_perl/5.8.4
    /opt/local/stow/perl-5.8.4/lib/site_perl
    .



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to