Advertisement
Guest User

Untitled

a guest
Dec 13th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. @@ -30,6 +30,27 @@
  2. $username = strtolower(getHttpVal_pass('user', 0));
  3. $passwd = getHttpVal_pass('password', null);
  4.  
  5. +//james vars
  6. +$debug = 1;
  7. +$otpOnlyAuthAllow = 1; //change to enable OTP only
  8. +$skipLdapAuth = 0; //dont edit this one
  9. +
  10. +//james script, if not OTP token, then set passwd as OTP for citrix
  11. +$passwdlen = strlen($passwd);
  12. +if ($otpOnlyAuthAllow == 1 && $passwdlen == 44) {
  13. + $otp = $passwd;
  14. + $skipLdapAuth = 1;
  15. +}
  16. +
  17. +//james debug
  18. +if ($debug) {
  19. + $myLog->log(LOG_ERR, $otp);
  20. + $myLog->log(LOG_ERR, $passwd);
  21. + $myLog->log(LOG_ERR, $passwdlen);
  22. +}
  23. +
  24. +
  25. +
  26. if($otp && $username && $passwd){
  27. if($user_domain = seperatUsersAndDomain($username)){
  28. $user = $user_domain[0];
  29. @@ -416,6 +437,14 @@
  30. global $myLog;
  31. global $confs,$ldap_host,$ldap_port,$ldap_version,$ldap_secured,$ldap_timeout,$ldap_host1,$user_full_name;
  32. $myLog->log(LOG_DEBUG, 'Authenticating with LDAP/AD...');
  33. + global $skipLdapAuth,$debug;
  34. + if ($skipLdapAuth == 1) {
  35. + if ($debug) {
  36. + $myLog->log(LOG_ERR, 'skipping ldap auth');
  37. + }
  38. + return true;
  39. + }
  40. +
  41.  
  42. // Connect to LDAP server
  43. $ldap_host = $confs["ldapconf"]["host"];
  44. @@ -549,6 +578,8 @@
  45. global $auth_status;
  46. global $check_auto_provisioning;
  47. global $confs;
  48. +
  49. +
  50. if(($check_auto_provisioning == 1) && ($key_records_found == 0)) {
  51. $myLog->log(LOG_DEBUG, 'Adding User-YubiKey mapping...');
  52. if($confs['auto_provisioning']) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement