forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 26443: Restrict named mutex files permissions
Restrict named mutex files permissions This change restricts the permission for files created for named mutexes that are not machine wide. Until now, all named mutexes had underlying files with access to all users. With this change, mutexes that are session local have access for the current user only. In addition to that, sticky bit is set for the `/tmp/.dotnet` and `/tmp/.dotnet/shm` directories to ensure that only creator of a subdirectory in these directories can delete the respective file / subdirectory. Here is an overview of the permissions before and after my change. The differences are shown in **bold**. The `somemutexfile` is a file with a name equal to the named mutex name. This file contains data of the mutex. Before: /tmp RWX for all users, sticky bit set /tmp/.dotnet - RWX for all users /tmp/.dotnet/shm - RWX for all users /tmp/.dotnet/shm/global - RWX for all users /tmp/.dotnet/shm/sessionXXXX - RWX for all users /tmp/.dotnet/shm/global/`somemutexfile`- RW for all users /tmp/.dotnet/shm/sessionXXXX/`somemutexfile` - RW for all users After: /tmp - RWX for all users, sticky bit set /tmp/.dotnet - RWX for all users /tmp/.dotnet/shm - RWX for all users, **sticky bit set** /tmp/.dotnet/shm/global - RWX for all users /tmp/.dotnet/shm/sessionXXXX - RWX for **current user only** /tmp/.dotnet/shm/global/`somemutexfile`- RW for all users /tmp/.dotnet/shm/sessionXXXX/`somemutexfile` - RW for **current user only**
- Loading branch information
1 parent
e49bad1
commit d45cd92
Showing
3 changed files
with
42 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters