diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-05-21 07:31:48 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-05-21 07:31:48 +0000 |
commit | d6cab81175ec6afe5708ade7557d35330c0cb973 (patch) | |
tree | 1f7f57e24398c66900f5006d299529bcfb54f9e4 /src/vty/vty.c | |
parent | 12247c671371cd7f5466beb96db8ade8b12406d9 (diff) |
vty: disable password encryption, remove dependency to lcrypt
Diffstat (limited to 'src/vty/vty.c')
-rw-r--r-- | src/vty/vty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c index 370d1f7a9..ca6fff73c 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -75,9 +75,11 @@ static void vty_auth(struct vty *vty, char *buf) switch (vty->node) { case AUTH_NODE: +#ifdef VTY_CRYPT_PW if (host.encrypt) passwd = host.password_encrypt; else +#endif passwd = host.password; if (host.advanced) next_node = host.enable ? VIEW_NODE : ENABLE_NODE; @@ -85,18 +87,22 @@ static void vty_auth(struct vty *vty, char *buf) next_node = VIEW_NODE; break; case AUTH_ENABLE_NODE: +#ifdef VTY_CRYPT_PW if (host.encrypt) passwd = host.enable_encrypt; else +#endif passwd = host.enable; next_node = ENABLE_NODE; break; } if (passwd) { +#ifdef VTY_CRYPT_PW if (host.encrypt) fail = strcmp(crypt(buf, passwd), passwd); else +#endif fail = strcmp(buf, passwd); } else fail = 1; |