Ensure file-based program artifacts are restricted to the current user#48813
Ensure file-based program artifacts are restricted to the current user#48813jjonescz merged 5 commits intodotnet:mainfrom
Conversation
| // The directory might have been created by someone else, set its permissions again to be sure. | ||
| new DirectoryInfo(directory).UnixFileMode = mode; |
There was a problem hiding this comment.
So this is a change from what we had previously said right? I thought we'd said we would ensure the permissions were set on creation but not if the directory already existed, given the directory path is derived from the entry-point file path and under our own sub-directory. If this is effectively free perf-wise and we're not concerned about some odd edge case potentially causing this to flip owners on each run, then it's likely fine.
There was a problem hiding this comment.
I forgot we said that, makes sense, I will remove this, thanks.
|
@dotnet/run-file for reviews, thanks |
| .And.HaveStdOut("Changed"); | ||
| } | ||
|
|
||
| [Fact] |
There was a problem hiding this comment.
nit: We have a LinuxOnlyFact if you want to use that instead. Or a PlatformSpecificFact that takes an or'ed set of platform flags.
There was a problem hiding this comment.
Didn't find LinuxOnlyFact actually, but PlatformSpecificFact(TestPlatforms.AnyUnix) looks good, thanks.
|
@chsienki for a review, thanks |
No description provided.