diff options
Diffstat (limited to 'libtrivfs/file-access.c')
-rw-r--r-- | libtrivfs/file-access.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libtrivfs/file-access.c b/libtrivfs/file-access.c index d017b8e1..87029540 100644 --- a/libtrivfs/file-access.c +++ b/libtrivfs/file-access.c @@ -1,5 +1,5 @@ -/* - Copyright (C) 1994 Free Software Foundation +/* + Copyright (C) 1994,96,2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -16,15 +16,20 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "priv.h" -#include "fs_S.h" -kern_return_t +error_t trivfs_S_file_check_access (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t reply_type, int *allowed) { - if (!cred) + if (! cred) return EOPNOTSUPP; - *allowed = 0; + + if (! trivfs_check_access_hook) + file_check_access (cred->realnode, allowed); + else + (*trivfs_check_access_hook) (cred->po->cntl, cred->user, + cred->realnode, allowed); + return 0; } |