diff options
author | 2001-07-02 14:16:01 +0000 | |
---|---|---|
committer | 2001-07-02 14:16:01 +0000 | |
commit | a362a9975b3f549b432ed1716349f5b183db4a6e (patch) | |
tree | e73589b86621a7878682c4a5fe0cce7a5487cb74 | |
parent | Fix building on non-kerberos systems (diff) | |
download | wireguard-openbsd-a362a9975b3f549b432ed1716349f5b183db4a6e.tar.xz wireguard-openbsd-a362a9975b3f549b432ed1716349f5b183db4a6e.zip |
Allows building w/o kerb support
-rw-r--r-- | libexec/telnetd/state.c | 3 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.c | 9 | ||||
-rw-r--r-- | libexec/telnetd/utility.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c index 3d8428852b9..4b1441a3bbf 100644 --- a/libexec/telnetd/state.c +++ b/libexec/telnetd/state.c @@ -118,8 +118,9 @@ telrcv(void) * if CRMOD is set, which it normally is). */ if ((c == '\r') && his_state_is_wont(TELOPT_BINARY)) { - int nc = *netip; #ifdef ENCRYPTION + int nc = *netip; + if (decrypt_input) nc = (*decrypt_input)(nc & 0xff); #endif diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index daae16b4415..a70da5f14c2 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -53,6 +53,10 @@ struct sysv sysv; struct socksec ss; #endif /* _SC_CRAY_SECURE_SYS */ +#ifndef ENCRYPTION +#define encrypt_delay() 0 +#endif + #ifdef AUTHENTICATION int auth_level = 0; #endif @@ -363,8 +367,11 @@ main(int argc, char **argv) } else { #ifdef KRB5 port = krb5_getportbyname (NULL, "telnet", "tcp", 23); -#else +#elif defined(KRB4) port = k_getportbyname("telnet", "tcp", htons(23)); +#else + sp = getservbyname ("telnet", "tcp"); + port = sp ? sp->s_port : htons(23); #endif } mini_inetd (port); diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index b14a10246fc..b0332126b13 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -546,7 +546,9 @@ printsub(int direction, unsigned char *pointer, int length) /* length of suboption data */ { int i = 0; +#ifdef AUTHENTICATION unsigned char buf[512]; +#endif if (!(diagnostic & TD_OPTIONS)) return; |