aclprocs-protos-20060223
authorJim Rees <rees@umich.edu>
Thu, 23 Feb 2006 15:52:23 +0000 (15:52 +0000)
committerJim Rees <rees@umich.edu>
Thu, 23 Feb 2006 15:52:23 +0000 (15:52 +0000)
Prototypes for aclprocs.
Also some other prototypes for viced.

src/libacl/acl.h
src/libacl/aclprocs.c
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/host.c
src/viced/host.h
src/viced/viced.c

index 96567f3..71aa1fe 100644 (file)
@@ -62,4 +62,16 @@ for now */
 
 typedef struct acl_accessList AL_AccessList;
 
+extern int acl_NewACL(int nEntries, struct acl_accessList **acl);
+extern int acl_FreeACL(struct acl_accessList **acl);
+extern int acl_NewExternalACL(int nEntries, char **r);
+extern int acl_FreeExternalACL(char **r);
+extern int acl_Externalize(struct acl_accessList *acl, char **elist);
+extern int acl_Internalize(char *elist, struct acl_accessList **acl);
+extern int acl_Initialize(char *version);
+#ifdef _RXGEN_PTINT_
+extern int acl_CheckRights(struct acl_accessList *acl, prlist *groups, int *rights);
+extern int acl_IsAMember(afs_int32 aid, prlist *cps);
+#endif
+
 #endif
index cf97e73..2436741 100644 (file)
@@ -86,9 +86,7 @@ CmpInt(x, y)
 
 
 int
