}
else if (code == 2) { /* kad class */
if ((code = rxkad_GetServerInfo
- (acall->conn, (afs_int32 *) 0, 0/*was &exp*/,
- name, inst, tcell, (afs_int32 *) 0)))
+ (acall->conn, NULL, 0/*was &exp*/,
+ name, inst, tcell, NULL)))
goto done;
#if 0
/* This test is unnecessary, since rxkad_GetServerInfo already check.
return 0;
}
-afs_int32 PR_INewEntry (call,aname,aid,oid)
+afs_int32 SPR_INewEntry (call,aname,aid,oid)
struct rx_call *call;
char aname[PR_MAXNAMELEN];
afs_int32 aid;
}
-afs_int32 PR_NewEntry (call, aname, flag, oid, aid)
+afs_int32 SPR_NewEntry (call, aname, flag, oid, aid)
struct rx_call *call;
char aname[PR_MAXNAMELEN];
afs_int32 flag;
if (code) ABORT_WITH(tt,code);
/* this is for cross-cell self registration. It is not added in the
- * PR_INewEntry because we want self-registration to only do
+ * SPR_INewEntry because we want self-registration to only do
* automatic id assignment.
*/
code = WhoIsThisWithName(call,tt,&cid,cname);
-afs_int32 PR_WhereIsIt (call,aid,apos)
+afs_int32 SPR_WhereIsIt (call,aid,apos)
struct rx_call *call;
afs_int32 aid;
afs_int32 *apos;
}
-afs_int32 PR_DumpEntry (call,apos, aentry)
+afs_int32 SPR_DumpEntry (call,apos, aentry)
struct rx_call *call;
afs_int32 apos;
struct prdebugentry *aentry;
code = pr_ReadEntry(tt, 0, apos, aentry);
if (code) ABORT_WITH(tt,code);
- if (!AccessOK (tt, cid, aentry, PRP_STATUS_MEM, PRP_STATUS_ANY))
+ if (!AccessOK (tt, cid, 0, PRP_STATUS_MEM, 0))
ABORT_WITH(tt,PRPERM);
/* Since prdebugentry is in the form of a prentry not a coentry, we will
return PRSUCCESS;
}
-afs_int32 PR_AddToGroup (call,aid,gid)
+afs_int32 SPR_AddToGroup (call,aid,gid)
struct rx_call *call;
afs_int32 aid;
afs_int32 gid;
return PRSUCCESS;
}
-afs_int32 PR_NameToID (call, aname, aid)
+afs_int32 SPR_NameToID (call, aname, aid)
struct rx_call *call;
namelist *aname;
idlist *aid;
/* Initialize return struct */
aid->idlist_len = 0;
- aid->idlist_val = (afs_int32 *)0;
+ aid->idlist_val = NULL;
size = aname->namelist_len;
if (size == 0) return 0;
}
/*
- * PR_IDToName
+ * SPR_IDToName
* Given an array of ids, find the name for each of them.
* The array of ids and names is unlimited.
*/
-afs_int32 PR_IDToName (call, aid, aname)
+afs_int32 SPR_IDToName (call, aid, aname)
struct rx_call *call;
idlist *aid;
namelist *aname;
/* leave this first for rpc stub */
size = aid->idlist_len;
- if (size <= 0) size = 0;
+ if (size == 0) return 0;
+ if (size < 0) return PRTOOMANY;
aname->namelist_val = (prname *)malloc(size*PR_MAXNAMELEN);
aname->namelist_len = 0;
+ if (aname->namelist_val == 0) return PRNOMEM;
if (aid->idlist_len == 0) return 0;
if (size == 0) return PRTOOMANY; /* rxgen will probably handle this */
return PRSUCCESS;
}
-afs_int32 PR_Delete (call, aid)
+afs_int32 SPR_Delete (call, aid)
struct rx_call *call;
afs_int32 aid;
{
return PRSUCCESS;
}
-afs_int32 PR_UpdateEntry (call, aid, name, uentry)
+afs_int32 SPR_UpdateEntry (call, aid, name, uentry)
struct rx_call *call;
afs_int32 aid;
char *name;
return PRSUCCESS;
}
-afs_int32 PR_RemoveFromGroup (call,aid,gid)
+afs_int32 SPR_RemoveFromGroup (call,aid,gid)
struct rx_call *call;
afs_int32 aid;
afs_int32 gid;
}
-afs_int32 PR_GetCPS (call, aid, alist, over)
+afs_int32 SPR_GetCPS (call, aid, alist, over)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
*over = 0;
alist->prlist_len = 0;
- alist->prlist_val = (afs_int32 *) 0;
+ alist->prlist_val = NULL;
code = Initdb();
if (code != PRSUCCESS) return code;
code = ubik_BeginTransReadAny(dbase,UBIK_READTRANS,&tt);
#endif /* IP_WILDCARDS */
-afs_int32 PR_GetCPS2 (call, aid, ahost, alist, over)
+afs_int32 SPR_GetCPS2 (call, aid, ahost, alist, over)
struct rx_call *call;
afs_int32 aid;
afs_int32 ahost;
*over = 0;
iaddr.s_addr = ntohl(ahost);
alist->prlist_len = 0;
- alist->prlist_val = (afs_int32 *) 0;
+ alist->prlist_val = NULL;
code = Initdb();
if (code != PRSUCCESS) return code;
code = ubik_BeginTransReadAny(dbase,UBIK_READTRANS,&tt);
}
-afs_int32 PR_GetHostCPS (call, ahost, alist, over)
+afs_int32 SPR_GetHostCPS (call, ahost, alist, over)
struct rx_call *call;
afs_int32 ahost;
prlist *alist;
*over = 0;
iaddr.s_addr = ntohl(ahost);
alist->prlist_len = 0;
- alist->prlist_val = (afs_int32 *) 0;
+ alist->prlist_val = NULL;
code = Initdb();
if (code != PRSUCCESS) return code;
code = ubik_BeginTransReadAny(dbase,UBIK_READTRANS,&tt);
}
-afs_int32 PR_ListMax (call,uid,gid)
+afs_int32 SPR_ListMax (call,uid,gid)
struct rx_call *call;
afs_int32 *uid;
afs_int32 *gid;
return PRSUCCESS;
}
-afs_int32 PR_SetMax (call,aid,gflag)
+afs_int32 SPR_SetMax (call,aid,gflag)
struct rx_call *call;
afs_int32 aid;
afs_int32 gflag;
return PRSUCCESS;
}
-afs_int32 PR_ListEntry (call,aid,aentry)
+afs_int32 SPR_ListEntry (call,aid,aentry)
struct rx_call *call;
afs_int32 aid;
struct prcheckentry *aentry;
return PRSUCCESS;
}
-afs_int32 PR_ListEntries(call, flag, startindex, bulkentries, nextstartindex)
+afs_int32 SPR_ListEntries(call, flag, startindex, bulkentries, nextstartindex)
struct rx_call *call;
afs_int32 flag;
afs_int32 startindex;
return 0;
}
-afs_int32 PR_ChangeEntry (call,aid,name,oid,newid)
+afs_int32 SPR_ChangeEntry (call,aid,name,oid,newid)
struct rx_call *call;
afs_int32 aid;
char *name;
return code;
}
-afs_int32 PR_SetFieldsEntry (call, id, mask, flags, ngroups, nusers, spare1, spare2)
+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 */
return code;
}
-afs_int32 PR_ListElements (call, aid, alist, over)
+afs_int32 SPR_ListElements (call, aid, alist, over)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
*over = 0;
alist->prlist_len = 0;
- alist->prlist_val = (afs_int32 *) 0;
+ alist->prlist_val = NULL;
code = Initdb();
if (code != PRSUCCESS) return code;
}
/*
- * PR_istOwned
+ * SPR_ListOwned
* List the entries owned by this id. If the id is zero,
* return the orphans list. This will return up to PR_MAXGROUPS
* at a time with the lastP available to get the rest. The
* maximum value is enforced in GetOwnedChain().
*/
-afs_int32 PR_ListOwned (call, aid, alist, lastP)
+afs_int32 SPR_ListOwned (call, aid, alist, lastP)
struct rx_call *call;
afs_int32 aid;
prlist *alist;
afs_int32 start;
alist->prlist_len = 0;
- alist->prlist_val = (afs_int32 *) 0;
+ alist->prlist_val = NULL;
if (!lastP) return PRBADARG;
start = *lastP;
return code;
}
-afs_int32 PR_IsAMemberOf (call,uid,gid,flag)
+afs_int32 SPR_IsAMemberOf (call,uid,gid,flag)
struct rx_call *call;
afs_int32 uid;
afs_int32 gid;
} else
continue;
wlist.prlist_len = 0;
- wlist.prlist_val = (afs_int32 *) 0;
+ wlist.prlist_val = NULL;
code = GetList (tt, &tentry, &wlist, 0);
if (code) return code;
extern char *pr_realmName;
if ((code = rxkad_GetServerInfo
- (acall->conn, (afs_int32 *) 0, 0/*was &exp*/,
- name, inst, tcell, (afs_int32 *) 0)))
+ (acall->conn, NULL, 0/*was &exp*/,
+ name, inst, tcell, NULL)))
goto done;
strncpy (vname, name, sizeof(vname));
if ((ilen = strlen(inst))) {