Fix self lockout on VDE socket#554
Conversation
|
Weird because this effect seems to contradict the VDE documentation but testing shows the patch is indeed correct. I applied it to ZIMH in this commit; I have no control over the SIMH repository. I used mode 0600 as it appears there was no need to give the socket an execute bit. |
|
Ah whoops, you are right on the permission bits. I think I just had the |
|
Regarding the VDE documentation, @pmetzger where would you say it contradicts it? I think its worded a bit weirdly with "[...] has been left for backwards compatibility", but it only explicitly mentions that the open args can be set to I'm considering making a PR at VDE to maybe ignore the mode if its set to zero since I don't see how that would ever be useful, but arguably VDE shouldn't work around bugs in applications. |
|
The documentation seemed to indicate to me that zero meant defaults would be applied. Anyway, it's rare that I've seen such a simple fix completely correct a problem. Thank you for bringing it to everyone's attention. I hope SIMH also applies it. |
SIMH seems to somewhat quietly lock itself out of its own VDE socket because it sets the permission bits to all zero. I found some resources saying SIMH needs to run as root to use VDE, which seems to also stem from this problem. Now it works without running as root