Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auth: treat all cert config read errors as missing
Some users explicitly have their home directories set to `/dev/null`. When opening a file that's "under that directory", instead of getting the normal `ENOENT`, one should expect to get `ENOTDIR`. Unfortunately, due to the variety of cases under which `ENOTDIR` is returned, the go team has declined to include ENOTDIR in `ErrNotExist`. (https://golang.org/issues/18974) The most robust solution in this case (following [1]) is to treat any read error as `errSourceUnavailable`. This has the mixed-benefit of also covering EPERM. (hopefully this doesn't make it too hard to track down permissions problems for secure connect users) Resolves: #10696 [1]: https://go-review.googlesource.com/c/oauth2/+/493695
- Loading branch information