Forcing lowercase User-Name with rlm_perl



I basically want User-Name to be forced to lowercase for the duration of the request.

I have done the following:

modules {
	perl {
		module = my_perl_module.pm
	}
}

authorize {
	preprocess
	perl
	...
}

Pertinent contents of my_perl_module.pm:

sub authorize {
        $RAD_REQUEST{'User-Name'} =~ tr/A-Z/a-z/;
        return RLM_MODULE_OK;
}


This seems to do what I want. Is it the correct way to accomplish this task?

Thanks.





This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.