mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 15:41:58 -07:00
filesystem: Set the sticky bit on /tmp/hypr
(#4199)
To prevent unprivileged users from deleting other users' files.
This commit is contained in:
@@ -50,7 +50,7 @@ CCompositor::CCompositor() {
|
|||||||
|
|
||||||
if (!std::filesystem::exists("/tmp/hypr")) {
|
if (!std::filesystem::exists("/tmp/hypr")) {
|
||||||
std::filesystem::create_directory("/tmp/hypr");
|
std::filesystem::create_directory("/tmp/hypr");
|
||||||
std::filesystem::permissions("/tmp/hypr", std::filesystem::perms::all, std::filesystem::perm_options::replace);
|
std::filesystem::permissions("/tmp/hypr", std::filesystem::perms::all | std::filesystem::perms::sticky_bit, std::filesystem::perm_options::replace);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto INSTANCEPATH = "/tmp/hypr/" + m_szInstanceSignature;
|
const auto INSTANCEPATH = "/tmp/hypr/" + m_szInstanceSignature;
|
||||||
|
Reference in New Issue
Block a user