summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-26 11:16:10 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-26 11:16:10 +0800
commit7c61cede56b2959149d54c8fb0f3267a31d09285 (patch)
treef4362b5bad8eb42e3df404a0efb889d2e8d45c0e
parent166a3e6260ee97ab891ee99170ffc544c409f346 (diff)
downloadpttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar.gz
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar.bz2
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar.lz
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar.xz
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.tar.zst
pttbbs-7c61cede56b2959149d54c8fb0f3267a31d09285.zip
give warning prompt when user use insecure(non-ssh) connection
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@973 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/mbbsd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index e68aae26..1ea9b1b8 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.84 2003/06/26 01:28:02 kcwu Exp $ */
+/* $Id: mbbsd.c,v 1.85 2003/06/26 03:16:10 kcwu Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -551,7 +551,12 @@ login_query()
} else if (uid[0] == '\0' || !dosearchuser(uid)) {
outs(err_uid);
} else if (strcmp(uid, STR_GUEST)) {
- getdata(21, 0, MSG_PASSWD, passbuf, sizeof(passbuf), NOECHO);
+ if(getenv("SSH_CLIENT"))
+ getdata(21, 0, MSG_PASSWD,
+ passbuf, sizeof(passbuf), NOECHO);
+ else
+ getdata(21, 0, MSG_PASSWD"(注意: 使用未加密的傳輸方式, 連線內容可能被監聽)",
+ passbuf, sizeof(passbuf), NOECHO);
passbuf[8] = '\0';
if (!checkpasswd(cuser.passwd, passbuf)