|
@@ -102,7 +102,12 @@ static char* g_product_board_cpu[] = {
|
|
|
"xxx",
|
|
"xxx",
|
|
|
"T113"
|
|
"T113"
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#define RADIUS_TOOL "/root/run/app/radius/radlogin"
|
|
|
|
|
+
|
|
|
|
|
+#define LDAP_TOOL "/root/run/app/ldap/ldapwhoami"
|
|
|
|
|
|
|
|
static web_handle_t webHandle;
|
|
static web_handle_t webHandle;
|
|
|
static int webSetCallback(void);
|
|
static int webSetCallback(void);
|
|
@@ -698,17 +703,18 @@ static void loginFunc(void* conn)
|
|
|
if(ret)
|
|
if(ret)
|
|
|
{
|
|
{
|
|
|
//database is not menber you need auth
|
|
//database is not menber you need auth
|
|
|
|
|
+#if (CHIP_TYPE == CHIP_T113i)
|
|
|
if(__globalDeviceManage._globalDevInfo.misc.radius)
|
|
if(__globalDeviceManage._globalDevInfo.misc.radius)
|
|
|
{
|
|
{
|
|
|
char temp[256] = {0};
|
|
char temp[256] = {0};
|
|
|
- sprintf(temp,"radlogin -f /etc/radiusclient/radiusclient.conf -u %s -p %s",_newUserLogin->user_name,_newUserLogin->user_password);
|
|
|
|
|
|
|
+ sprintf(temp,"%s -f /etc/radiusclient/radiusclient.conf -u %s -p %s",RADIUS_TOOL,_newUserLogin->user_name,_newUserLogin->user_password);
|
|
|
ret = system(temp);
|
|
ret = system(temp);
|
|
|
if(ret)
|
|
if(ret)
|
|
|
{
|
|
{
|
|
|
if(__globalDeviceManage._globalDevInfo.ldap.ldap)
|
|
if(__globalDeviceManage._globalDevInfo.ldap.ldap)
|
|
|
{
|
|
{
|
|
|
memset(temp,0,sizeof(temp));
|
|
memset(temp,0,sizeof(temp));
|
|
|
- sprintf(temp,"ldapwhoami -x -D \"%s\" -H ldap://%s -w %s",_newUserLogin->user_name,__globalDeviceManage._globalDevInfo.ldap.ldip_server,_newUserLogin->user_password);
|
|
|
|
|
|
|
+ sprintf(temp,"%s -x -D \"%s\" -H ldap://%s -w %s",LDAP_TOOL,_newUserLogin->user_name,__globalDeviceManage._globalDevInfo.ldap.ldip_server,_newUserLogin->user_password);
|
|
|
ret = system(temp);
|
|
ret = system(temp);
|
|
|
if(ret)
|
|
if(ret)
|
|
|
{
|
|
{
|
|
@@ -801,7 +807,7 @@ static void loginFunc(void* conn)
|
|
|
{
|
|
{
|
|
|
char temp[256] = {0};
|
|
char temp[256] = {0};
|
|
|
memset(temp,0,sizeof(temp));
|
|
memset(temp,0,sizeof(temp));
|
|
|
- sprintf(temp,"ldapwhoami -x -D \"%s\" -H ldap://%s -w %s",_newUserLogin->user_name,__globalDeviceManage._globalDevInfo.ldap.ldip_server,_newUserLogin->user_password);
|
|
|
|
|
|
|
+ sprintf(temp,"%s -x -D \"%s\" -H ldap://%s -w %s",LDAP_TOOL,_newUserLogin->user_name,__globalDeviceManage._globalDevInfo.ldap.ldip_server,_newUserLogin->user_password);
|
|
|
ret = system(temp);
|
|
ret = system(temp);
|
|
|
if(ret)
|
|
if(ret)
|
|
|
{
|
|
{
|
|
@@ -848,6 +854,7 @@ static void loginFunc(void* conn)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}else
|
|
}else
|
|
|
|
|
+#endif
|
|
|
{
|
|
{
|
|
|
UserInfo *node;
|
|
UserInfo *node;
|
|
|
UserInfo *next;
|
|
UserInfo *next;
|