summaryrefslogtreecommitdiffstats
path: root/contrib/opie/libopie
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-08-29 13:17:02 +0000
committerache <ache@FreeBSD.org>2001-08-29 13:17:02 +0000
commit40c9b9ae1a590b90d8f9b5d53e9ca022f2a51b40 (patch)
treeca224165cc6179ca1463ab530a8f700fbafe3cf7 /contrib/opie/libopie
parent701291bbfe7ed3214779d9767acfe38948cd000a (diff)
downloadFreeBSD-src-40c9b9ae1a590b90d8f9b5d53e9ca022f2a51b40.zip
FreeBSD-src-40c9b9ae1a590b90d8f9b5d53e9ca022f2a51b40.tar.gz
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
Diffstat (limited to 'contrib/opie/libopie')
-rw-r--r--contrib/opie/libopie/insecure.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/opie/libopie/insecure.c b/contrib/opie/libopie/insecure.c
index a7fda7b..e02183a 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");
OpenPOWER on IntegriCloud