From f2558d6b89d4d3e6effbd8fc3868303cc3e69e7b Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 27 Apr 2005 02:49:47 +0000 Subject: [PATCH] add-ptprocs-prototype-use-20050426 thanks to Chris Wing for pointing this out --- src/ptserver/Makefile.in | 2 +- src/ptserver/ptprocs.c | 2 ++ src/ptserver/ptprototypes.h | 46 +++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/ptserver/ptprototypes.h diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index 303545234..480244516 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -14,7 +14,7 @@ INCLS=${TOP_INCDIR}/ubik.h \ ${TOP_INCDIR}/rx/xdr.h \ ${TOP_INCDIR}/afs/keys.h \ ${TOP_INCDIR}/afs/cellconfig.h \ - ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h + ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h ptprototypes.h LINCLS=${TOP_INCDIR}/ubik.h \ ${TOP_INCDIR}/lock.h \ diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index 91e505b54..0028d6154 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -67,6 +67,7 @@ RCSID #include #else #include +#include #endif #ifdef HAVE_STRING_H #include @@ -77,6 +78,7 @@ RCSID #endif #include "ptserver.h" #include "pterror.h" +#include "ptprototypes.h" #include "afs/audit.h" #ifdef AFS_ATHENA_STDENV diff --git a/src/ptserver/ptprototypes.h b/src/ptserver/ptprototypes.h new file mode 100644 index 000000000..041a9f286 --- /dev/null +++ b/src/ptserver/ptprototypes.h @@ -0,0 +1,46 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _PTPROTOTYPES_H_ +#define _PTPROTOTYPES_H_ + +/* utils.c */ +#if defined(SUPERGROUPS) +extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, afs_int32 gid, afs_int32 depth) ; +#endif /* SUPERGROUPS */ + +extern afs_int32 IDHash(afs_int32 x); +extern afs_int32 NameHash(register unsigned char *aname); +extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, char *buff, afs_int32 len); +extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, char *buff, afs_int32 len); +extern int pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry); +extern int pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry); +extern int pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry); +extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry); +extern afs_int32 AllocBlock(register struct ubik_trans *at); +extern afs_int32 FreeBlock(register struct ubik_trans *at, afs_int32 pos); +extern afs_int32 FindByID(register struct ubik_trans *at, afs_int32 aid); +extern afs_int32 FindByName(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], struct prentry *tentryp); +extern afs_int32 AllocID(register struct ubik_trans *at, afs_int32 flag, afs_int32 *aid); +extern afs_int32 IDToName(register struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN]); +extern afs_int32 NameToID(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid); +extern int IDCmp(afs_int32 *a, afs_int32 *b); +extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 *loc); +extern afs_int32 AddToIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 loc); +extern afs_int32 RemoveFromNameHash(struct ubik_trans *tt, char *aname, afs_int32 *loc); +extern afs_int32 AddToNameHash(struct ubik_trans *tt, char *aname, afs_int32 loc); +extern afs_int32 AddToOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid); +extern afs_int32 RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid); +extern afs_int32 AddToOrphan(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 RemoveFromOrphan(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 IsOwnerOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid); +extern afs_int32 OwnerOf(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 IsAMemberOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid); + +#endif -- 2.39.5