tmpfs: return ENXIO if trying to open socket

This commit is contained in:
Matheus
2024-08-22 00:02:03 -03:00
parent 0adbb989ef
commit c5531bc12b
+4
View File
@@ -160,6 +160,10 @@ static int tmpfs_open(vnode_t **nodep, int flags, cred_t *cred) {
tmpfsnode_t *tmpnode = (tmpfsnode_t *)node;
int error = 0;
if (node->type == V_TYPE_SOCKET)
return ENXIO;
if (node->type == V_TYPE_CHDEV || node->type == V_TYPE_BLKDEV) {
vnode_t *devnode;
error = devfs_getnode(node, tmpnode->attr.rdevmajor, tmpnode->attr.rdevminor, &devnode);