4 ms·
> If you want to have fun, try calling revoke(2) on character devices that are not TTYs. I remember fixing a bug in FreeBSD once, where you could make the syst
by brynet 6y ago
> If you want to have fun, try calling revoke(2) on character devices that are not TTYs. I remember fixing a bug in FreeBSD once, where you could make the system panic by calling that function on /dev/bpf.
IIRC there's a lot of problems with revoke(2) on anything that's not a tty device, so on OpenBSD revoke(2) returns ENOTTY in those cases.
https://github.com/openbsd/src/commit/0aefaaaa63aa6de2ea734ff2b9d0ba250d3cef5f https://github.com/openbsd/src/commit/0aefaaaa63aa6de2ea734f...
https://github.com/openbsd/src/commit/205dd0b22f2c32de7bacbd784378000713599ff2 https://github.com/openbsd/src/commit/205dd0b22f2c32de7bacbd...
This was discovered earlier on during pledge(2) development.