|
|
@ -228,6 +228,7 @@ config_read_security(int file, struct config_security* sc,
|
|
|
|
|
|
|
|
|
|
|
|
/* setting defaults */
|
|
|
|
/* setting defaults */
|
|
|
|
sc->allow_root = 0;
|
|
|
|
sc->allow_root = 0;
|
|
|
|
|
|
|
|
sc->login_retry = 3;
|
|
|
|
sc->ts_users_enable = 0;
|
|
|
|
sc->ts_users_enable = 0;
|
|
|
|
sc->ts_admins_enable = 0;
|
|
|
|
sc->ts_admins_enable = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -239,6 +240,10 @@ config_read_security(int file, struct config_security* sc,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sc->allow_root = text2bool((char*)list_get_item(param_v, i));
|
|
|
|
sc->allow_root = text2bool((char*)list_get_item(param_v, i));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (0 == g_strcasecmp(buf, SESMAN_CFG_SEC_LOGIN_RETRY))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sc->login_retry = g_atoi((char*)list_get_item(param_v, i));
|
|
|
|
|
|
|
|
}
|
|
|
|
if (0 == g_strcasecmp(buf, SESMAN_CFG_SEC_USR_GROUP))
|
|
|
|
if (0 == g_strcasecmp(buf, SESMAN_CFG_SEC_USR_GROUP))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (g_getgroup_info((char*)list_get_item(param_v, i), &gid) == 0)
|
|
|
|
if (g_getgroup_info((char*)list_get_item(param_v, i), &gid) == 0)
|
|
|
@ -260,6 +265,7 @@ config_read_security(int file, struct config_security* sc,
|
|
|
|
/* printing security config */
|
|
|
|
/* printing security config */
|
|
|
|
g_printf("security configuration:\r\n");
|
|
|
|
g_printf("security configuration:\r\n");
|
|
|
|
g_printf("\tAllowRootLogin: %i\r\n",sc->allow_root);
|
|
|
|
g_printf("\tAllowRootLogin: %i\r\n",sc->allow_root);
|
|
|
|
|
|
|
|
g_printf("\tMaxLoginRetry: %i\r\n",sc->login_retry);
|
|
|
|
if (sc->ts_users_enable)
|
|
|
|
if (sc->ts_users_enable)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_printf("\tTSUsersGroup: %i\r\n", sc->ts_users);
|
|
|
|
g_printf("\tTSUsersGroup: %i\r\n", sc->ts_users);
|
|
|
|