openssl/openssl

Add check of result chmod() in RAND_file_name(...)

Open

#25,143 opened on Aug 8, 2024

View on GitHub
 (3 comments) (0 reactions) (1 assignee)C (11,262 forks)batch import
help wantedtriaged: bug

Repository metrics

Stars
 (30,157 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

OpenSSL 3.0.14

In the function RAND_file_name(), chmod(file, 0600) is executed on line 249. But the result of the chmod(...) function execution is not checked. Maybe it is worth checking the result, because chmod(...) should restrict permissions and its successful execution seems important?

Contributor guide