mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 13:25:42 +03:00
filesystem: Set the sticky bit on /tmp/hypr
(#4199)
To prevent unprivileged users from deleting other users' files.
This commit is contained in:
parent
d9b74ff96b
commit
3771c49a94
@ -50,7 +50,7 @@ CCompositor::CCompositor() {
|
||||
|
||||
if (!std::filesystem::exists("/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;
|
||||
|
Loading…
Reference in New Issue
Block a user