MINIX:sys_call:IPC掩码从1到1拒绝SENDREC [英] MINIX: sys_call: ipc mask denied SENDREC from 1 to 1

查看:106
本文介绍了MINIX:sys_call:IPC掩码从1到1拒绝SENDREC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MINIX 3.2.1 中,我想在VFS服务器中创建一个新的系统调用,该调用将被赋予一个文件名作为参数,并将打印该文件的inode数字.

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);

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

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

但是当我测试新的系统调用时,在应该调用stat系统调用的那一点上,实际上并不会,而是打印消息:

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掩码从1到1拒绝SENDREC

sys_call: ipc mask denied SENDREC from 1 to 1

经过研究,我发现这可能是因为VFS服务器试图向自身发送消息,因为stat实际上是在VFS服务器内部实现的,因此ipc mask拒绝了此sendrec()调用.因此,我必须编辑一些配置文件才能为发生这种通信提供正确的权限.

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.

谢谢.

推荐答案

您正确理解了它.但是解决方案不是继续修复权限",这只是为了防止自己陷入僵局:这只会使系统更严重地崩溃. 相反,您需要执行VFSSTAT请求提供服务时执行的步骤,该步骤从它破解消息开始.

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.

这篇关于MINIX:sys_call:IPC掩码从1到1拒绝SENDREC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