Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([lbbs],[1.6.3])
AC_INIT([lbbs],[1.6.4])
AC_CONFIG_SRCDIR([src/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
Expand Down
19 changes: 12 additions & 7 deletions src/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,24 +324,29 @@ int check_user(const char *username, const char *password)
goto cleanup;
}

if (!SSH_v2 && checklevel2(&BBS_priv, P_MAN_S))
{
prints("\033[1;31m非普通账户必须使用SSH方式登录\033[m\r\n");
ret = 1;
goto cleanup;
}

ret = load_user_info(db, BBS_uid);

switch (ret)
{
case 0: // Login successfully
if (!SSH_v2 && checklevel2(&BBS_priv, P_MAN_S))
{
prints("\033[1;31m非普通账户必须使用SSH方式登录\033[m\r\n");
ret = 1;
goto cleanup;
}
break;
case -1: // Load data error
prints("\033[1;31m读取用户数据错误...\033[m\r\n");
ret = -1;
goto cleanup;
case -2: // Enforce update user agreement
if (!SSH_v2 && checklevel2(&BBS_priv, P_MAN_S))
{
prints("\033[1;31m非普通账户必须使用SSH方式登录\033[m\r\n");
ret = 1;
goto cleanup;
}
ret = 2;
goto cleanup;
case -3: // Dead
Expand Down