X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=gaas%2Flib%2FgaasdMessages.php;fp=gaas%2Flib%2FgaasdMessages.php;h=c7b4f88225b284c8a0c41331d376611bd57ad2b6;hp=a74df01d1e1e51f62dd85e8b62610b3300e2b48c;hb=c4ad8271df834f0d5f39cb58e8658195b59f30bd;hpb=088c427add403ff8869d5a48d7f94615750ea2bd diff --git a/gaas/lib/gaasdMessages.php b/gaas/lib/gaasdMessages.php index a74df01..c7b4f88 100644 --- a/gaas/lib/gaasdMessages.php +++ b/gaas/lib/gaasdMessages.php @@ -44,7 +44,18 @@ function gaasInitServer_server($msg) $adpass = $msg["pass"]; $adclientdef = $msg["clientdef"]; $adadmindef = $msg["admindef"]; + // now wee test our logins... + // first look up the domain name stuff + $servers = dns_get_record("_gc._tcp.$addom"); + if(count($servers)<1) { + echo "AD servers cant be found, fail!\n"; + } + + // we should check all servers, but lets just go with 0 for now + $cnt = ldap_connect($servers[0]["target"], $servers[0]["port"]); + ldap_bind($cnt, "$adlogin", "$adpass"); + // then