mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 01:57:40 -05:00
Pass -restrict-acl, if given, through to sub-PuTTYs.
This change applies to every situation when GUI PuTTY knowingly spawns another GUI PuTTY, to wit, the System menu options 'New Session', 'Duplicate Session' and the 'Saved Sessions' submenu. (Literally speaking, what we actually pass through to the sub-PuTTY's command line is not the "-restrict-acl" option itself, but a special prefix "&R", which has the same meaning but which lives in the special pre-argv-splitting command-line namespace like the magic options used for Duplicate Session and the old '@sessionname' prefix which the Saved Sessions submenu still uses. Otherwise, by the time we split up argv and recognised -restrict-acl, it would be too late to parse those other options.) One case in which PuTTY spawns a subprocess and this change _doesn't_ apply is when the subprocess is a proxy command which happens to be a Plink. Recognising Plink commands in that situation would be fragile and unreliable, and in any case if the user wants a proxy Plink to be ACL-restricted, they are in control of its exact command line so they can add -restrict-acl themselves.
This commit is contained in: