From: Simon Wilkinson Date: Mon, 16 Mar 2009 13:17:43 +0000 (+0000) Subject: DEVEL15-auth-prototypes-20090316 X-Git-Tag: openafs-devel-1_5_58~97 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d0fad37c4bc141a4a8c1d9c15681c849f0bf179c;p=packages%2Fo%2Fopenafs.git DEVEL15-auth-prototypes-20090316 LICENSE IPL10 FIXES 124234 prototype the auth directory (cherry picked from commit 01e03837b81843c4f28eb6cc54811b1bd231514c) --- diff --git a/src/auth/authcon.c b/src/auth/authcon.c index 3e03d974c..c56f886e1 100644 --- a/src/auth/authcon.c +++ b/src/auth/authcon.c @@ -67,10 +67,11 @@ QuickAuth(struct rx_securityClass **astr, afs_int32 *aindex) #if !defined(UKERNEL) /* Return an appropriate security class and index */ afs_int32 -afsconf_ServerAuth(register struct afsconf_dir *adir, +afsconf_ServerAuth(void *arock, struct rx_securityClass **astr, afs_int32 *aindex) { + struct afsconf_dir *adir = (struct afsconf_dir *) arock; register struct rx_securityClass *tclass; LOCK_GLOBAL_MUTEX; @@ -143,9 +144,10 @@ GenericAuth(struct afsconf_dir *adir, * appropriate security class and index */ afs_int32 -afsconf_ClientAuth(struct afsconf_dir * adir, struct rx_securityClass ** astr, +afsconf_ClientAuth(void *arock, struct rx_securityClass ** astr, afs_int32 * aindex) { + struct afsconf_dir * adir = (struct afsconf_dir *) arock; afs_int32 rc; LOCK_GLOBAL_MUTEX; @@ -159,10 +161,11 @@ afsconf_ClientAuth(struct afsconf_dir * adir, struct rx_securityClass ** astr, * tells rxkad to encrypt the data, too. */ afs_int32 -afsconf_ClientAuthSecure(struct afsconf_dir *adir, +afsconf_ClientAuthSecure(void *arock, struct rx_securityClass **astr, afs_int32 *aindex) { + struct afsconf_dir *adir = (struct afsconf_dir *) arock; afs_int32 rc; LOCK_GLOBAL_MUTEX; diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index a09f1bc60..0bf5c3841 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -66,6 +66,9 @@ RCSID #include #endif /* AFS_AFSDB_ENV */ #endif +#include +#include + static struct afsconf_servPair serviceTable[] = { {"afs", 7000,}, {"afscb", 7001,}, diff --git a/src/auth/cellconfig.p.h b/src/auth/cellconfig.p.h index 0f9b09cba..4e8ab8db6 100644 --- a/src/auth/cellconfig.p.h +++ b/src/auth/cellconfig.p.h @@ -134,12 +134,37 @@ extern int afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno, char akey[8], afs_int32 overwrite); extern int afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno); +/* authcon.c */ struct rx_securityClass; -extern afs_int32 afsconf_ClientAuth(struct afsconf_dir *adir, +extern afs_int32 afsconf_ServerAuth(void *arock, + struct rx_securityClass **, + afs_int32 *); +extern afs_int32 afsconf_ClientAuth(void *arock, struct rx_securityClass **astr, afs_int32 * aindex); - - +extern afs_int32 afsconf_ClientAuthSecure(void *arock, + struct rx_securityClass **astr, + afs_int32 * aindex); + +/* writeconfig.c */ +int afsconf_SetExtendedCellInfo(struct afsconf_dir *adir, const char *apath, + struct afsconf_cell *acellInfo, char clones[]); +int afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath, + struct afsconf_cell *acellInfo); + + +/* userok.c */ + +struct rx_call; +extern int afsconf_CheckAuth(void *arock, struct rx_call *acall); +extern int afsconf_GetNoAuthFlag(struct afsconf_dir *adir); +extern void afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag); +extern int afsconf_DeleteUser(struct afsconf_dir *adir, register char *auser); +extern int afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an, + char *abuffer, afs_int32 abufferLen); +extern int afsconf_AddUser(struct afsconf_dir *adir, char *aname); +extern int afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, + char *namep); /* some well-known ports and their names; new additions to table in cellconfig.c, too */ #define AFSCONF_FILESERVICE "afs" diff --git a/src/auth/ktc.c b/src/auth/ktc.c index b2d1831ef..f83af5b9c 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -65,6 +65,7 @@ RCSID #include "auth.h" #include #include +#include #endif /* defined(UKERNEL) */ @@ -494,7 +495,7 @@ ktc_GetToken(struct ktc_principal *aserver, struct ktc_token *atoken, { struct ViceIoctl iob; char tbuffer[MAXPIOCTLTOKENLEN]; - register afs_int32 code; + register afs_int32 code = 0; int index; char *stp, *cellp; /* secret token ptr */ struct ClearToken ct; @@ -698,7 +699,7 @@ ktc_ListTokens(int aprevIndex, { struct ViceIoctl iob; char tbuffer[MAXPIOCTLTOKENLEN]; - register afs_int32 code; + register afs_int32 code = 0 ; register char *tp; afs_int32 temp, index; diff --git a/src/auth/userok.c b/src/auth/userok.c index d1dc28654..f0ad51619 100644 --- a/src/auth/userok.c +++ b/src/auth/userok.c @@ -30,7 +30,8 @@ RCSID #include #include #include - +#include + #include #include #include @@ -48,9 +49,9 @@ RCSID #if !defined(UKERNEL) int -afsconf_CheckAuth(register struct afsconf_dir *adir, - register struct rx_call *acall) +afsconf_CheckAuth(void *arock, struct rx_call *acall) { + struct afsconf_dir *adir = (struct afsconf_dir *) arock; int rc; LOCK_GLOBAL_MUTEX; rc = ((afsconf_SuperUser(adir, acall, NULL) == 0) ? 10029 : 0);