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
This commit is contained in:
Marcus Watts 2007-02-09 03:12:51 +00:00 committed by Derrick Brashear
parent 171676011b
commit a05fa83336
2 changed files with 20 additions and 24 deletions

View File

@ -24,19 +24,15 @@ struct ktc_token {
char ticket[MAXKTCTICKETLEN]; 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 #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 */ /* Flags for the flag word sent along with a token */
#define PIOCTL_LOGON 0x1 /* invoked from integrated logon */ #define PIOCTL_LOGON 0x1 /* invoked from integrated logon */

View File

@ -417,12 +417,11 @@ OldSetToken(aserver, atoken, aclient, flags)
return 0; return 0;
} }
int
ktc_SetToken(aserver, atoken, aclient, flags) ktc_SetToken(struct ktc_principal *aserver,
struct ktc_principal *aserver; struct ktc_token *atoken,
struct ktc_principal *aclient; struct ktc_principal *aclient,
struct ktc_token *atoken; afs_int32 flags)
afs_int32 flags;
{ {
int ncode, ocode; int ncode, ocode;
@ -692,9 +691,10 @@ ktc_ForgetToken(aserver)
* next rock in (*aindex). (*aserver) is set to the relevant ticket on * next rock in (*aindex). (*aserver) is set to the relevant ticket on
* success. */ * success. */
ktc_ListTokens(aprevIndex, aindex, aserver) int
int aprevIndex, *aindex; ktc_ListTokens(int aprevIndex,
struct ktc_principal *aserver; int *aindex,
struct ktc_principal *aserver)
{ {
struct ViceIoctl iob; struct ViceIoctl iob;
char tbuffer[MAXPIOCTLTOKENLEN]; char tbuffer[MAXPIOCTLTOKENLEN];
@ -844,7 +844,7 @@ ktc_ListTokens(aprevIndex, aindex, aserver)
/* discard all tokens from this user's cache */ /* discard all tokens from this user's cache */
static int static int
NewForgetAll() NewForgetAll(void)
{ {
#ifndef NO_AFS_CLIENT #ifndef NO_AFS_CLIENT
TRY_KERNEL(KTC_FORGETALLTOKENS_OP, 0, 0, 0, 0); TRY_KERNEL(KTC_FORGETALLTOKENS_OP, 0, 0, 0, 0);
@ -853,7 +853,7 @@ NewForgetAll()
} }
static int static int
OldForgetAll() OldForgetAll(void)
{ {
struct ViceIoctl iob; struct ViceIoctl iob;
register afs_int32 code; register afs_int32 code;
@ -875,7 +875,7 @@ OldForgetAll()
} }
int int
ktc_ForgetAllTokens() ktc_ForgetAllTokens(void)
{ {
int ncode, ocode; int ncode, ocode;