]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't leave `path` behind when executing `:chflags_success`
authorngie <ngie@FreeBSD.org>
Sun, 12 Jul 2020 17:16:57 +0000 (17:16 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 12 Jul 2020 17:16:57 +0000 (17:16 +0000)
commite8cfa623e9c29430a9d1d39f311e600bd6982204
treec15ab51a5f087e4b294e62567a46ed6e49544f51
parent698f5c2b8cbfbe4a27a8c62341e8e6a3a9389a00
Don't leave `path` behind when executing `:chflags_success`

Prior to this change a `SF_IMMUTABLE` chflagsat(2)'ed file (`path`) was left
behind, which sabotaged kyua(1) from being able to clean up the work directory,
This resulted in unnecessary work for folks having to clean up the work
directory on non-disposable systems, which defaults to `/tmp`. Use `UF_OFFLINE`
instead of `SF_IMMUTABLE`, in part because setting `SF_IMMUTABLE` isn't relevant
to the test and `SF_IMMUTABLE` cannot be cleared at all securelevels, as pointed
out by @asomers.

Additional work is required to catch cases like this upfront in the future to
avoid tester headache. See PR # 247765 for more details/followup.

Suggested by: asomers
Reviewed By: asomers, #tests
MFC after: 1 week
PR: 247761
Sponsored by: DellEMC
Differential Revision: https://reviews.freebsd.org/D25561
tests/sys/audit/file-attribute-modify.c