add kerberos5_set_forward{,able} functions suitable for the command parser
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11287 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user