MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ socket_directory_is_safe()

bool MayaFlux::Platform::detail::socket_directory_is_safe ( const std::filesystem::path & directory)
inline

Definition at line 94 of file UnixSocket.hpp.

95 {
96#if defined(MAYAFLUX_PLATFORM_WINDOWS)
97 (void)directory;
98 return true;
99#else
100 std::error_code ec;
101 const auto status = std::filesystem::status(directory, ec);
102 if (ec) {
103 return false;
104 }
105 const auto permissions = status.permissions();
106 const bool others_write = (permissions & std::filesystem::perms::others_write) != std::filesystem::perms::none;
107 const bool sticky = (permissions & std::filesystem::perms::sticky_bit) != std::filesystem::perms::none;
108 return !others_write || sticky;
109#endif
110 }

Referenced by MayaFlux::Platform::acquire_unix_socket().

Here is the caller graph for this function: