Subversion Repositories configs

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 34
Line 50... Line 50...
50
	use constant	RLM_MODULE_USERLOCK=>  5;#  /* reject the request (user is locked out) */
50
	use constant	RLM_MODULE_USERLOCK=>  5;#  /* reject the request (user is locked out) */
51
	use constant	RLM_MODULE_NOTFOUND=>  6;#  /* user not found */
51
	use constant	RLM_MODULE_NOTFOUND=>  6;#  /* user not found */
52
	use constant	RLM_MODULE_NOOP=>      7;#  /* module succeeded without doing anything */
52
	use constant	RLM_MODULE_NOOP=>      7;#  /* module succeeded without doing anything */
53
	use constant	RLM_MODULE_UPDATED=>   8;#  /* OK (pairs modified) */
53
	use constant	RLM_MODULE_UPDATED=>   8;#  /* OK (pairs modified) */
54
	use constant	RLM_MODULE_NUMCODES=>  9;#  /* How many return codes there are */
54
	use constant	RLM_MODULE_NUMCODES=>  9;#  /* How many return codes there are */
-
 
55
 
-
 
56
# Same as src/include/radiusd.h
-
 
57
use constant	L_DBG=>   1;
-
 
58
use constant	L_AUTH=>  2;
-
 
59
use constant	L_INFO=>  3;
-
 
60
use constant	L_ERR=>   4;
-
 
61
use constant	L_PROXY=> 5;
-
 
62
use constant	L_ACCT=>  6;
55
 
63
 
56
#  Global variables can persist across different calls to the module.
64
#  Global variables can persist across different calls to the module.
57
#
65
#
58
#
66
#
59
#	{
67
#	{
Line 150... Line 158...
150
	# For debugging purposes only
158
	# For debugging purposes only
151
#	&log_request_attributes;
159
#	&log_request_attributes;
152
 
160
 
153
	# Loads some external perl and evaluate it
161
	# Loads some external perl and evaluate it
154
	my ($filename,$a,$b,$c,$d) = @_;
162
	my ($filename,$a,$b,$c,$d) = @_;
155
	&radiusd::radlog(1, "From xlat $filename ");
163
	&radiusd::radlog(L_DBG, "From xlat $filename ");
156
	&radiusd::radlog(1,"From xlat $a $b $c $d ");
164
	&radiusd::radlog(L_DBG,"From xlat $a $b $c $d ");
157
	local *FH;
165
	local *FH;
158
	open FH, $filename or die "open '$filename' $!";
166
	open FH, $filename or die "open '$filename' $!";
159
	local($/) = undef;
167
	local($/) = undef;
160
	my $sub = <FH>;
168
	my $sub = <FH>;
161
	close FH;
169
	close FH;
Line 168... Line 176...
168
sub detach {
176
sub detach {
169
	# For debugging purposes only
177
	# For debugging purposes only
170
#	&log_request_attributes;
178
#	&log_request_attributes;
171
 
179
 
172
	# Do some logging.
180
	# Do some logging.
173
	&radiusd::radlog(0,"rlm_perl::Detaching. Reloading. Done.");
181
	&radiusd::radlog(L_DBG,"rlm_perl::Detaching. Reloading. Done.");
174
}
182
}
175
 
183
 
176
#
184
#
177
# Some functions that can be called from other functions
185
# Some functions that can be called from other functions
178
#
186
#
Line 183... Line 191...
183
 
191
 
184
sub log_request_attributes {
192
sub log_request_attributes {
185
	# This shouldn't be done in production environments!
193
	# This shouldn't be done in production environments!
186
	# This is only meant for debugging!
194
	# This is only meant for debugging!
187
	for (keys %RAD_REQUEST) {
195
	for (keys %RAD_REQUEST) {
188
		&radiusd::radlog(1, "RAD_REQUEST: $_ = $RAD_REQUEST{$_}");
196
		&radiusd::radlog(L_DBG, "RAD_REQUEST: $_ = $RAD_REQUEST{$_}");
189
	}
197
	}
190
}
198
}
191
 
199