Skip to content

Commit

Permalink
squash! src: add SafeCapGetenv function
Browse files Browse the repository at this point in the history
  • Loading branch information
danbev committed Mar 15, 2021
1 parent c9ed842 commit 72ecccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_credentials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ namespace credentials {
// same).
bool SafeCapGetenv(const char* key, std::string* text) {
#if !defined(__CloudABI__) && !defined(_WIN32)
if (per_process::linux_at_secure && (getuid() != geteuid() ||
getgid() != getegid()) || getuid() == 0) {
if (per_process::linux_at_secure && ((getuid() != geteuid() ||
getgid() != getegid()) || getuid() == 0)) {
goto fail;
}
#endif
Expand Down

0 comments on commit 72ecccd

Please sign in to comment.