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
commit5a0183e22f8168822df7ffce4eb20d9ffe2aead3 (patch)
treeb27ceb99c712cac271e48726fe06def4beac05fe
parenta317253f12deeeb4e262c9d34865ac0013ef4c15 (diff)
downloadpttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar.gz
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar.bz2
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar.lz
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar.xz
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.tar.zst
pttbbs-5a0183e22f8168822df7ffce4eb20d9ffe2aead3.zip
give warning prompt when user use insecure(non-ssh) connection
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@973 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/mbbsd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/mbbsd.c b/pttbbs/mbbsd/mbbsd.c
index e68aae26..1ea9b1b8 100644
--- a/pttbbs/mbbsd/mbbsd.c
+++ b/pttbbs/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)