How to get root on Ubuntu 20.04 by pretending nobody’s /home
The root cause is a very common bug: treating no response as an empty response.  It's usually caused by missing or bad error handling.  Some libraries and RPC APIs make it impossible to differentiate between the two cases.<p>I've recently learned a lot of Rust.  Rust's std::result::Result type [1] helps avoid this error.  I think it is superior to the error handling facilities in other languages:<p>- C: errno, boolean return values, `null`<p>- C++: exceptions, errno, boolean return values, `null`; std::expected<T,E> is being developed<p>- Java: exceptions, `null`, Optional<T><p>- Golang: `nil`, `error`, `if err != nil { return nil, err }` boilerplate<p>- Javascript: `undefined`, exceptions, futures<p>- Python: exceptions, `None`, boolean return values<p>- Swift: exceptions, `nil`, `try?`, optional values<p>- Dart: exceptions, futures, `null`<p>Would it be worthwhile to create Result-like error handling libraries for the major languages?<p>[1]: <a href="https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html" rel="nofollow">https://doc.rust-lang.org/book/ch09-02-recoverable-errors-wi...</a>