diff options
| author | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2026-09-16 15:22:54 +0000 |
|---|---|---|
| committer | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2026-09-18 18:00:37 +0000 |
| commit | f014795ec3bd5efb88dfc249599e9665dc10a59e (patch) | |
| tree | a62ea8ae87eb3859d0ec799c54e29e2d6e495706 /usr.bin/yes | |
| parent | 1181ac708936d054e07089de7c5b3c1de11a4367 (diff) | |
virtual_oss(8) checks if cuse(3) is loaded. However, kldload(2) ends up calling
kern_kldload that checks permissions first. It is only later on in
linker_load_module that -EEXIST is returned if the module is already loaded.
That means that users that can't load modules, always get a -EPERM error first
even if cuse.ko is already loaded and ready to use.
Change it to check if the kernel module is already loaded and try load it if it
isn't.
In addition move the program's arguments parsing early on because otherwise, a
user can't even access the program's help if cuse.ko is not loaded and the
user doesn't have permissions to do it.
Approved by: obiwac@
Differential Revision: https://reviews.freebsd.org/D59621
Diffstat (limited to 'usr.bin/yes')
0 files changed, 0 insertions, 0 deletions
