chiark / gitweb /
make-secnet-sites: Tainted: Fix a lot of bad return values
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 8 Nov 2019 21:18:05 +0000 (21:18 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 17:08:50 +0000 (17:08 +0000)
commit1ef7f8a5e600aeceadeef49d2cbfc28cb1213f75
tree5f2bef7d360bdeee7a5ecaf6039eb2ff7e4319a4
parent62b494e881ce55b811acb0c96aa10adaeb7c0cfc
make-secnet-sites: Tainted: Fix a lot of bad return values

This code had remnants of a previously intended calling convention,
where object return chaining would be used.

Unfortunately in the currently used calling style, we expect to get a
boolean back everywhere, where true meas `ok'.  Returning `self' is
always treated as `ok' because it's trueish.

Luckily this doesn't cause actual security bugs because we always
return from all of the top-level entrypoints via ._rtn[val] which
checks the ._ok setting, which does properly track problems.  So we
fail an assertion rather than printing a nice message.  This is not
pretty but it is not a vulnerability.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
make-secnet-sites