summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-12-14 17:18:00 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-12-14 17:18:00 +0000
commit8683ea74ab5cd6ebae78ab719b7e720e2e259743 (patch)
treee73fbb30b2601d2402e0f1b027c86121979e14fe
parente701ce3121922c3f7e07172fc44c166724cce112 (diff)
Formerly cred.c.~4~
-rw-r--r--nfs/cred.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/nfs/cred.c b/nfs/cred.c
index 4a1829cd..7637a99d 100644
--- a/nfs/cred.c
+++ b/nfs/cred.c
@@ -82,3 +82,23 @@ netfs_make_credential (uid_t *uids,
return cred;
}
+
+int
+cred_has_uid (struct netcred *cred, uid_t uid)
+{
+ int i;
+ for (i = 0; i < cred->nuids; i++)
+ if (cred->uids[i] == uid)
+ return 1;
+ return 0;
+}
+
+int
+cred_has_gid (struct netcred *cred, gid_t gid)
+{
+ int i;
+ for (i = 0; i < cred->ngids; i++)
+ if (cred->gids[i] == gid)
+ return 1;
+ return 0;
+}