3 // this file defines all the messages used by gaaasd
5 // there are only really two status messages at this point - "init" meaning we have no been defined yet
6 // and "running" meaning we have been defined
7 function gaasStatus_server($messages)
9 global $initState, $backEnd;
12 if($initState != false && $backEnd != "") {
20 function gaasInitServer_server($msg)
22 global $initState, $backEnd;
24 // here we "init" the server, if we're ad, we attempt to connect to AD and if it all works
25 // we then create the db
26 // $m["backend"] = "AD|IN";
28 // $m["domain"] = "somedomain.com";
29 // $m["user"] = "someuser";
30 // $m["pass"] = "somepassword";
31 // $m["userdef"] = "user definition paramaters";
33 // $m["user"] = "someuser";
34 // $m["pass"] = "somepass";
36 if($msg["backend"] == "AD") {
38 // attempt connect to AD, verify creds
39 $addom = $msg["domain"];
40 $adlogin = $msg["user"];
41 $adpass = $msg["pass"];
42 $adclientdef = $msg["clientdef"];
43 $adadmindef = $msg["admindef"];
44 // now wee test our logins...
49 confSetVal("ad.domain", $addom);
50 confSetVal("ad.user", $adlogin);
51 confSetVal("ad.pass", $adpass);
52 confSetVal("ad.encryptionkey", generateHexString(32));
53 confSetVal("ad.clientdef", $adclientdef);
54 confSetVal("ad.admindef", $adadmindef);
56 $initState = "running";
59 // and that should be it... i think cept im in a forked erg.. lets assume it works, need pain i do not.
62 } else if($msg["backend"] == "IN") {
66 $initState = "running";
67 // then we need to "create user";