From eac68b24dcd8357a8f689bc295009de0e236565c Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Wed, 29 Aug 2001 13:17:02 +0000 Subject: [PATCH] Add heuristic to detect SSH connection (in the same style as other heuristics already here which not supposed to be secure, just helpers). Approved by: security@ silence --- contrib/opie/libopie/insecure.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/opie/libopie/insecure.c b/contrib/opie/libopie/insecure.c index a7fda7b3cca2..e02183ac419f 100644 --- a/contrib/opie/libopie/insecure.c +++ b/contrib/opie/libopie/insecure.c @@ -25,6 +25,9 @@ License Agreement applies to this software. found. Use uname(). Created at NRL for OPIE 2.2 from opiesubr.c. Fixed pointer assignment that should have been a comparison. + +$FreeBSD$ + */ #include "opie_cfg.h" @@ -64,6 +67,8 @@ int opieinsecure FUNCTION_NOARGS if (result != -1) return result; + if (getenv("SSH_CLIENT") != NULL) + return (result = 0); display_name = (char *) getenv("DISPLAY"); term_name = (char *) getenv("TERM");