version 1.29, 2002/04/04 21:46:44
|
version 1.30, 2002/04/18 20:16:43
|
Line 70 BEGIN {
|
Line 70 BEGIN {
|
$krbdefdom=~tr/a-z/A-Z/; |
$krbdefdom=~tr/a-z/A-Z/; |
$authformnop=(<<END); |
$authformnop=(<<END); |
<p> |
<p> |
<input type="radio" name="login" value="" checked="checked" |
<input type="radio" name="login" value="nochange" checked="checked" |
onClick="clicknop(this.form);"> |
onclick="changed_radio('nochange',document.cu);"> |
Do not change login data |
Do not change login data |
</p> |
</p> |
END |
END |
$authformkrb=(<<END); |
$authformkrb=(<<END); |
<p> |
<p> |
<input type=radio name=login value=krb onClick="clickkrb(this.form);"> |
<input type="radio" name="login" value="krb" |
|
onclick="changed_radio('krb',document.cu);"> |
Kerberos authenticated with domain |
Kerberos authenticated with domain |
<input type=text size=10 name=krbdom onChange="setkrb(this.form);"> |
<input type="text" size="10" name="krbarg" |
|
onclick="changed_text('krb',document.cu);" |
|
onchange="changed_text('krb',document.cu);"> |
</p> |
</p> |
END |
END |
$authformint=(<<END); |
$authformint=(<<END); |
<p> |
<p> |
<input type=radio name=login value=int onClick="clickint(this.form);"> |
<input type="radio" name="login" value="int" |
|
onclick="changed_radio('int',document.cu);"> |
Internally authenticated (with initial password |
Internally authenticated (with initial password |
<input type=text size=10 name=intpwd onChange="setint(this.form);">) |
<input type="text" size="10" name="intarg" |
|
onclick="changed_text('int',document.cu);" |
|
onchange="changed_text('int',document.cu);"> |
</p> |
</p> |
END |
END |
$authformfsys=(<<END); |
$authformfsys=(<<END); |
<p> |
<p> |
<input type=radio name=login value=fsys onClick="clickfsys(this.form);"> |
<input type="radio" name="login" value="fsys" |
|
onclick="changed_radio('fsys',document.cu);"> |
Filesystem authenticated (with initial password |
Filesystem authenticated (with initial password |
<input type=text size=10 name=fsyspwd onChange="setfsys(this.form);">) |
<input type="text" size="10" name="fsysarg" |
|
onclick="changed_text('fsys',document.cu);" |
|
onchange="changed_text('fsys',document.cu);"> |
</p> |
</p> |
END |
END |
$authformloc=(<<END); |
$authformloc=(<<END); |
<p> |
<p> |
<input type=radio name=login value=loc onClick="clickloc(this.form);" /> |
<input type="radio" name="login" value="loc" |
|
onclick="changed_radio('loc',document.cu);"> |
Local Authentication with argument |
Local Authentication with argument |
<input type=text size=10 name=locarg onChange="setloc(this.form);" /> |
<input type="text" size="10" name="locarg" |
|
onclick="changed_text('loc',document.cu);" |
|
onchange="changed_text('loc',document.cu);"> |
</p> |
</p> |
END |
END |
$loginscript=(<<ENDLOGINSCRIPT); |
$loginscript=(<<ENDLOGINSCRIPT); |
<script> |
<script> |
function setkrb(vf) { |
|
if (vf.krbdom.value!='') { |
|
vf.login[0].checked=true; |
|
vf.krbdom.value=vf.krbdom.value.toUpperCase(); |
|
vf.intpwd.value=''; |
|
vf.fsyspwd.value=''; |
|
vf.locarg.value=''; |
|
} |
|
} |
|
|
|
function setint(vf) { |
|
if (vf.intpwd.value!='') { |
|
vf.login[1].checked=true; |
|
vf.krbdom.value=''; |
|
vf.fsyspwd.value=''; |
|
vf.locarg.value=''; |
|
} |
|
} |
|
|
|
function setfsys(vf) { |
|
if (vf.fsyspwd.value!='') { |
|
vf.login[2].checked=true; |
|
vf.krbdom.value=''; |
|
vf.intpwd.value=''; |
|
vf.locarg.value=''; |
|
} |
|
} |
|
|
|
function setloc(vf) { |
var authvalues = new Object(); |
if (vf.locarg.value!='') { |
authvalues.names = new Array('krbarg','intarg','fsysarg','locarg'); |
vf.login[3].checked=true; |
authvalues.defaults = new Array('MSU.EDU','','',''); |
vf.krbdom.value=''; |
|
vf.intpwd.value=''; |
function changed_radio(choice,currentform) { |
vf.fsyspwd.value=''; |
var choicearg = choice + 'arg'; |
} |
if (currentform.elements[choicearg].value == '') { |
} |
clear(currentform,authvalues.names); |
|
for (var i=0; i<authvalues.names.length; i++) { |
function clicknop(vf) { |
if (authvalues.names[i] == choicearg) { |
vf.krbdom.value=''; |
currentform.elements[choicearg].value = authvalues.defaults[i]; |
vf.intpwd.value=''; |
} |
vf.fsyspwd.value=''; |
} |
vf.locarg.value=''; |
} |
} |
} |
|
|
function clickkrb(vf) { |
function changed_text(choice,currentform) { |
vf.krbdom.value='$krbdefdom'; |
var choicearg = choice + 'arg'; |
vf.intpwd.value=''; |
if (currentform.elements[choicearg].value !='') { |
vf.fsyspwd.value=''; |
// clear the other values |
vf.locarg.value=''; |
var keep = currentform.elements[choicearg].value; |
|
clear(currentform,authvalues.names); |
|
currentform.elements[choicearg].value = keep; |
|
// validate our value |
|
if (choice == 'krb') { |
|
currentform.elements[choicearg].value = keep.toUpperCase(); |
|
} |
|
// check the appropriate checkbox |
|
set_checked('login',choice,currentform); |
|
} |
} |
} |
|
|
function clickint(vf) { |
function clear(currentform,names) { |
vf.krbdom.value=''; |
for (var i=0; i< currentform.elements.length; i++) { |
vf.fsyspwd.value=''; |
for (var j = 0; j< names.length; j++) { |
vf.locarg.value=''; |
if (currentform.elements[i].name == names[j]) { |
|
currentform.elements[i].value = ''; |
|
} |
|
} |
|
} |
} |
} |
|
|
function clickfsys(vf) { |
function set_checked(name,choice,currentform) { |
vf.krbdom.value=''; |
for (var i=0; i< currentform.elements.length; i++) { |
vf.intpwd.value=''; |
if (currentform.elements[i].name == name) { |
vf.locarg.value=''; |
if (currentform.elements[i].value == choice) { |
|
currentform.elements[i].checked =true; |
|
} |
|
} |
|
} |
} |
} |
|
|
function clickloc(vf) { |
|
vf.krbdom.value=''; |
|
vf.intpwd.value=''; |
|
vf.fsyspwd.value=''; |
|
} |
|
</script> |
</script> |
ENDLOGINSCRIPT |
ENDLOGINSCRIPT |
$generalrule=<<END; |
$generalrule=<<END; |
Line 626 ENDTHREEHEAD
|
Line 623 ENDTHREEHEAD
|
my $genpwd=''; |
my $genpwd=''; |
if ($ENV{'form.login'} eq 'krb') { |
if ($ENV{'form.login'} eq 'krb') { |
$amode='krb4'; |
$amode='krb4'; |
$genpwd=$ENV{'form.krbdom'}; |
$genpwd=$ENV{'form.krbarg'}; |
} elsif ($ENV{'form.login'} eq 'int') { |
} elsif ($ENV{'form.login'} eq 'int') { |
$amode='internal'; |
$amode='internal'; |
$genpwd=$ENV{'form.intpwd'}; |
$genpwd=$ENV{'form.intarg'}; |
} elsif ($ENV{'form.login'} eq 'fsys') { |
} elsif ($ENV{'form.login'} eq 'fsys') { |
$amode='unix'; |
$amode='unix'; |
$genpwd=$ENV{'form.fsyspwd'}; |
$genpwd=$ENV{'form.fsysarg'}; |
} elsif ($ENV{'form.login'} eq 'loc') { |
} elsif ($ENV{'form.login'} eq 'loc') { |
$amode='localauth'; |
$amode='localauth'; |
$genpwd=$ENV{'form.locarg'}; |
$genpwd=$ENV{'form.locarg'}; |
$genpwd=" " if (!$genpwd); |
$genpwd=" " if (!$genpwd); |
|
} else { |
|
$r->print($error.'Invalid login mode or password'.$end); |
|
return; |
} |
} |
if ($ENV{'form.makeuser'}) { |
if ($ENV{'form.makeuser'}) { |
# Create a new user |
# Create a new user |