mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-21 03:42:31 +01:00
27 lines
792 B
C
27 lines
792 B
C
#include "lanconfigsecurity.h"
|
|
|
|
/*#Device.LANConfigSecurity.ConfigPassword!UCI:users/user,user/password*/
|
|
static int get_LANConfigSecurity_ConfigPassword(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
|
{
|
|
*value = "";
|
|
return 0;
|
|
}
|
|
|
|
static int set_LANConfigSecurity_ConfigPassword(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
|
{
|
|
switch (action) {
|
|
case VALUECHECK:
|
|
if (dm_validate_string(value, -1, 64, NULL, NULL))
|
|
return FAULT_9007;
|
|
break;
|
|
case VALUESET:
|
|
dmuci_set_value("users", "user", "password", value);
|
|
break;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
DMLEAF tLANConfigSecurityParams[] = {
|
|
{"ConfigPassword", &DMWRITE, DMT_STRING, get_LANConfigSecurity_ConfigPassword, set_LANConfigSecurity_ConfigPassword, BBFDM_BOTH},
|
|
{0}
|
|
};
|