|
From: Lei, Z. Y. <zhi...@in...> - 2006-09-07 07:37:28
|
Hi=20
I have a question of how webmin check the user is legal or not.
I installed webmin 1.290 source code
I found that the server code (miniserv.pl) will call following code to
generate the login web page:
sub run_login_script
{
if ($config{'login_script'}) {
system($config{'login_script'}.
" ".join(" ", map { quotemeta($_) } @_).
" >/dev/null 2>&1 </dev/null");
}
}
=20
now the case is I can't find where is the code in session_login.cgi to
authenticate users.=20
in another words: i cann't understand how did webmin switch from login
page to the main page if the users if legal and corretly inputed
username and password,
the code in session_login.cgi :
print "$text{'session_prefix'}\n";
print "<form action=3D$gconfig{'webprefix'}/session_login.cgi
method=3Dpost>\n";
print "<input type=3Dhidden name=3Dpage
value=3D'".&html_escape($in{'page'})."'>\n";
print "<table border width=3D40%>\n";
print "<tr $tb> <td><b>$text{'session_header'}</b></td> </tr>\n";
print "<tr $cb> <td align=3Dcenter><table cellpadding=3D3>\n";
the above code shows that after the user click login , the corresponding
cgi script is still session_login.cgi , but i can't find the
authenticate code
in this file .and i am confused :
after executing the session_login.cgi , which cgi file will be executed
immediatelly by webmin ?
best regards .
Alex lei.
|