Witam To ja zadam pytanie, czemu nie połączyć baz danych lms'a i radius'a w całość. Przecież dodanie lms'ie wpisów związanych z radiusem to jest pare linijek.(chodzi mi o autoryzacje). Reszta do group i można samemu ręcznie wklepać parametry. Małe, a cieszy. Wiem, że można radius'a zmusić do korzystania z bazy lms'a, ale do tej pory nie udało mi sie tego zrobić, więc poszedłem na łatwiznę. Pozdrawiam.
diff LMS.class.php ver. 1.11.5
1180,1192d1179 < /* < Zmieniamy rowniez wpisy zwiazane z radiusem < Start function NodeUpdate < */ < $this->DB->Execute('UPDATE radreply SET username=UPPER(?), attribute='Framed-IP-Address', op=':=', value=? WHERE id=?', < array($nodedata['name'], < $nodedata['ipaddr'], < $nodedata['id'])); < $this->DB->Execute('UPDATE radcheck SET username=UPPER(?), attribute='User-Password', op=':=', value=? WHERE id=?', < array($nodedata['name'], < $nodedata['passwd'], < $nodedata['id'])); < // END 1204,1208d1190 < //RADIUS START function DeleteNode < $this->DB->Execute('DELETE FROM usergroup WHERE username=(SELECT username FROM radcheck WHERE id = ?)', array($id)); < $this->DB->Execute('DELETE FROM radcheck WHERE id = ?', array($id)); < $this->DB->Execute('DELETE FROM radreply WHERE id = ?', array($id)); < //END 1479,1493d1460 < //RADIUS function NodeAdd < $this->DB->Execute('INSERT INTO radreply (id, username, attribute, op, value) < VALUES (?, ?, 'Framed-IP-Address', '=', ?)', < array($id, < strtoupper($nodedata['name']), < $nodedata['ipaddr'])); < $this->DB->Execute('INSERT INTO radcheck (id, username, attribute, op, value) < VALUES (?, ?, 'User-Password', ':=', ?)', < array($id, < strtoupper($nodedata['name']), < $nodedata['passwd'])); < $this->DB->Execute('INSERT INTO usergroup VALUES (?, 'pppoe', 0)', < array($id, < strtoupper($nodedata['name']))); < // $nodedata['location'));
!DSPAM:49830aa7316352889253296!