From a05fa83336df6cd11d60cc64882c68cc01243aad Mon Sep 17 00:00:00 2001 From: Marcus Watts Date: Fri, 9 Feb 2007 03:12:51 +0000 Subject: [PATCH] ktc-cleanup-20070208 FIXES 53212 clean up ktc code, prototyping et al ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== FIXES 53212 restore ktc_GetToken prototype --- src/auth/auth.p.h | 20 ++++++++------------ src/auth/ktc.c | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/auth/auth.p.h b/src/auth/auth.p.h index 0a9d932579..3d990ad764 100644 --- a/src/auth/auth.p.h +++ b/src/auth/auth.p.h @@ -24,19 +24,15 @@ struct ktc_token { char ticket[MAXKTCTICKETLEN]; }; +int ktc_SetToken(struct ktc_principal *, struct ktc_token *, + struct ktc_principal *, afs_int32); +int ktc_GetToken(struct ktc_principal *, struct ktc_token *, + int, struct ktc_principal *); +int ktc_ListTokens(int, int *, struct ktc_principal *); +int ktc_ForgetToken(struct ktc_principal *); +int ktc_ForgetAllTokens(void); + #ifdef AFS_NT40_ENV -extern int ktc_SetToken(struct ktc_principal *server, struct ktc_token *token, - struct ktc_principal *client, afs_int32 flags); - -extern int ktc_GetToken(struct ktc_principal *server, struct ktc_token *token, - int tokenLen, struct ktc_principal *client); - -extern int ktc_ListTokens(int cellNum, int *cellNumP, - struct ktc_principal *serverName); - -extern int ktc_ForgetToken(struct ktc_principal *server); - -extern int ktc_ForgetAllTokens(void); /* Flags for the flag word sent along with a token */ #define PIOCTL_LOGON 0x1 /* invoked from integrated logon */ diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 0bc7902a57..b1af7eaea4 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -417,12 +417,11 @@ OldSetToken(aserver, atoken, aclient, flags) return 0; } - -ktc_SetToken(aserver, atoken, aclient, flags) - struct ktc_principal *aserver; - struct ktc_principal *aclient; - struct ktc_token *atoken; - afs_int32 flags; +int +ktc_SetToken(struct ktc_principal *aserver, + struct ktc_token *atoken, + struct ktc_principal *aclient, + afs_int32 flags) { int ncode, ocode; @@ -692,9 +691,10 @@ ktc_ForgetToken(aserver) * next rock in (*aindex). (*aserver) is set to the relevant ticket on * success. */ -ktc_ListTokens(aprevIndex, aindex, aserver) - int aprevIndex, *aindex; - struct ktc_principal *aserver; +int +ktc_ListTokens(int aprevIndex, + int *aindex, + struct ktc_principal *aserver) { struct ViceIoctl iob; char tbuffer[MAXPIOCTLTOKENLEN]; @@ -844,7 +844,7 @@ ktc_ListTokens(aprevIndex, aindex, aserver) /* discard all tokens from this user's cache */ static int -NewForgetAll() +NewForgetAll(void) { #ifndef NO_AFS_CLIENT TRY_KERNEL(KTC_FORGETALLTOKENS_OP, 0, 0, 0, 0); @@ -853,7 +853,7 @@ NewForgetAll() } static int -OldForgetAll() +OldForgetAll(void) { struct ViceIoctl iob; register afs_int32 code; @@ -875,7 +875,7 @@ OldForgetAll() } int -ktc_ForgetAllTokens() +ktc_ForgetAllTokens(void) { int ncode, ocode;