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
This commit is contained in:
parent
df55753880
commit
eac68b24dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82495
@ -25,6 +25,9 @@ License Agreement applies to this software.
|
|||||||
found. Use uname().
|
found. Use uname().
|
||||||
Created at NRL for OPIE 2.2 from opiesubr.c. Fixed pointer
|
Created at NRL for OPIE 2.2 from opiesubr.c. Fixed pointer
|
||||||
assignment that should have been a comparison.
|
assignment that should have been a comparison.
|
||||||
|
|
||||||
|
$FreeBSD$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#include "opie_cfg.h"
|
#include "opie_cfg.h"
|
||||||
|
|
||||||
@ -64,6 +67,8 @@ int opieinsecure FUNCTION_NOARGS
|
|||||||
if (result != -1)
|
if (result != -1)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
if (getenv("SSH_CLIENT") != NULL)
|
||||||
|
return (result = 0);
|
||||||
display_name = (char *) getenv("DISPLAY");
|
display_name = (char *) getenv("DISPLAY");
|
||||||
term_name = (char *) getenv("TERM");
|
term_name = (char *) getenv("TERM");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user