help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnu-radius] problems getting rewrite hook right


From: Charles Sprickman
Subject: [Help-gnu-radius] problems getting rewrite hook right
Date: Fri, 20 Oct 2006 16:58:55 -0400 (EDT)

Hi all,

I have the following hook to try and rewrite usernames for folks dialing in via our outsourced ports:

string
domain_split(string name)
{
        integer a;

        %[User-Name] = gsub("%", "@", name);
        a = index(name, '@');
        if (a != -1)
                return substr(name, a+1, -1);
        else
                return "bway.net";
        return "";
}

This works fine for all the "address@hidden" people, but we also do full domain accounts where people can login with their email address, ie: "address@hidden". If we instruct the users to enter this as "address@hidden" our dialup providers will send this through as "bob%foo.com". The above gives me the following result:

Oct 20 16:33:21 elephant radiusd: Auth.debug: mysql.c:57:do_mysql_query: called with SELECT attr,value FROM radius_attrib WHERE username='address@hidden' AND op IS NULL AND domain='bway.net'

So it is rewriting the "%" to "@", but not doing the split...

Any suggestions?

Thanks,

Charles

___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
address@hidden - 212.655.9344





reply via email to

[Prev in Thread] Current Thread [Next in Thread]