|
|
@ -139,11 +139,29 @@ cgiSystemCfgSetParams(HttpdConnData *connData) |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cgi_dbg("Changing access PW!!!"); |
|
|
|
if (strlen(buff) >= 64) { |
|
|
|
|
|
|
|
cgi_warn("Too long access_pw %s", buff); |
|
|
|
|
|
|
|
redir_url += sprintf(redir_url, "access_pw,"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cgi_dbg("Changing access PW!"); |
|
|
|
strncpy(sysconf->access_pw, buff, 64); |
|
|
|
strncpy(sysconf->access_pw, buff, 64); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (GET_ARG("access_name")) { |
|
|
|
|
|
|
|
cgi_dbg("access_name: %s", buff); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!strlen(buff) || strlen(buff) >= 32) { |
|
|
|
|
|
|
|
cgi_warn("Too long access_name %s", buff); |
|
|
|
|
|
|
|
redir_url += sprintf(redir_url, "access_name,"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strncpy(sysconf->access_name, buff, 32); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (GET_ARG("admin_pw")) { |
|
|
|
if (GET_ARG("admin_pw")) { |
|
|
|
cgi_dbg("admin_pw: %s", buff); |
|
|
|
cgi_dbg("admin_pw: %s", buff); |
|
|
|
|
|
|
|
|
|
|
@ -161,7 +179,13 @@ cgiSystemCfgSetParams(HttpdConnData *connData) |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cgi_dbg("Changing admin PW!!!"); |
|
|
|
if (strlen(buff) >= 64) { |
|
|
|
|
|
|
|
cgi_warn("Too long admin_pw %s", buff); |
|
|
|
|
|
|
|
redir_url += sprintf(redir_url, "admin_pw,"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cgi_dbg("Changing admin PW!"); |
|
|
|
strncpy(persist.admin.pw, buff, 64); |
|
|
|
strncpy(persist.admin.pw, buff, 64); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -211,6 +235,10 @@ tplSystemCfg(HttpdConnData *connData, char *token, void **arg) |
|
|
|
sprintf(buff, "%d", sysconf->pwlock); |
|
|
|
sprintf(buff, "%d", sysconf->pwlock); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (streq(token, "access_name")) { |
|
|
|
|
|
|
|
sprintf(buff, "%s", sysconf->access_name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tplSend(connData, buff, -1); |
|
|
|
tplSend(connData, buff, -1); |
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
return HTTPD_CGI_DONE; |
|
|
|
} |
|
|
|
} |
|
|
|