mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +00:00
Kernel: Start adding various file system permission checks.
Fail with EACCES in various situations. Fix userland bugs that were exposed.
This commit is contained in:
parent
43075e5878
commit
f5f136931a
7 changed files with 96 additions and 8 deletions
|
@ -39,13 +39,13 @@ int WSMessageLoop::exec()
|
|||
m_keyboard_fd = open("/dev/keyboard", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
m_mouse_fd = open("/dev/psaux", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||
|
||||
unlink("/wsportal");
|
||||
unlink("/tmp/wsportal");
|
||||
|
||||
m_server_fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
|
||||
ASSERT(m_server_fd >= 0);
|
||||
sockaddr_un address;
|
||||
address.sun_family = AF_LOCAL;
|
||||
strcpy(address.sun_path, "/wsportal");
|
||||
strcpy(address.sun_path, "/tmp/wsportal");
|
||||
int rc = bind(m_server_fd, (const sockaddr*)&address, sizeof(address));
|
||||
ASSERT(rc == 0);
|
||||
rc = listen(m_server_fd, 5);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue