]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Pass -restrict-acl, if given, through to sub-PuTTYs.
authorSimon Tatham <anakin@pobox.com>
Sat, 4 Feb 2017 07:57:36 +0000 (07:57 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 4 Feb 2017 07:57:36 +0000 (07:57 +0000)
commitf049690465b09ac950cbafd5b065bafd968f034b
tree6e19b87b9b8fe6afbbd1ee7986a10c68d5f1068a
parent095072fa46b2d7b8beafaddb2f873d2f500a1e10
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.
cmdline.c
windows/window.c
windows/winstuff.h