Page MenuHomeFreeBSD

clear_tmp: Remove all chflags bits in /tmp before the clear proccess is initiated
AbandonedPublic

Authored by gbe on Jul 1 2020, 10:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 8:15 AM
Unknown Object (File)
Mar 23 2024, 12:15 PM
Unknown Object (File)
Dec 29 2023, 7:29 AM
Unknown Object (File)
Dec 20 2023, 3:16 AM
Unknown Object (File)
Nov 29 2023, 8:51 PM
Unknown Object (File)
Nov 2 2023, 9:31 PM
Unknown Object (File)
Oct 31 2023, 9:32 PM
Unknown Object (File)
Sep 29 2023, 9:33 PM
Subscribers

Details

Reviewers
None
Group Reviewers
Contributor Reviews (src)
Src Committers
Summary

Remove all chflags bits in /tmp before the clear proccess is initiated

I know that this is a little bit controversial, but in my opinion an rc option
named clear_tmp_enable should empty /tmp no matter what options are set for
files and directory in a temp directory.

Test Plan

Creation of files and directories that have the immutable flag set and
a followed system reboot. The /tmp directory should be empty.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32086
Build 29607: arc lint + arc unit

Event Timeline

gbe requested review of this revision.Jul 1 2020, 10:40 AM
gbe created this revision.

I also feel it is a bit controversial, if we set the immutable flag then we probably don't want it get deleted (then why put it under /tmp?)

Maybe we can have another flag, say, clear_tmp_remove_flags or something like that to explicitly state that we want to remove the flags.

gbe added a subscriber: ngie.

@lwhsu The original problem was about undeletable files after a kyua ran. @ngie has fixed them a while ago. I am also using tmpfs now, so I would think that this differential was overcome by events.

This shouldn't be committed to head.