kernel: kill proc with bogus ipc address
[minix.git] / servers / iso9660fs / protect.c
blob8cfe9adfd0f946b910d42b9561060278225ba94e
1 #include "inc.h"
2 #include <unistd.h>
3 #include <minix/callnr.h>
4 #include "buf.h"
6 #include <minix/vfsif.h>
8 /* This calling is used to access a particular file. */
9 /*===========================================================================*
10 * fs_access *
11 *===========================================================================*/
12 int fs_access()
14 struct dir_record *rip;
15 int r = OK;
17 /* Temporarily open the file whose access is to be checked. */
18 caller_uid = fs_m_in.REQ_UID;
19 caller_gid = fs_m_in.REQ_GID;
21 /* Temporarily open the file. */
22 if ( (rip = get_dir_record(fs_m_in.REQ_INODE_NR)) == NULL) {
23 printf("ISOFS(%d) get_dir_record by fs_access() failed\n", SELF_E);
24 return(EINVAL);
27 /* For now ISO9660 doesn't have permission control (read and execution to
28 * everybody by default. So the access is always granted. */
30 release_dir_record(rip); /* Release the dir record used */
31 return(r);