auth-prototypes-20090316
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 16 Mar 2009 13:17:33 +0000 (13:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 16 Mar 2009 13:17:33 +0000 (13:17 +0000)
LICENSE IPL10
FIXES 124234

prototype the auth directory

src/auth/authcon.c
src/auth/cellconfig.c
src/auth/cellconfig.p.h
src/auth/ktc.c
src/auth/userok.c

index 3e03d97..c56f886 100644 (file)
@@ -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;
index e3d9a79..d9a8c5a 100644 (file)
@@ -66,6 +66,9 @@ RCSID
 #include <cm_dns.h>
 #endif /* AFS_AFSDB_ENV */
 #endif
+#include <rx/rx.h>
+#include <rx/rxkad.h>
+
 static struct afsconf_servPair serviceTable[] = {
     {"afs", 7000,},
     {"afscb", 7001,},
index 0f9b09c..4e8ab8d 100644 (file)
@@ -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"
index b2d1831..f83af5b 100644 (file)
@@ -65,6 +65,7 @@ RCSID
 #include "auth.h"
 #include <afs/venus.h>
 #include <afs/afsutil.h>
+#include <afs/sys_prototypes.h>
 
 #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;
 
index d1dc286..f0ad516 100644 (file)
@@ -30,7 +30,8 @@ RCSID
 #include <errno.h>
 #include <string.h>
 #include <ctype.h>
-
+#include <unistd.h>
+    
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <stdio.h>
@@ -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);