summaryrefslogtreecommitdiff
path: root/libtrivfs/file-access.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-02-19 07:45:38 +0000
committerThomas Bushnell <thomas@gnu.org>1999-02-19 07:45:38 +0000
commitb4d4e7e9b8ca92adddbb2c19bb1c3d1beda23441 (patch)
treed32663d27d6836afbc5ca79fcc852f7cd778b748 /libtrivfs/file-access.c
parentb2a6f425757ea52463ec2353712cc79b3446f60c (diff)
1999-02-06 Mark Kettenis <kettenis@gnu.org>
* trivfs.h (trivfs_check_access_hook): New variable. * fsys-getroot.c (trivfs_S_fsys_getroot): Use trivfs_check_acces_hook. * dir-lookup.c (trivfs_S_dir_lookup): Likewise. * file-access.c (trivfs_S_file_check_access): Likewise.
Diffstat (limited to 'libtrivfs/file-access.c')
-rw-r--r--libtrivfs/file-access.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libtrivfs/file-access.c b/libtrivfs/file-access.c
index 7b9deb80..91b5427a 100644
--- a/libtrivfs/file-access.c
+++ b/libtrivfs/file-access.c
@@ -25,7 +25,12 @@ trivfs_S_file_check_access (struct trivfs_protid *cred,
{
if (! cred)
return EOPNOTSUPP;
+
+ if (! trivfs_check_access_hook)
+ file_check_access (cred->realnode, allowed);
else
- return file_check_access (cred->realnode, allowed);
+ (*trivfs_check_access_hook) (cred->po->cntl, cred->user,
+ cred->realnode, allowed);
+
return 0;
}