From c1add58abb88e84c48c437d66e10fcd136f6d408 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 11 Apr 2008 20:43:40 +0000 Subject: [PATCH] Resolved TODOs: We now do know whether the call comes from userland or the kernel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24919 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/network/protocols/unix/UnixEndpoint.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp b/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp index 2ab97f0e16..5de897e4f2 100644 --- a/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/unix/UnixEndpoint.cpp @@ -193,11 +193,10 @@ UnixEndpoint::Bind(const struct sockaddr *_address) if (pathLen == 0 || pathLen == sizeof(address->sun_path)) RETURN_ERROR(B_BAD_VALUE); - bool kernel = false; - // TODO: We don't have the info at this point! struct vnode* vnode; status_t error = vfs_create_special_node(address->sun_path, - NULL, S_IFSOCK | 0644, 0, kernel, NULL, &vnode); + NULL, S_IFSOCK | 0644, 0, !gStackModule->is_syscall(), NULL, + &vnode); if (error != B_OK) RETURN_ERROR(error == B_FILE_EXISTS ? EADDRINUSE : error); @@ -295,11 +294,9 @@ UnixEndpoint::Connect(const struct sockaddr *_address) if (pathLen == 0 || pathLen == sizeof(address->sun_path)) RETURN_ERROR(B_BAD_VALUE); - bool kernel = false; - // TODO: We don't have the info at this point! struct stat st; status_t error = vfs_read_stat(-1, address->sun_path, true, &st, - kernel); + !gStackModule->is_syscall()); if (error != B_OK) RETURN_ERROR(error);