Diff for /doc/build/Attic/loncapapasswordauthentication.html between versions 1.1 and 1.2

version 1.1, 2001/02/10 17:07:47 version 1.2, 2001/02/15 15:43:47
Line 16  passwords on a LON-CAPA system. Line 16  passwords on a LON-CAPA system.
 </P>  </P>
 <H3>Latest HOWTO</H3>  <H3>Latest HOWTO</H3>
 <P>  <P>
   The following section of perl code illustrates the
   different ways passwords can be evaluated.
   </P>
   <P>
   <PRE>
                             my ($howpwd,$contentpwd)=split(/:/,$realpasswd);
                             my $pwdcorrect=0;
                             if ($howpwd eq 'internal') {
         $pwdcorrect=
     (crypt($upass,$contentpwd) eq $contentpwd);
                             } elsif ($howpwd eq 'unix') {
                                 $contentpwd=(getpwnam($uname))[1];
                                 $pwdcorrect=
                                     (crypt($upass,$contentpwd) eq $contentpwd);
                             } elsif ($howpwd eq 'krb4') {
                                 $pwdcorrect=(
                                    Authen::Krb4::get_pw_in_tkt($uname,"",
                                           $contentpwd,'krbtgt',$contentpwd,1,
        $upass) == 0);
                             }
                             if ($pwdcorrect) {
                                print $client "authorized\n";
                             } else {
                                print $client "non_authorized\n";
                             }  
   </PRE>
 </P>  </P>
 </BODY>  </BODY>
 </HTML>  </HTML>
   

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>