From: Jim Rees Date: Thu, 23 Feb 2006 15:52:23 +0000 (+0000) Subject: aclprocs-protos-20060223 X-Git-Tag: mp-rxtcp-20060314~57 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9a0b4cac5650b844e5c97922c6631d1e8e9653cd;p=packages%2Fo%2Fopenafs.git aclprocs-protos-20060223 Prototypes for aclprocs. Also some other prototypes for viced. --- diff --git a/src/libacl/acl.h b/src/libacl/acl.h index 96567f374..71aa1fe3a 100644 --- a/src/libacl/acl.h +++ b/src/libacl/acl.h @@ -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 diff --git a/src/libacl/aclprocs.c b/src/libacl/aclprocs.c index cf97e73a1..24367419c 100644 --- a/src/libacl/aclprocs.c +++ b/src/libacl/aclprocs.c @@ -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; diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 6cc477ca4..1a4587f68 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -80,9 +80,10 @@ RCSID #include #include #include -#include #include +#include #include +#include #include #include #include diff --git a/src/viced/callback.c b/src/viced/callback.c index a4d3ded0b..8c3040dc9 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -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 */ diff --git a/src/viced/host.c b/src/viced/host.c index 82bdeaf65..13cf28e7e 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -49,6 +49,7 @@ RCSID #endif #include #include +#include #include #include #include diff --git a/src/viced/host.h b/src/viced/host.h index 1407d215e..d1a40ecb3 100644 --- a/src/viced/host.h +++ b/src/viced/host.h @@ -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); diff --git a/src/viced/viced.c b/src/viced/viced.c index 92f4570d0..fcabde052 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -81,6 +81,9 @@ RCSID #include #include #include +#include +#include +#include #ifndef AFS_NT40_ENV #include #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; }