diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1996-10-17 21:49:34 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1996-10-17 21:49:34 +0000 |
commit | 4737abd5882487e653a62ecd6c3ffbb8e9cd4bb6 (patch) | |
tree | d0505926dfcc82fda92bb3e34537678d4425e50b /lib/libskey | |
parent | 81acf468e2719cde3ac1c0e0004af8a0876a16d6 (diff) | |
download | src-test2-4737abd5882487e653a62ecd6c3ffbb8e9cd4bb6.tar.gz src-test2-4737abd5882487e653a62ecd6c3ffbb8e9cd4bb6.zip |
Notes
Diffstat (limited to 'lib/libskey')
-rw-r--r-- | lib/libskey/skeyaccess.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libskey/skeyaccess.c b/lib/libskey/skeyaccess.c index b257646b66d6..0d52caf3517b 100644 --- a/lib/libskey/skeyaccess.c +++ b/lib/libskey/skeyaccess.c @@ -72,6 +72,9 @@ static struct in_addr *lookup_internet_addr(); #ifndef CONSOLE #define CONSOLE "console" #endif +#ifndef VTY_PREFIX +#define VTY_PREFIX "ttyv" +#endif struct login_info { char *host_name; /* host name */ @@ -169,7 +172,11 @@ struct login_info *login_info; int permission=DENY; #ifdef PERMIT_CONSOLE - if (login_info->port != 0 && strcasecmp(login_info->port, CONSOLE) == 0) + if (login_info->port != 0 && + (strcmp(login_info->port, CONSOLE) == 0 || + strncmp(login_info->port, VTY_PREFIX, sizeof(VTY_PREFIX) - 1) == 0 + ) + ) return (1); #endif |