You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
synchronize updating the configuration file from multiple processes.
we currently have a read/write lock to protect updating/reading the config file. The lock doesn't help synchronize writing access from multiple processes.
holding the config file in one process (e.g. write access or none share) will cause a new pwsh instance to crash at startup because it cannot access the config file and we don't deal with the IOException.
we could return default value when the config file is not accessible, but need to consider to not allow bypassing security settings because of that.
one option: have two sets of default values for security settings. One set is used when the config file doesn't exist or the security setting is not defined in the file; the other set is used when the file exists but not accessible, to enforce all security features that are configurable in the config file.
Repro step for 4:
First, run the following code to hold the config file of the current pwsh
The tasks that I can think of are:
writeaccess ornoneshare) will cause a new pwsh instance to crash at startup because it cannot access the config file and we don't deal with theIOException.Repro step for 4:
First, run the following code to hold the config file of the current pwsh
Then, start a new instance of the pwsh, and it will crash.