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>
Mon, 30 Dec 2019 13:15:49 +0000 (13:15 +0000)
commitc97a6dd542cd490ebebdfcb66b163dc70fc2bc56
tree273e2259c78a6c8c528e847eec592d580e768963
parent03e6afedbfaead0028dad5e44cc6f0c780fdbb33
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