From b9850fadbea5e18d63a9ce80563e70242098725f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 2 Jul 2001 16:42:37 +0000 Subject: [PATCH] * krb5forw.h: File with prototype for rd_and_store_for_creds() * kerberos5.c: Include krb5forw.h for rd_and_store_for_creds() prototype which is removed from this file. * forward.c: Include krb5forw.h for prototype. * setenv.c: Include misc-proto.h for setenv/unsetenv prototypes. * parsetos.c: Include misc-proto.h for parsetos prototype. * misc-proto.h: Add prototype for parsetos(), setenv(), unsetenv() as needed. * kerberos5.c: Declare kerberos5_forward() static and flush out prototype. * gettytab.h: Flush out prototypes for getent() and getstr(). * getent.c: Include gettytab.h for prototypes. * genget.c: Include misc.h for prototypes. * enc_des.c: Add prototype for fb64_printsub. * enc-proto.h: Add prototypes for encrypt_debug(), finddecryption(), EncryptAuthEnc(), EncryptAutoDec(), EncryptDebug(), EncryptVerbose(). * encrypt.c: Declare encrypt_list_types() and encrypt_keyid() static. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13543 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/libtelnet/ChangeLog | 33 ++++++++++++++++++++++++++ src/appl/telnet/libtelnet/enc-proto.h | 6 +++++ src/appl/telnet/libtelnet/enc_des.c | 2 ++ src/appl/telnet/libtelnet/encrypt.c | 6 ++--- src/appl/telnet/libtelnet/forward.c | 1 + src/appl/telnet/libtelnet/genget.c | 3 ++- src/appl/telnet/libtelnet/getent.c | 2 ++ src/appl/telnet/libtelnet/gettytab.h | 6 +++-- src/appl/telnet/libtelnet/kerberos5.c | 8 +++---- src/appl/telnet/libtelnet/krb5forw.h | 4 ++++ src/appl/telnet/libtelnet/misc-proto.h | 13 ++++++++++ src/appl/telnet/libtelnet/parsetos.c | 3 ++- src/appl/telnet/libtelnet/setenv.c | 7 +++--- 13 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 src/appl/telnet/libtelnet/krb5forw.h diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index ed1b7a40e..44f6e0298 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,36 @@ +2001-07-02 Ezra Peisach + + * krb5forw.h: File with prototype for rd_and_store_for_creds(). + + * kerberos5.c: Include krb5forw.h for rd_and_store_for_creds() + prototype which is removed from this file. + + * forward.c: Include krb5forw.h for prototype. + + * setenv.c: Include misc-proto.h for setenv/unsetenv prototypes. + + * parsetos.c: Include misc-proto.h for parsetos prototype. + + * misc-proto.h: Add prototype for parsetos(), setenv(), unsetenv() + as needed. + + * kerberos5.c: Declare kerberos5_forward() static and flush out + prototype. + + * gettytab.h: Flush out prototypes for getent() and getstr(). + + * getent.c: Include gettytab.h for prototypes. + + * genget.c: Include misc.h for prototypes. + + * enc_des.c: Add prototype for fb64_printsub. + + * enc-proto.h: Add prototypes for encrypt_debug(), + finddecryption(), EncryptAuthEnc(), EncryptAutoDec(), + EncryptDebug(), EncryptVerbose(). + + * encrypt.c: Declare encrypt_list_types() and encrypt_keyid() static. + 2001-06-22 Ezra Peisach * enc_des.c: Change local variable index to idx to not shadown diff --git a/src/appl/telnet/libtelnet/enc-proto.h b/src/appl/telnet/libtelnet/enc-proto.h index 064bfe0f1..c09669092 100644 --- a/src/appl/telnet/libtelnet/enc-proto.h +++ b/src/appl/telnet/libtelnet/enc-proto.h @@ -66,9 +66,11 @@ #ifdef ENCRYPTION void encrypt_init P((char *, int)); Encryptions *findencryption P((int)); +Encryptions *finddecryption P((int)); void encrypt_send_supprt P((void)); void encrypt_auto P((int)); void decrypt_auto P((int)); +void encrypt_debug P((int)); void encrypt_is P((unsigned char *, int)); void encrypt_reply P((unsigned char *, int)); void encrypt_start_input P((int)); @@ -81,8 +83,11 @@ void encrypt_send_request_end P((void)); void encrypt_send_end P((void)); void encrypt_wait P((void)); int encrypt_is_encrypting P((void)); +int EncryptAutoEnc P((int)); +int EncryptAutoDec P((int)); int EncryptEnable P((char *, char *)); int EncryptDisable P((char *, char *)); +int EncryptDebug P((int)); int EncryptType P((char *, char *)); int EncryptStart P((char *)); int EncryptStartInput P((void)); @@ -91,6 +96,7 @@ int EncryptStop P((char *)); int EncryptStopInput P((void)); int EncryptStopOutput P((void)); int EncryptStatus P((void)); +int EncryptVerbose P((int)); void encrypt_send_support P((void)); void encrypt_send_keyid P((int, unsigned char *, int, int)); int net_write P((unsigned char *, int)); diff --git a/src/appl/telnet/libtelnet/enc_des.c b/src/appl/telnet/libtelnet/enc_des.c index 393ac3cdb..34825789c 100644 --- a/src/appl/telnet/libtelnet/enc_des.c +++ b/src/appl/telnet/libtelnet/enc_des.c @@ -149,6 +149,8 @@ int fb64_reply P((unsigned char *, int, struct fb *)); static void fb64_session P((Session_Key *, int, struct fb *)); void fb64_stream_key P((Block, struct stinfo *)); int fb64_keyid P((int, unsigned char *, int *, struct fb *)); +void fb64_printsub P((unsigned char *, int, unsigned char *, int, + unsigned char *)); static void ecb_encrypt(stp, in, out) struct stinfo *stp; diff --git a/src/appl/telnet/libtelnet/encrypt.c b/src/appl/telnet/libtelnet/encrypt.c index 5f8ece66d..0e252ebcc 100644 --- a/src/appl/telnet/libtelnet/encrypt.c +++ b/src/appl/telnet/libtelnet/encrypt.c @@ -214,7 +214,7 @@ encrypt_init(name, server) str_send[str_suplen++] = SE; } - void +static void encrypt_list_types() { Encryptions *ep = encryptions; @@ -730,7 +730,7 @@ encrypt_request_start(data, cnt) static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT }; -void encrypt_keyid(); +static void encrypt_keyid P((struct key_info *kp, unsigned char *, int)); void encrypt_enc_keyid(keyid, len) unsigned char *keyid; @@ -746,7 +746,7 @@ void encrypt_dec_keyid(keyid, len) encrypt_keyid(&ki[0], keyid, len); } -void encrypt_keyid(kp, keyid, len) +static void encrypt_keyid(kp, keyid, len) struct key_info *kp; unsigned char *keyid; int len; diff --git a/src/appl/telnet/libtelnet/forward.c b/src/appl/telnet/libtelnet/forward.c index e7059e002..62a59d592 100644 --- a/src/appl/telnet/libtelnet/forward.c +++ b/src/appl/telnet/libtelnet/forward.c @@ -28,6 +28,7 @@ #include #include "k5-int.h" +#include "krb5forw.h" #ifdef NEED_SETENV extern int setenv(char *, char *, int); diff --git a/src/appl/telnet/libtelnet/genget.c b/src/appl/telnet/libtelnet/genget.c index 5f6876d38..bc307c81f 100644 --- a/src/appl/telnet/libtelnet/genget.c +++ b/src/appl/telnet/libtelnet/genget.c @@ -34,6 +34,7 @@ /* based on @(#)genget.c 8.1 (Berkeley) 6/4/93 */ #include +#include "misc.h" #define LOWER(x) (isupper((int) x) ? tolower((int) x) : (x)) /* @@ -95,7 +96,7 @@ genget(name, table, stlen) */ int Ambiguous(s) - char *s; + void *s; { return((char **)s == &ambiguous); } diff --git a/src/appl/telnet/libtelnet/getent.c b/src/appl/telnet/libtelnet/getent.c index 8d77ba3bf..b80439e6e 100644 --- a/src/appl/telnet/libtelnet/getent.c +++ b/src/appl/telnet/libtelnet/getent.c @@ -33,6 +33,8 @@ /* based on @(#)getent.c 8.1 (Berkeley) 6/4/93 */ +#include "gettytab.h" + #ifdef HAVE_CGETENT static char *area; #endif diff --git a/src/appl/telnet/libtelnet/gettytab.h b/src/appl/telnet/libtelnet/gettytab.h index a96dcf31e..02e5050a8 100644 --- a/src/appl/telnet/libtelnet/gettytab.h +++ b/src/appl/telnet/libtelnet/gettytab.h @@ -107,10 +107,12 @@ struct gettyflags { #define DX gettyflags[20].value #define RM gettyflags[21].value -int getent(); +int getent (char *, char *); long getnum(); int getflag(); -char *getstr(); +#ifndef SOLARIS +char *getstr(char *, char **); +#endif extern struct gettyflags gettyflags[]; extern struct gettynums gettynums[]; diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index 44390d885..d57a735b0 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -91,11 +91,9 @@ extern int net; #ifdef FORWARD int forward_flags = 0; /* Flags get set in telnet/main.c on -f and -F */ -void kerberos5_forward(); +static void kerberos5_forward(Authenticator *); -extern krb5_error_code -rd_and_store_for_creds(krb5_context, krb5_auth_context, krb5_data *, - krb5_ticket *); +#include "krb5forw.h" #endif /* FORWARD */ @@ -802,7 +800,7 @@ kerberos5_printsub(data, cnt, buf, buflen) #ifdef FORWARD -void +static void kerberos5_forward(ap) Authenticator *ap; { diff --git a/src/appl/telnet/libtelnet/krb5forw.h b/src/appl/telnet/libtelnet/krb5forw.h new file mode 100644 index 000000000..1fb757ddf --- /dev/null +++ b/src/appl/telnet/libtelnet/krb5forw.h @@ -0,0 +1,4 @@ +extern krb5_error_code +rd_and_store_for_creds(krb5_context, krb5_auth_context, krb5_data *, + krb5_ticket *); + diff --git a/src/appl/telnet/libtelnet/misc-proto.h b/src/appl/telnet/libtelnet/misc-proto.h index 9046fa365..6e495c81d 100644 --- a/src/appl/telnet/libtelnet/misc-proto.h +++ b/src/appl/telnet/libtelnet/misc-proto.h @@ -80,4 +80,17 @@ void net_encrypt P((void)); int telnet_spin P((void)); char *telnet_getenv P((char *)); char *telnet_gets P((char *, char *, int, int)); + + +#ifdef NEED_PARSETOS +int parsetos(char *, char *); +#endif + +#ifdef NEED_SETENV +int setenv(const char *, const char *, int); +#ifndef HAVE_UNSETENV +void unsetenv(const char *); +#endif +#endif + #endif diff --git a/src/appl/telnet/libtelnet/parsetos.c b/src/appl/telnet/libtelnet/parsetos.c index c88205e48..303d7c3e5 100644 --- a/src/appl/telnet/libtelnet/parsetos.c +++ b/src/appl/telnet/libtelnet/parsetos.c @@ -9,7 +9,8 @@ #include #include #include - +#define NEED_PARSETOS +#include "misc-proto.h" #define MIN_TOS 0 #define MAX_TOS 255 diff --git a/src/appl/telnet/libtelnet/setenv.c b/src/appl/telnet/libtelnet/setenv.c index b8e153835..f19c8a144 100644 --- a/src/appl/telnet/libtelnet/setenv.c +++ b/src/appl/telnet/libtelnet/setenv.c @@ -42,10 +42,9 @@ #include #include -#ifndef __P -#define __P(x) () -#endif -static char *__findenv __P((const char *, int *)); +#include "misc-proto.h" + +static char *__findenv P((const char *, int *)); /* * setenv -- -- 2.26.2