https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212861
Bug ID: 212861
Summary: [tmpfs] uchg files can be removed by root
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
This issue seems to be present on tmpfs, only (it always returns EPERM on UFS).
Not sure about ZFS.
Found by contrib/netbsd-tests/fs/tmpfs/t_remove.sh .
The following command snippets demonstrate the repro:
Invariant tested with UFS:
$ touch /tmp/uchg.file
$ chflags uchg /tmp/uchg.file
$ rm -f /tmp/uchg.file
rm: /tmp/uchg.file: Operation not permitted
$ rm /tmp/uchg.file
override rw-r--r-- ngie/wheel uchg for /tmp/uchg.file? y
rm: /tmp/uchg.file: Operation not permitted
$
Invariant tested with tmpfs:
$ mntpt=/tmp/tmpfs
$ mkdir $mntpt
$ sudo mount -t tmpfs tmpfs $mntpt
$ cd $mntpt
$ touch uchg.file; chflags uchg uchg.file
$ rm -f uchg.file
rm: uchg.file: Operation not permitted
$ sudo rm -f uchg.file
$ ls uchg.file
ls: uchg.file: No such file or directory
$
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"