diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-12-14 17:18:00 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-12-14 17:18:00 +0000 |
commit | 8683ea74ab5cd6ebae78ab719b7e720e2e259743 (patch) | |
tree | e73fbb30b2601d2402e0f1b027c86121979e14fe | |
parent | e701ce3121922c3f7e07172fc44c166724cce112 (diff) |
Formerly cred.c.~4~
-rw-r--r-- | nfs/cred.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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; +} |