aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/audit/file-attribute-modify.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* tests/sys/audit: Skip extattr tests if extattrs are not supportedAlex Richardson2021-02-021-44/+62
| | | | | | | | | | | | | In the CheriBSD CI, we run the testsuite with /tmp as tmpfs. This causes the extattr audit tests to fail since tmpfs does not (yet) support extattrs. Skip those tests if the target path is on a file system that does not support extended file attributes. While touching these two files also convert the ATF_REQUIRE_EQ(-1, ...) checks to use ATF_REQURIE_ERRNO(). Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28392
* Don't leave `path` behind when executing `:chflags_success`Enji Cooper2020-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=363132
* Fix audit of chflagsat, lgetfh, and setfibAlan Somers2018-07-221-6/+0
| | | | | | | | | | | | | | These syscalls were always supposed to have been auditted, but due to oversights never were. PR: 228374 Reported by: aniketp Reviewed by: aniketp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16388 Notes: svn path=/head/; revision=336604
* audit(4): add test cases for chflagsat(2), lgetfh(2), setfib(2)Alan Somers2018-07-211-0/+52
| | | | | | | | | | | | | | These three syscalls aren't currently audited correctly, so the tests are marked as expected failures. PR: 228374 Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16379 Notes: svn path=/head/; revision=336580
* audit(4): fix Coverity issuesAlan Somers2018-06-271-1/+1
| | | | | | | | | | | | | | | | | | Fix several incorrect buffer size arguments and a file descriptor leak. Submitted by: aniketp Reported by: Coverity CID: 1393489 1393501 1393509 1393510 1393514 1393515 1393516 CID: 1393517 1393518 1393519 MFC after: 2 weeks X-MFC-With: 335284 X-MFC-With: 335318 X-MFC-With: 335320 Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16000 Notes: svn path=/head/; revision=335703
* audit(4): add tests for utimes(2) and friends, mprotect, and undeleteAlan Somers2018-06-191-0/+267
| | | | | | | | | | | | | Includes utimes(2), futimes(2), lutimes(2), futimesat(2), mprotect(2), and undelete(2). undelete, for now, is tested only in failure mode. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15893 Notes: svn path=/head/; revision=335374
* audit(4): add tests for extattr_set_file and friendsAlan Somers2018-06-181-1/+346
| | | | | | | | | | | | | Includes extattr_{set_file, _set_fd, _set_link, _delete_file, _delete_fd, _delete_link} Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15867 Notes: svn path=/head/; revision=335318
* audit(4): add tests for chflags and friendsAlan Somers2018-06-171-0/+142
| | | | | | | | | | | | chflags, fchflags, and lchflags (but not chflagsat) are included. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15854 Notes: svn path=/head/; revision=335275
* audit(4): add tests for chown(2) and friendsAlan Somers2018-06-161-0/+190
| | | | | | | | | | | | Includes chown, fchown, lchown, and fchownat Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15825 Notes: svn path=/head/; revision=335256
* audit(4): add tests for access(2), chmod(2), and friendsAlan Somers2018-06-151-0/+192
| | | | | | | | | | | | | | access(2), eaccess(2), faccessat(2), chmod(2), fchmod(2), lchmod(2), and fchmodat(2). Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15805 Differential Revision: https://reviews.freebsd.org/D15808 Notes: svn path=/head/; revision=335207
* audit(4): add tests for flock, fcntl, and fsyncAlan Somers2018-06-141-0/+199
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15795 Notes: svn path=/head/; revision=335136