extern int restricted;
extern struct ubik_dbase *dbase;
-extern afs_int32 Initdb();
extern int pr_noAuth;
extern afs_int32 initd;
extern char *pr_realmName;
-afs_int32 iNewEntry(), newEntry(), whereIsIt(), dumpEntry(), addToGroup(),
-nameToID(), Delete(), removeFromGroup();
-afs_int32 getCPS(), getCPS2(), getHostCPS(), listMax(), setMax(), listEntry();
-afs_int32 listEntries(), changeEntry(), setFieldsEntry(), put_prentries();
-afs_int32 listElements(), listOwned(), isAMemberOf(), idToName();
+extern int prp_group_default;
+extern int prp_user_default;
+static afs_int32 iNewEntry(struct rx_call *call, char aname[], afs_int32 aid,
+ afs_int32 oid, afs_int32 *cid);
+static afs_int32 newEntry(struct rx_call *call, char aname[], afs_int32 flag,
+ afs_int32 oid, afs_int32 *aid, afs_int32 *cid);
+static afs_int32 whereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos,
+ afs_int32 *cid);
+static afs_int32 dumpEntry(struct rx_call *call, afs_int32 apos,
+ struct prdebugentry *aentry, afs_int32 *cid);
+static afs_int32 addToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
+ afs_int32 *cid);
+static afs_int32 nameToID(struct rx_call *call, namelist *aname, idlist *aid);
+static afs_int32 idToName(struct rx_call *call, idlist *aid, namelist *aname);
+static afs_int32 Delete(struct rx_call *call, afs_int32 aid, afs_int32 *cid);
+static afs_int32 UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+ struct PrUpdateEntry *uentry, afs_int32 *cid);
+static afs_int32 removeFromGroup(struct rx_call *call, afs_int32 aid,
+ afs_int32 gid, afs_int32 *cid);
+static afs_int32 getCPS(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *over, afs_int32 *cid);
+static afs_int32 getCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost,
+ prlist *alist, afs_int32 *over, afs_int32 *cid);
+static afs_int32 getHostCPS(struct rx_call *call, afs_int32 ahost,
+ prlist *alist, afs_int32 *over);
+static afs_int32 listMax(struct rx_call *call, afs_int32 *uid, afs_int32 *gid);
+static afs_int32 setMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag,
+ afs_int32 *cid);
+static afs_int32 listEntry(struct rx_call *call, afs_int32 aid,
+ struct prcheckentry *aentry, afs_int32 *cid);
+static afs_int32 listEntries(struct rx_call *call, afs_int32 flag,
+ afs_int32 startindex, prentries *bulkentries,
+ afs_int32 *nextstartindex, afs_int32 *cid);
+static afs_int32 put_prentries(struct prentry *tentry, prentries *bulkentries);
+static afs_int32 changeEntry(struct rx_call *call, afs_int32 aid, char *name,
+ afs_int32 oid, afs_int32 newid, afs_int32 *cid);
+static afs_int32 setFieldsEntry(struct rx_call *call, afs_int32 id,
+ afs_int32 mask, afs_int32 flags,
+ afs_int32 ngroups, afs_int32 nusers,
+ afs_int32 spare1, afs_int32 spare2,
+ afs_int32 *cid);
+static afs_int32 listElements(struct rx_call *call, afs_int32 aid,
+ prlist *alist, afs_int32 *over, afs_int32 *cid);
#if defined(SUPERGROUPS)
-afs_int32 listSuperGroups();
+static afs_int32 listSuperGroups(struct rx_call *call, afs_int32 aid,
+ prlist *alist, afs_int32 *over,
+ afs_int32 *cid);
#endif
-
-extern int IDCmp();
-
-extern int prp_group_default;
-extern int prp_user_default;
+static afs_int32 listOwned(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *lastP, afs_int32 *cid);
+static afs_int32 isAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid,
+ afs_int32 *flag, afs_int32 *cid);
+#if IP_WILDCARDS
+static afs_int32 addWildCards(struct ubik_trans *tt, prlist *alist,
+ afs_int32 host);
+#endif
+static afs_int32 WhoIsThisWithName(struct rx_call *acall,
+ struct ubik_trans *at, afs_int32 *aid,
+ char *aname);
/* When abort, reset initd so that the header is read in on next call.
* Abort the transaction and return the code.
#define ABORT_WITH(tt,code) return(initd=0,ubik_AbortTrans(tt),code)
static int
-CreateOK(ut, cid, oid, flag, admin)
- struct ubik_trans *ut;
- afs_int32 cid; /* id of caller */
- afs_int32 oid; /* id of owner */
- afs_int32 flag; /* indicates type of entry */
- int admin; /* sysadmin membership */
+CreateOK(struct ubik_trans *ut, afs_int32 cid, afs_int32 oid, afs_int32 flag,
+ int admin)
{
if (restricted && !admin)
return 0;
}
afs_int32
-WhoIsThis(acall, at, aid)
- struct rx_call *acall;
- struct ubik_trans *at;
- afs_int32 *aid;
+WhoIsThis(struct rx_call *acall, struct ubik_trans *at, afs_int32 *aid)
{
int foreign = 0;
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
foreign = afs_is_foreign_ticket_name(name,inst,tcell,pr_realmName);
strncpy(vname, name, sizeof(vname));
- if (ilen = strlen(inst)) {
+ if ((ilen = strlen(inst))) {
if (strlen(vname) + 1 + ilen >= sizeof(vname))
goto done;
strcat(vname, ".");
}
afs_int32
-SPR_INewEntry(call, aname, aid, oid)
- struct rx_call *call;
- char aname[PR_MAXNAMELEN];
- afs_int32 aid;
- afs_int32 oid;
+SPR_INewEntry(struct rx_call *call, char aname[], afs_int32 aid, afs_int32 oid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = iNewEntry(call, aname, aid, oid, &cid);
osi_auditU(call, PTS_INewEntEvent, code, AUD_ID, aid, AUD_STR, aname,
AUD_ID, oid, AUD_END);
- ViceLog(25, ("PTS_INewEntry: code %d cid %d aid %d aname %s oid %d", code, cid, aid, aname, oid));
+ ViceLog(5, ("PTS_INewEntry: code %d cid %d aid %d aname %s oid %d\n", code, cid, aid, aname, oid));
return code;
}
-afs_int32
-iNewEntry(call, aname, aid, oid, cid)
- struct rx_call *call;
- char aname[PR_MAXNAMELEN];
- afs_int32 aid;
- afs_int32 oid;
- afs_int32 * cid;
+static afs_int32
+iNewEntry(struct rx_call *call, char aname[], afs_int32 aid, afs_int32 oid,
+ afs_int32 *cid)
{
/* used primarily for conversion - not intended to be used as usual means
* of entering people into the database. */
afs_int32
-SPR_NewEntry(call, aname, flag, oid, aid)
- struct rx_call *call;
- char aname[PR_MAXNAMELEN];
- afs_int32 flag;
- afs_int32 oid;
- afs_int32 *aid;
+SPR_NewEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
+ afs_int32 *aid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = newEntry(call, aname, flag, oid, aid, &cid);
osi_auditU(call, PTS_NewEntEvent, code, AUD_ID, *aid, AUD_STR, aname,
AUD_ID, oid, AUD_END);
- ViceLog(25, ("PTS_NewEntry: code %d cid %d aid %d aname %s oid %d", code, cid, *aid, aname, oid));
+ ViceLog(5, ("PTS_NewEntry: code %d cid %d aid %d aname %s oid %d\n", code, cid, *aid, aname, oid));
return code;
}
-afs_int32
-newEntry(call, aname, flag, oid, aid, cid)
- struct rx_call *call;
- char aname[PR_MAXNAMELEN];
- afs_int32 flag;
- afs_int32 oid;
- afs_int32 *aid;
- afs_int32 *cid;
+static afs_int32
+newEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
+ afs_int32 *aid, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
int admin;
- extern afs_int32 WhoIsThisWithName();
char cname[PR_MAXNAMELEN];
stolower(aname);
code = Initdb();
afs_int32
-SPR_WhereIsIt(call, aid, apos)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 *apos;
+SPR_WhereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = whereIsIt(call, aid, apos, &cid);
osi_auditU(call, PTS_WheIsItEvent, code, AUD_ID, aid, AUD_LONG, *apos,
AUD_END);
- ViceLog(125, ("PTS_WhereIsIt: code %d cid %d aid %d apos %d", code, cid, aid, *apos));
+ ViceLog(125, ("PTS_WhereIsIt: code %d cid %d aid %d apos %d\n", code, cid, aid, *apos));
return code;
}
-afs_int32
-whereIsIt(call, aid, apos, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 *apos;
- afs_int32 *cid;
+static afs_int32
+whereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
afs_int32
-SPR_DumpEntry(call, apos, aentry)
- struct rx_call *call;
- afs_int32 apos;
- struct prdebugentry *aentry;
+SPR_DumpEntry(struct rx_call *call, afs_int32 apos,
+ struct prdebugentry *aentry)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = dumpEntry(call, apos, aentry, &cid);
osi_auditU(call, PTS_DmpEntEvent, code, AUD_LONG, apos, AUD_END);
- ViceLog(125, ("PTS_DumpEntry: code %d cid %d apos %d", code, cid, apos));
+ ViceLog(125, ("PTS_DumpEntry: code %d cid %d apos %d\n", code, cid, apos));
return code;
}
-afs_int32
-dumpEntry(call, apos, aentry, cid)
- struct rx_call *call;
- afs_int32 apos;
- struct prdebugentry *aentry;
- afs_int32 *cid;
+static afs_int32
+dumpEntry(struct rx_call *call, afs_int32 apos, struct prdebugentry *aentry,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
code = WhoIsThis(call, tt, cid);
if (code)
ABORT_WITH(tt, PRPERM);
- code = pr_ReadEntry(tt, 0, apos, aentry);
+ code = pr_ReadEntry(tt, 0, apos, (struct prentry *)aentry);
if (code)
ABORT_WITH(tt, code);
}
afs_int32
-SPR_AddToGroup(call, aid, gid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gid;
+SPR_AddToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = addToGroup(call, aid, gid, &cid);
osi_auditU(call, PTS_AdToGrpEvent, code, AUD_ID, gid, AUD_ID, aid,
AUD_END);
- ViceLog(5, ("PTS_AddToGroup: code %d cid %d gid %d aid %d", code, cid, gid, aid));
+ ViceLog(5, ("PTS_AddToGroup: code %d cid %d gid %d aid %d\n", code, cid, gid, aid));
return code;
}
-afs_int32
-addToGroup(call, aid, gid, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gid;
- afs_int32 *cid;
+static afs_int32
+addToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_NameToID(call, aname, aid)
- struct rx_call *call;
- namelist *aname;
- idlist *aid;
+SPR_NameToID(struct rx_call *call, namelist *aname, idlist *aid)
{
afs_int32 code;
code = nameToID(call, aname, aid);
osi_auditU(call, PTS_NmToIdEvent, code, AUD_END);
- ViceLog(125, ("PTS_NameToID: code %d", code));
+ ViceLog(125, ("PTS_NameToID: code %d\n", code));
return code;
}
-afs_int32
-nameToID(call, aname, aid)
- struct rx_call *call;
- namelist *aname;
- idlist *aid;
+static afs_int32
+nameToID(struct rx_call *call, namelist *aname, idlist *aid)
{
register afs_int32 code;
struct ubik_trans *tt;
osi_audit(PTS_NmToIdEvent, code, AUD_STR,
aname->namelist_val[i], AUD_ID, aid->idlist_val[i],
AUD_END);
- ViceLog(125, ("PTS_NameToID: code %d aname %s aid %d", code,
+ ViceLog(125, ("PTS_NameToID: code %d aname %s aid %d\n", code,
aname->namelist_val[i], aid->idlist_val[i]));
- if (count++ > 50)
- IOMGR_Poll(), count = 0;
+ if (count++ > 50) {
+#ifndef AFS_PTHREAD_ENV
+ IOMGR_Poll();
+#endif
+ count = 0;
+ }
}
aid->idlist_len = aname->namelist_len;
* The array of ids and names is unlimited.
*/
afs_int32
-SPR_IDToName(call, aid, aname)
- struct rx_call *call;
- idlist *aid;
- namelist *aname;
+SPR_IDToName(struct rx_call *call, idlist *aid, namelist *aname)
{
afs_int32 code;
code = idToName(call, aid, aname);
osi_auditU(call, PTS_IdToNmEvent, code, AUD_END);
- ViceLog(125, ("PTS_IDToName: code %d", code));
+ ViceLog(125, ("PTS_IDToName: code %d\n", code));
return code;
}
-afs_int32
-idToName(call, aid, aname)
- struct rx_call *call;
- idlist *aid;
- namelist *aname;
+static afs_int32
+idToName(struct rx_call *call, idlist *aid, namelist *aname)
{
register afs_int32 code;
struct ubik_trans *tt;
sprintf(aname->namelist_val[i], "%d", aid->idlist_val[i]);
osi_audit(PTS_IdToNmEvent, code, AUD_ID, aid->idlist_val[i],
AUD_STR, aname->namelist_val[i], AUD_END);
- ViceLog(125, ("PTS_idToName: code %d aid %d aname %s", code,
+ ViceLog(125, ("PTS_idToName: code %d aid %d aname %s\n", code,
aid->idlist_val[i], aname->namelist_val[i]));
- if (count++ > 50)
- IOMGR_Poll(), count = 0;
+ if (count++ > 50) {
+#ifndef AFS_PTHREAD_ENV
+ IOMGR_Poll();
+#endif
+ count = 0;
+ }
}
aname->namelist_len = aid->idlist_len;
}
afs_int32
-SPR_Delete(call, aid)
- struct rx_call *call;
- afs_int32 aid;
+SPR_Delete(struct rx_call *call, afs_int32 aid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = Delete(call, aid, &cid);
osi_auditU(call, PTS_DelEvent, code, AUD_ID, aid, AUD_END);
- ViceLog(25, ("PTS_Delete: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(5, ("PTS_Delete: code %d cid %d aid %d\n", code, cid, aid));
return code;
}
-afs_int32
-Delete(call, aid, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 *cid;
+static afs_int32
+Delete(struct rx_call *call, afs_int32 aid, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
if (code)
ABORT_WITH(tt, code);
tentry.count--; /* maintain count */
+#ifndef AFS_PTHREAD_ENV
if ((i & 3) == 0)
IOMGR_Poll();
+#endif
}
tentry.next = centry.next; /* thread out this block */
code = FreeBlock(tt, nptr); /* free continuation block */
code = ubik_EndTrans(tt);
if (code)
return code;
+#ifndef AFS_PTHREAD_ENV
IOMGR_Poll(); /* just to keep the connection alive */
+#endif
code = ubik_BeginTrans(dbase, UBIK_WRITETRANS, &tt);
if (code)
return code;
if (code)
ABORT_WITH(tt, code);
tentryg->countsg--; /* maintain count */
+#ifndef AFS_PTHREAD_ENV
if ((i & 3) == 0)
IOMGR_Poll();
+#endif
}
tentryg->nextsg = centry.next; /* thread out this block */
code = FreeBlock(tt, nptr); /* free continuation block */
code = ubik_EndTrans(tt);
if (code)
return code;
+#ifndef AFS_PTHREAD_ENV
IOMGR_Poll(); /* just to keep the connection alive */
+#endif
code = ubik_BeginTrans(dbase, UBIK_WRITETRANS, &tt);
if (code)
if (code)
ABORT_WITH(tt, code);
count++;
+#ifndef AFS_PTHREAD_ENV
if ((count & 3) == 0)
IOMGR_Poll();
+#endif
}
if (count < 50)
continue;
code = ubik_EndTrans(tt);
if (code)
return code;
+#ifndef AFS_PTHREAD_ENV
IOMGR_Poll(); /* just to keep the connection alive */
+#endif
code = ubik_BeginTrans(dbase, UBIK_WRITETRANS, &tt);
if (code)
return code;
}
afs_int32
-SPR_UpdateEntry(call, aid, name, uentry)
- struct rx_call *call;
- afs_int32 aid;
- char *name;
- struct PrUpdateEntry *uentry;
+SPR_UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+ struct PrUpdateEntry *uentry)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = UpdateEntry(call, aid, name, uentry, &cid);
osi_auditU(call, PTS_UpdEntEvent, code, AUD_ID, aid, AUD_STR, name, AUD_END);
- ViceLog(5, ("PTS_UpdateEntry: code %d cid %d aid %d name %s", code, cid, aid, name));
+ ViceLog(5, ("PTS_UpdateEntry: code %d cid %d aid %d name %s\n", code, cid, aid, name));
return code;
}
afs_int32
-UpdateEntry(call, aid, name, uentry, cid)
- struct rx_call *call;
- afs_int32 aid;
- char *name;
- struct PrUpdateEntry *uentry;
- afs_int32 *cid;
+UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+ struct PrUpdateEntry *uentry, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_RemoveFromGroup(call, aid, gid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gid;
+SPR_RemoveFromGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = removeFromGroup(call, aid, gid, &cid);
osi_auditU(call, PTS_RmFmGrpEvent, code, AUD_ID, gid, AUD_ID, aid,
AUD_END);
- ViceLog(5, ("PTS_RemoveFromGroup: code %d cid %d gid %d aid %d", code, cid, gid, aid));
+ ViceLog(5, ("PTS_RemoveFromGroup: code %d cid %d gid %d aid %d\n", code, cid, gid, aid));
return code;
}
-afs_int32
-removeFromGroup(call, aid, gid, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gid;
- afs_int32 *cid;
+static afs_int32
+removeFromGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
afs_int32
-SPR_GetCPS(call, aid, alist, over)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
+SPR_GetCPS(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *over)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = getCPS(call, aid, alist, over, &cid);
osi_auditU(call, PTS_GetCPSEvent, code, AUD_ID, aid, AUD_END);
- ViceLog(125, ("PTS_GetCPS: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(125, ("PTS_GetCPS: code %d cid %d aid %d\n", code, cid, aid));
return code;
}
-afs_int32
-getCPS(call, aid, alist, over, cid)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
- afs_int32 *cid;
+static afs_int32
+getCPS(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *over,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
#ifdef IP_WILDCARDS
int
-inCPS(CPS, id)
- prlist CPS;
- afs_int32 id;
+inCPS(prlist CPS, afs_int32 id)
{
int i;
afs_int32
-SPR_GetCPS2(call, aid, ahost, alist, over)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 ahost;
- prlist *alist;
- afs_int32 *over;
+SPR_GetCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost,
+ prlist *alist, afs_int32 *over)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = getCPS2(call, aid, ahost, alist, over, &cid);
osi_auditU(call, PTS_GetCPS2Event, code, AUD_ID, aid, AUD_HOST, ahost,
AUD_END);
- ViceLog(125, ("PTS_GetCPS2: code %d cid %d aid %d ahost %d", code, cid, aid, ahost));
+ ViceLog(125, ("PTS_GetCPS2: code %d cid %d aid %d ahost %d\n", code, cid, aid, ahost));
return code;
}
-afs_int32
-getCPS2(call, aid, ahost, alist, over, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 ahost;
- prlist *alist;
- afs_int32 *over;
- afs_int32 *cid;
+static afs_int32
+getCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost, prlist *alist,
+ afs_int32 *over, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
afs_int32 hostid;
int host_list = 0;
struct in_addr iaddr;
-#if IP_WILDCARDS
- extern afs_int32 addWildCards();
-#endif /* IP_WILDCARDS */
*over = 0;
iaddr.s_addr = ntohl(ahost);
afs_int32
-SPR_GetHostCPS(call, ahost, alist, over)
- struct rx_call *call;
- afs_int32 ahost;
- prlist *alist;
- afs_int32 *over;
+SPR_GetHostCPS(struct rx_call *call, afs_int32 ahost, prlist *alist,
+ afs_int32 *over)
{
afs_int32 code;
code = getHostCPS(call, ahost, alist, over);
osi_auditU(call, PTS_GetHCPSEvent, code, AUD_HOST, ahost, AUD_END);
- ViceLog(125, ("PTS_GetHostCPS: code %d ahost %d", code, ahost));
+ ViceLog(125, ("PTS_GetHostCPS: code %d ahost %d\n", code, ahost));
return code;
}
afs_int32
-getHostCPS(call, ahost, alist, over)
- struct rx_call *call;
- afs_int32 ahost;
- prlist *alist;
- afs_int32 *over;
+getHostCPS(struct rx_call *call, afs_int32 ahost, prlist *alist,
+ afs_int32 *over)
{
register afs_int32 code, temp;
struct ubik_trans *tt;
struct prentry host_tentry;
afs_int32 hostid;
struct in_addr iaddr;
-#if IP_WILDCARDS
- extern afs_int32 addWildCards();
-#endif /* IP_WILDCARDS */
*over = 0;
iaddr.s_addr = ntohl(ahost);
afs_int32
-SPR_ListMax(call, uid, gid)
- struct rx_call *call;
- afs_int32 *uid;
- afs_int32 *gid;
+SPR_ListMax(struct rx_call *call, afs_int32 *uid, afs_int32 *gid)
{
afs_int32 code;
code = listMax(call, uid, gid);
osi_auditU(call, PTS_LstMaxEvent, code, AUD_END);
- ViceLog(125, ("PTS_ListMax: code %d", code));
+ ViceLog(125, ("PTS_ListMax: code %d\n", code));
return code;
}
afs_int32
-listMax(call, uid, gid)
- struct rx_call *call;
- afs_int32 *uid;
- afs_int32 *gid;
+listMax(struct rx_call *call, afs_int32 *uid, afs_int32 *gid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_SetMax(call, aid, gflag)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gflag;
+SPR_SetMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = setMax(call, aid, gflag, &cid);
osi_auditU(call, PTS_SetMaxEvent, code, AUD_ID, aid, AUD_LONG, gflag,
AUD_END);
- ViceLog(125, ("PTS_SetMax: code %d cid %d aid %d gflag %d", code, cid, aid, gflag));
+ ViceLog(125, ("PTS_SetMax: code %d cid %d aid %d gflag %d\n", code, cid, aid, gflag));
return code;
}
-afs_int32
-setMax(call, aid, gflag, cid)
- struct rx_call *call;
- afs_int32 aid;
- afs_int32 gflag;
- afs_int32 *cid;
+static afs_int32
+setMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_ListEntry(call, aid, aentry)
- struct rx_call *call;
- afs_int32 aid;
- struct prcheckentry *aentry;
+SPR_ListEntry(struct rx_call *call, afs_int32 aid, struct prcheckentry *aentry)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = listEntry(call, aid, aentry, &cid);
osi_auditU(call, PTS_LstEntEvent, code, AUD_ID, aid, AUD_END);
- ViceLog(125, ("PTS_ListEntry: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(125, ("PTS_ListEntry: code %d cid %d aid %d\n", code, cid, aid));
return code;
}
-afs_int32
-listEntry(call, aid, aentry, cid)
- struct rx_call *call;
- afs_int32 aid;
- struct prcheckentry *aentry;
- afs_int32 *cid;
+static afs_int32
+listEntry(struct rx_call *call, afs_int32 aid, struct prcheckentry *aentry,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_ListEntries(call, flag, startindex, bulkentries, nextstartindex)
- struct rx_call *call;
- afs_int32 flag;
- afs_int32 startindex;
- prentries *bulkentries;
- afs_int32 *nextstartindex;
+SPR_ListEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
+ prentries *bulkentries, afs_int32 *nextstartindex)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = listEntries(call, flag, startindex, bulkentries, nextstartindex, &cid);
osi_auditU(call, PTS_LstEntsEvent, code, AUD_LONG, flag, AUD_END);
- ViceLog(125, ("PTS_ListEntries: code %d cid %d flag %d", code, cid, flag));
+ ViceLog(125, ("PTS_ListEntries: code %d cid %d flag %d\n", code, cid, flag));
return code;
}
-afs_int32
-listEntries(call, flag, startindex, bulkentries, nextstartindex, cid)
- struct rx_call *call;
- afs_int32 flag;
- afs_int32 startindex;
- prentries *bulkentries;
- afs_int32 *nextstartindex;
- afs_int32 *cid;
+static afs_int32
+listEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
+ prentries *bulkentries, afs_int32 *nextstartindex, afs_int32 *cid)
{
afs_int32 code;
struct ubik_trans *tt;
goto done;
if (++pollcount > 50) {
+#ifndef AFS_PTHREAD_ENV
IOMGR_Poll();
+#endif
pollcount = 0;
}
}
#define PR_MAXENTRIES 500
-afs_int32
-put_prentries(tentry, bulkentries)
- struct prentry *tentry;
- prentries *bulkentries;
+static afs_int32
+put_prentries(struct prentry *tentry, prentries *bulkentries)
{
struct prlistentries *entry;
}
afs_int32
-SPR_ChangeEntry(call, aid, name, oid, newid)
- struct rx_call *call;
- afs_int32 aid;
- char *name;
- afs_int32 oid;
- afs_int32 newid;
+SPR_ChangeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
+ afs_int32 newid)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = changeEntry(call, aid, name, oid, newid, &cid);
osi_auditU(call, PTS_ChgEntEvent, code, AUD_ID, aid, AUD_STR, name,
AUD_LONG, oid, AUD_LONG, newid, AUD_END);
- ViceLog(5, ("PTS_ChangeEntry: code %d cid %d aid %d name %s oid %d newid %d", code, cid, aid, name, oid, newid));
+ ViceLog(5, ("PTS_ChangeEntry: code %d cid %d aid %d name %s oid %d newid %d\n", code, cid, aid, name, oid, newid));
return code;
}
-afs_int32
-changeEntry(call, aid, name, oid, newid, cid)
- struct rx_call *call;
- afs_int32 aid;
- char *name;
- afs_int32 oid;
- afs_int32 newid;
- afs_int32 *cid;
+static afs_int32
+changeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
+ afs_int32 newid, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_SetFieldsEntry(call, id, mask, flags, ngroups, nusers, spare1, spare2)
- struct rx_call *call;
- afs_int32 id;
- afs_int32 mask; /* specify which fields to update */
- afs_int32 flags, ngroups, nusers;
- afs_int32 spare1, spare2;
+SPR_SetFieldsEntry(struct rx_call *call,
+ afs_int32 id,
+ afs_int32 mask, /* specify which fields to update */
+ afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
+ afs_int32 spare1, afs_int32 spare2)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
setFieldsEntry(call, id, mask, flags, ngroups, nusers, spare1,
spare2, &cid);
osi_auditU(call, PTS_SetFldEntEvent, code, AUD_ID, id, AUD_END);
- ViceLog(5, ("PTS_SetFieldsEntry: code %d cid %d id %d", code, cid, id));
+ ViceLog(5, ("PTS_SetFieldsEntry: code %d cid %d id %d\n", code, cid, id));
return code;
}
-afs_int32
-setFieldsEntry(call, id, mask, flags, ngroups, nusers, spare1, spare2, cid)
- struct rx_call *call;
- afs_int32 id;
- afs_int32 mask; /* specify which fields to update */
- afs_int32 flags, ngroups, nusers;
- afs_int32 spare1, spare2;
- afs_int32 *cid;
+static afs_int32
+setFieldsEntry(struct rx_call *call,
+ afs_int32 id,
+ afs_int32 mask, /* specify which fields to update */
+ afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
+ afs_int32 spare1, afs_int32 spare2, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_ListElements(call, aid, alist, over)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
+SPR_ListElements(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *over)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = listElements(call, aid, alist, over, &cid);
osi_auditU(call, PTS_LstEleEvent, code, AUD_ID, aid, AUD_END);
- ViceLog(125, ("PTS_ListElements: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(125, ("PTS_ListElements: code %d cid %d aid %d\n", code, cid, aid));
return code;
}
-afs_int32
-listElements(call, aid, alist, over, cid)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
- afs_int32 *cid;
+static afs_int32
+listElements(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *over, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
afs_int32
-SPR_ListSuperGroups(call, aid, alist, over)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
+SPR_ListSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *over)
{
#if defined(SUPERGROUPS)
afs_int32 code;
code = listSuperGroups(call, aid, alist, over, &cid);
osi_auditU(call, PTS_LstSGrps, code, AUD_ID, aid, AUD_END);
- ViceLog(125, ("PTS_ListSuperGroups: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(125, ("PTS_ListSuperGroups: code %d cid %d aid %d\n", code, cid, aid));
return code;
#else
return RXGEN_OPCODE;
}
#if defined(SUPERGROUPS)
-afs_int32
-listSuperGroups(call, aid, alist, over, cid)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *over;
- afs_int32 *cid;
+static afs_int32
+listSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *over, afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
* maximum value is enforced in GetOwnedChain().
*/
afs_int32
-SPR_ListOwned(call, aid, alist, lastP)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *lastP;
+SPR_ListOwned(struct rx_call *call, afs_int32 aid, prlist *alist,
+ afs_int32 *lastP)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = listOwned(call, aid, alist, lastP, &cid);
osi_auditU(call, PTS_LstOwnEvent, code, AUD_ID, aid, AUD_END);
- ViceLog(125, ("PTS_ListOwned: code %d cid %d aid %d", code, cid, aid));
+ ViceLog(125, ("PTS_ListOwned: code %d cid %d aid %d\n", code, cid, aid));
return code;
}
afs_int32
-listOwned(call, aid, alist, lastP, cid)
- struct rx_call *call;
- afs_int32 aid;
- prlist *alist;
- afs_int32 *lastP;
- afs_int32 *cid;
+listOwned(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *lastP,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
afs_int32
-SPR_IsAMemberOf(call, uid, gid, flag)
- struct rx_call *call;
- afs_int32 uid;
- afs_int32 gid;
- afs_int32 *flag;
+SPR_IsAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid,
+ afs_int32 *flag)
{
afs_int32 code;
afs_int32 cid = ANONYMOUSID;
code = isAMemberOf(call, uid, gid, flag, &cid);
osi_auditU(call, PTS_IsMemOfEvent, code, AUD_LONG, uid, AUD_LONG, gid,
AUD_END);
- ViceLog(125, ("PTS_IsAMemberOf: code %d cid %d uid %d gid %d", code, cid, uid, gid));
+ ViceLog(125, ("PTS_IsAMemberOf: code %d cid %d uid %d gid %d\n", code, cid, uid, gid));
return code;
}
-afs_int32
-isAMemberOf(call, uid, gid, flag, cid)
- struct rx_call *call;
- afs_int32 uid;
- afs_int32 gid;
- afs_int32 *flag;
- afs_int32 *cid;
+static afs_int32
+isAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid, afs_int32 *flag,
+ afs_int32 *cid)
{
register afs_int32 code;
struct ubik_trans *tt;
}
#if IP_WILDCARDS
-afs_int32
-addWildCards(tt, alist, host)
- struct ubik_trans *tt;
- prlist *alist;
- afs_int32 host;
+static afs_int32
+addWildCards(struct ubik_trans *tt, prlist *alist, afs_int32 host)
{
afs_int32 temp;
struct prentry tentry;
}
#endif /* IP_WILDCARDS */
-afs_int32
-WhoIsThisWithName(acall, at, aid, aname)
- struct rx_call *acall;
- struct ubik_trans *at;
- afs_int32 *aid;
- char *aname;
+static afs_int32
+WhoIsThisWithName(struct rx_call *acall, struct ubik_trans *at, afs_int32 *aid,
+ char *aname)
{
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
/* returns -1 and sets aid to ANONYMOUSID on any failure */