Page MenuHomeFreeBSD

certctl: Enforce 0444 mode on new files
ClosedPublic

Authored by ivy on Fri, Jul 17, 3:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 6, 12:39 PM
Unknown Object (File)
Thu, Aug 6, 11:31 AM
Unknown Object (File)
Thu, Aug 6, 4:25 AM
Unknown Object (File)
Wed, Aug 5, 11:18 PM
Unknown Object (File)
Sun, Aug 2, 6:39 PM
Unknown Object (File)
Sat, Aug 1, 8:05 AM
Unknown Object (File)
Sat, Aug 1, 7:35 AM
Unknown Object (File)
Fri, Jul 31, 6:11 AM
Subscribers

Details

Summary

When writing to a file, call fchmod() to ensure the file mode matches
the intended mode, which is 0444. This was already done when replacing
an existing file, but not when creating a new file, which meant if the
process umask was 077, the resulting certificates and bundle would be
unreadable by unprivileged users.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74882
Build 71765: arc lint + arc unit