Reuse fd in etc file generation and run unlink in thread

Description

PR: https://github.com/truenas/middleware/pull/8466

This contains a few improvements to permissions management in
etc plugin:

  • write_if_changed is updated to allow passing an fd rather than
    only a path name

  • permissions check and file contents check are now run from same
    thread.

  • permissions are set on file before writing.

  • set default permissions on config files to 0644 unless dev
    specifies something different.

Problem/Justification

None

Impact

None

Activity

Bug Clerk 
March 10, 2022 at 2:14 PM

Bug Clerk 
March 8, 2022 at 7:25 PM

Complete

Details

Assignee

Reporter

Labels

Time remaining

0m

Components

Priority

Katalon Platform

Created March 8, 2022 at 6:00 PM
Updated April 19, 2022 at 2:07 PM
Resolved March 8, 2022 at 7:31 PM