compiling freeradius source code

Brian Candler B.Candler at pobox.com
Wed Apr 20 13:48:33 CEST 2011


On Wed, Apr 20, 2011 at 12:46:42AM -0700, ash wrote:
> I'm a beginner in freeradius and i'm not familiar with the code.i'm setting
> up 802.1x authentication using freeradius and it works fine.but before
> authenticating the user based on username and password and assigning  to a
> vlan i have to check one more condition (whether a file is present in client
> or not.for this i'm sending a bit along with username.if file is present,
> the bit is set to 1).so to separate the bit from username at the freeradius
> for authentication i edited the auth.c file.now how should i compile the
> modified code and install it?

This shouldn't be necessary. You can use unlang to update the User-Name,
e.g.

    if (User-Name =~ /^(.)(.*)$/) {
      update request {
        My-Flag = $1
        User-Name = $2
      }
    }

(assuming you've defined My-Flag in the dictionary, or you could use
Tmp-String-0 or similar).

The above assumes you've stuffed one extra byte in front of the User-Name.
If that's not what you've done, then it will need updating appropriately.

Regards,

Brian.



More information about the Freeradius-Devel mailing list