void Decrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8);
void Encrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void Decrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8);
void Encrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
return radc.GetPlugin();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
return radc.GetPlugin();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-int RAD_SETTINGS::ParseIntInRange(const string & str, int min, int max, int * val)
+int RAD_SETTINGS::ParseIntInRange(const std::string & str, int min, int max, int * val)
- copy(str.begin(), str.end(), back_inserter(*lst));
- list<string>::iterator it(find(lst->begin(),
- lst->end(),
- "empty"));
- if (it != lst->end())
- *it = "";
+std::copy(str.begin(), str.end(), std::back_inserter(*lst));
+std::list<std::string>::iterator it(std::find(lst->begin(),
+ lst->end(),
+ "empty"));
+if (it != lst->end())
+ *it = "";
}
//-----------------------------------------------------------------------------
int RAD_SETTINGS::ParseSettings(const MODULE_SETTINGS & s)
{
int p;
PARAM_VALUE pv;
}
//-----------------------------------------------------------------------------
int RAD_SETTINGS::ParseSettings(const MODULE_SETTINGS & s)
{
int p;
PARAM_VALUE pv;
password = pvi->value[0];
///////////////////////////
pv.param = "AuthServices";
password = pvi->value[0];
///////////////////////////
pv.param = "AuthServices";
if (pvi != s.moduleParams.end())
{
ParseServices(pvi->value, &authServices);
}
///////////////////////////
pv.param = "AcctServices";
if (pvi != s.moduleParams.end())
{
ParseServices(pvi->value, &authServices);
}
///////////////////////////
pv.param = "AcctServices";
if (pvi != s.moduleParams.end())
{
ParseServices(pvi->value, &acctServices);
if (pvi != s.moduleParams.end())
{
ParseServices(pvi->value, &acctServices);
}
//-----------------------------------------------------------------------------
void RADIUS::SetUsers(USERS * u)
}
//-----------------------------------------------------------------------------
void RADIUS::SetUsers(USERS * u)
//-----------------------------------------------------------------------------
int RADIUS::ProcessAuthPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
int RADIUS::ProcessAuthPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
int RADIUS::ProcessPostAuthPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
int RADIUS::ProcessPostAuthPacket(RAD_PACKET * packet)
{
// I think that only Framed-User services has sense to be accountable
// So we have to supply a Framed-IP
// I think that only Framed-User services has sense to be accountable
// So we have to supply a Framed-IP
//-----------------------------------------------------------------------------
int RADIUS::ProcessAcctStartPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
int RADIUS::ProcessAcctStartPacket(RAD_PACKET * packet)
{
- USER_IPS ips = ui->property.ips;
- if (ui->Authorize(ips[0].ip, "", 0xffFFffFF, this))
+ USER_IPS ips = ui->GetProperty().ips;
+ if (ui->Authorize(ips[0].ip, 0xffFFffFF, this))
{
printfd(__FILE__, "RADIUS::ProcessAcctStartPacket cannot authorize user '%s'\n", packet->login);
packet->packetType = RAD_REJECT_PACKET;
{
printfd(__FILE__, "RADIUS::ProcessAcctStartPacket cannot authorize user '%s'\n", packet->login);
packet->packetType = RAD_REJECT_PACKET;
//-----------------------------------------------------------------------------
int RADIUS::ProcessAcctStopPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
int RADIUS::ProcessAcctStopPacket(RAD_PACKET * packet)
{
//-----------------------------------------------------------------------------
bool RADIUS::CanAuthService(const std::string & svc) const
{
//-----------------------------------------------------------------------------
bool RADIUS::CanAuthService(const std::string & svc) const
{
}
//-----------------------------------------------------------------------------
bool RADIUS::CanAcctService(const std::string & svc) const
{
}
//-----------------------------------------------------------------------------
bool RADIUS::CanAcctService(const std::string & svc) const
{
}
//-----------------------------------------------------------------------------
bool RADIUS::IsAllowedService(const std::string & svc) const
{
}
//-----------------------------------------------------------------------------
bool RADIUS::IsAllowedService(const std::string & svc) const
{
}
//-----------------------------------------------------------------------------
bool RADIUS::WaitPackets(int sd) const
}
//-----------------------------------------------------------------------------
bool RADIUS::WaitPackets(int sd) const
{
unsigned char keyL[RAD_PASSWORD_LEN]; // Пароль для шифровки
memset(keyL, 0, RAD_PASSWORD_LEN);
{
unsigned char keyL[RAD_PASSWORD_LEN]; // Пароль для шифровки
memset(keyL, 0, RAD_PASSWORD_LEN);