compiling freeradius source code
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? is it enough to simple change the code...and give ./build and install thanks for ur time and consideration... -- View this message in context: http://freeradius.1045715.n5.nabble.com/compiling-freeradius-source-code-tp4... Sent from the FreeRadius - Dev mailing list archive at Nabble.com.
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.
hi, thank you for the suggestion.but as i mentioned earlier i'm really a newcomer in this field.. where should i make these changes?and i hav to authenticate the user based on username ,password and the checkbit(as mentioned earlier).Can u suggest how i could accomplish this.a detailed explanation will be a great help... thanks in advance. On Wed, Apr 20, 2011 at 5:18 PM, Brian Candler <B.Candler@pobox.com> wrote:
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. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Wed, Apr 20, 2011 at 08:30:28PM +0530, ashwini b wrote:
thank you for the suggestion.but as i mentioned earlier i'm really a newcomer in this field..
where should i make these changes?and i hav to authenticate the user based on username ,password and the checkbit(as mentioned earlier).Can u suggest how i could accomplish this.a detailed explanation will be a great help...
You will make the change in sites-available/default in the "authorize" section. "man unlang" will tell you more about the language you can use in here. I can't give you any more detailled description of the solution, because you haven't given a detailled description of the problem. All you've said is you're "sending a bit along with the username". Maybe you could give an example of what the modified username looks like, and how you want the username to look after restoring it?
participants (3)
-
ash -
ashwini b -
Brian Candler