MINIX: sys_call: ipc mask denied SENDREC from 1 to 1

孤人 提交于 2019-12-12 19:40:21

问题


In MINIX 3.2.1, I want to create a new system call in VFS server which will be given a filename as a parameter and will print this certain file's inode number.

So in order to retrieve the inode of the file by its name I want to use the default system call:

int stat(char *name,struct stat *buffer)

http://minix1.woodhull.com/manpages/man2/stat.2.html

in the body of my new system call handler which is

int mycall_1(void);

inside `/usr/src/servers/vfs/misc.c

But when I test the new system call, at the point where the stat system call should be invoked, it actually won't and instead it's printing the message:

sys_call: ipc mask denied SENDREC from 1 to 1

After some research, I found that this possibly happens because the VFS server tries to send a message to itself, as stat is actually implemented inside VFS server, and so ipc mask denied this sendrec() call. So I have to edit some configuration file in order to give the right permission for this communication to happen.

But I'm not sure if what I have understood is right and also do not know which file should Ι edit to give the appropriate permissions. So, if someone could enlighten me on this issue, I would be grateful.

Thanks in advance.


回答1:


You understood it correctly. But the solution is not to continue "fixing the permissions" which are here just to prevent to shot yourself in the foot: it would only allow the system to more badly brocken. Rather, you need to perform the steps that VFS do when it services a STAT request, starting after it cracked the message.



来源:https://stackoverflow.com/questions/37396758/minix-sys-call-ipc-mask-denied-sendrec-from-1-to-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!