-acl_NewACL(nEntries, acl)
-     int nEntries;
-     struct acl_accessList **acl;
+acl_NewACL(int nEntries, struct acl_accessList **acl)
 {
     /* Creates an access list capable of holding at least nEntries entries.
      * Returns 0 on success; aborts if we run out of memory. */
@@ -119,8 +117,7 @@ acl_NewACL(nEntries, acl)
 
 
 int
-acl_FreeACL(acl)
-     struct acl_accessList **acl;
+acl_FreeACL(struct acl_accessList **acl)
 {
     /* Releases the access list defined by acl.  Returns 0 always. */
     struct freeListEntry *x;
@@ -132,9 +129,7 @@ acl_FreeACL(acl)
 }
 
 int
-acl_NewExternalACL(nEntries, r)
-     int nEntries;
-     char **r;
+acl_NewExternalACL(int nEntries, char **r)
 {
     /* Puts an external acl big enough to hold nEntries in r.  Returns 0 on success, aborts if insufficient memory. */
 
@@ -161,8 +156,7 @@ acl_NewExternalACL(nEntries, r)
 }
 
 int
-acl_FreeExternalACL(r)
-     char **r;
+acl_FreeExternalACL(char **r)
 {
     /* Releases the external access list defined by r.  Returns 0 always.  */
 
@@ -176,9 +170,7 @@ acl_FreeExternalACL(r)
 
 
 int
-acl_Externalize(acl, elist)
-     struct acl_accessList *acl;
-     char **elist;
+acl_Externalize(struct acl_accessList *acl, char **elist)
 {
     /* Converts the access list defined by acl into the external access list in elist.  Non-translatable id's are converted to their ASCII string representations.  Returns 0 on success, -1 if number of entries exceeds ACL_MAXENTRIES, or a failure code from the protection server if the problem occured there. */
 
@@ -236,9 +228,7 @@ acl_Externalize(acl, elist)
 
 
 int
-acl_Internalize(elist, acl)
-     char *elist;
-     struct acl_accessList **acl;
+acl_Internalize(char *elist, struct acl_accessList **acl)
 {
     /* Converts the external access list elist into the access list acl.  Returns 0 on success, -1 if ANY name is not translatable, or if the number of entries exceeds al_maxExtEntries. */
     register int i;
@@ -338,10 +328,7 @@ acl_Internalize(elist, acl)
 
 
 int
-acl_CheckRights(acl, groups, rights)
-     struct acl_accessList *acl;
-     prlist *groups;
-     int *rights;
+acl_CheckRights(struct acl_accessList *acl, prlist *groups, int *rights)
 {
     /* Returns the rights given by acl to groups */
 
@@ -412,8 +399,7 @@ acl_CheckRights(acl, groups, rights)
 }
 
 int
-acl_Initialize(version)
-     char *version;
+acl_Initialize(char *version)
 {
     /* I'm sure we need to do some initialization, I'm just not quite sure what yet! */
     if (strcmp(version, ACL_VERSION) != 0) {
@@ -428,9 +414,7 @@ acl_Initialize(version)
 }
 
 int
-acl_IsAMember(aid, cps)
-     afs_int32 aid;
-     prlist *cps;
+acl_IsAMember(afs_int32 aid, prlist *cps)
 {
     afs_int32 i;
 
index 6cc477c..1a4587f 100644 (file)
@@ -80,9 +80,10 @@ RCSID
 #include <afs/ihandle.h>
 #include <afs/vnode.h>
 #include <afs/volume.h>
-#include <afs/acl.h>
 #include <afs/ptclient.h>
+#include <afs/ptuser.h>
 #include <afs/prs_fs.h>
+#include <afs/acl.h>
 #include <rx/rx.h>
 #include <rx/rx_globals.h>
 #include <sys/stat.h>
index a4d3ded..8c3040d 100644 (file)
@@ -309,7 +309,6 @@ static int ClearHostCallbacks_r(struct host *hp, int locked);
 #define FreeFE(fe) iFreeFE((struct FileEntry *)fe, &cbstuff.nFEs)
 
 /* Other protos - move out sometime */
-extern void ShutDown();
 void PrintCB(register struct CallBack *cb, afs_uint32 now);
 
 #define VHASH 512              /* Power of 2 */
index 82bdeaf..13cf28e 100644 (file)
@@ -49,6 +49,7 @@ RCSID
 #endif
 #include <afs/acl.h>
 #include <afs/ptclient.h>
+#include <afs/ptuser.h>
 #include <afs/prs_fs.h>
 #include <afs/auth.h>
 #include <afs/afsutil.h>
index 1407d21..d1a40ec 100644 (file)
@@ -212,6 +212,7 @@ extern int MultiBreakCallBackAlternateAddress_r(struct host *host,
                                     struct AFSCBFids *afidp);
 extern int DumpCallBackState(void);
 extern int PrintCallBackStats(void);
+extern int ShutDown(void);
 extern void ShutDownAndCore(int dopanic);
 
 extern struct host *h_Alloc(register struct rx_connection *r_con);
index 92f4570..fcabde0 100644 (file)
@@ -81,6 +81,9 @@ RCSID
 #include <afs/vlserver.h>
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
+#include <afs/ptuser.h>
+#include <afs/audit.h>
+#include <afs/partition.h>
 #ifndef AFS_NT40_ENV
 #include <afs/netutils.h>
 #endif
@@ -113,10 +116,10 @@ extern int BreakVolumeCallBacksLater();
 extern int LogLevel, etext;
 extern afs_int32 BlocksSpare, PctSpare;
 
-void ShutDown(void);
+int ShutDown(void);
 static void ClearXStatValues(), NewParms(), PrintCounters();
 static void ResetCheckDescriptors(void), ResetCheckSignal(void);
-static void CheckSignal(void);
+static int CheckSignal(void);
 extern int GetKeysFromToken();
 extern int RXAFS_ExecuteRequest();
 extern int RXSTATS_ExecuteRequest();
@@ -217,7 +220,7 @@ static void FlagMsg();
  */
 
 /* DEBUG HACK */
-static void
+static int
 CheckDescriptors()
 {
 #ifndef AFS_NT40_ENV
@@ -233,6 +236,7 @@ CheckDescriptors()
     }
     fflush(stdout);
     ResetCheckDescriptors();
+    return 0;
 #endif
 }                              /*CheckDescriptors */
 
@@ -628,7 +632,7 @@ PrintCounters()
 
 
 
-static void
+static int
 CheckSignal()
 {
     if (FS_registered > 0) {
@@ -643,7 +647,7 @@ CheckSignal()
     DumpCallBackState();
     PrintCounters();
     ResetCheckSignal();
-
+    return 0;
 }                              /*CheckSignal */
 
 void
@@ -698,13 +702,13 @@ ShutDownAndCore(int dopanic)
     }
 
     exit(0);
+}
 
-}                              /*ShutDown */
-
-void
+int
 ShutDown(void)
 {                              /* backward compatibility */
     ShutDownAndCore(DONTPANIC);
+    return 0;
 }