int pr_CheckEntryById(prname name, afs_int32 id, prname owner, prname creator) { /* struct prcheckentry returns other things, which aren't useful to show at this time. */ afs_int32 code; struct prcheckentry aentry; /* XXX ListEntry RPC gives us the name back so should avoid extra RPC */ code = pr_SIdToName(id, name); if (code) return code; if (id == ANONYMOUSID) return PRNOENT; code = ubik_PR_ListEntry(pruclient, 0, id, &aentry); if (code) return code; /* this should be done in one RPC, but I'm lazy. */ code = pr_SIdToName(aentry.owner, owner); if (code) return code; code = pr_SIdToName(aentry.creator, creator); if (code) return code; return PRSUCCESS; }
int pr_CheckEntryByName(prname name, afs_int32 *id, prname owner, prname creator) { /* struct prcheckentry returns other things, which aren't useful to show at this time. */ afs_int32 code; struct prcheckentry aentry; /* pr_SNameToId will check name's length. */ code = pr_SNameToId(name, id); if (code) return code; if (*id == ANONYMOUSID) return PRNOENT; code = ubik_PR_ListEntry(pruclient, 0, *id, &aentry); if (code) return code; /* this should be done in one RPC, but I'm lazy. */ code = pr_SIdToName(aentry.owner, owner); if (code) return code; code = pr_SIdToName(aentry.creator, creator); if (code) return code; return PRSUCCESS; }
int pr_ListEntry(afs_int32 id, struct prcheckentry *aentry) { afs_int32 code; code = ubik_PR_ListEntry(pruclient, 0, id, aentry); return code; }
int pr_ListEntry(afs_int32 id, struct prcheckentry *aentry) { afs_int32 code; code = ubik_PR_ListEntry(pruclient, 0, id, aentry); if (code) return code; return check_length(aentry->name); }
int pr_CheckEntryById(char *name, afs_int32 id, char *owner, char *creator) { /* struct prcheckentry returns other things, which aren't useful to show at this time. */ register afs_int32 code; struct prcheckentry aentry; code = pr_SIdToName(id, name); if (code) return code; if (id == ANONYMOUSID) return PRNOENT; code = ubik_PR_ListEntry(pruclient, 0, id, &aentry); if (code) return code; /* this should be done in one RPC, but I'm lazy. */ code = pr_SIdToName(aentry.owner, owner); if (code) return code; code = pr_SIdToName(aentry.creator, creator); if (code) return code; return PRSUCCESS; }