diff --git a/appl/telnet/libtelnet/kerberos5.c b/appl/telnet/libtelnet/kerberos5.c index 4c9c1f661..570b63a72 100644 --- a/appl/telnet/libtelnet/kerberos5.c +++ b/appl/telnet/libtelnet/kerberos5.c @@ -86,11 +86,15 @@ int dfsfwd = 0; int forward_flags = 0; /* Flags get set in telnet/main.c on -f and -F */ +int forward(int); +int forwardable(int); + /* These values need to be the same as those defined in telnet/main.c. */ /* Either define them in both places, or put in some common header file. */ #define OPTS_FORWARD_CREDS 0x00000002 #define OPTS_FORWARDABLE_CREDS 0x00000001 + void kerberos5_forward (Authenticator *); static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0, @@ -811,4 +815,28 @@ kerberos5_dfspag(void) } #endif +int +kerberos5_set_forward(int on) +{ + if(on == 0) + forward_flags &= ~OPTS_FORWARD_CREDS; + if(on == 1) + forward_flags |= OPTS_FORWARD_CREDS; + if(on == -1) + forward_flags ^= OPTS_FORWARD_CREDS; + return 0; +} + +int +kerberos5_set_forwardable(int on) +{ + if(on == 0) + forward_flags &= ~OPTS_FORWARDABLE_CREDS; + if(on == 1) + forward_flags |= OPTS_FORWARDABLE_CREDS; + if(on == -1) + forward_flags ^= OPTS_FORWARDABLE_CREDS; + return 0; +} + #endif /* KRB5 */