Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145958335
D7369.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
708 B
Referenced Files
None
Subscribers
None
D7369.diff
View Options
Index: head/sys/kern/sys_capability.c
===================================================================
--- head/sys/kern/sys_capability.c
+++ head/sys/kern/sys_capability.c
@@ -150,16 +150,13 @@
_cap_check(const cap_rights_t *havep, const cap_rights_t *needp,
enum ktr_cap_fail_type type)
{
- int i;
- for (i = 0; i < nitems(havep->cr_rights); i++) {
- if (!cap_rights_contains(havep, needp)) {
+ if (!cap_rights_contains(havep, needp)) {
#ifdef KTRACE
- if (KTRPOINT(curthread, KTR_CAPFAIL))
- ktrcapfail(type, needp, havep);
+ if (KTRPOINT(curthread, KTR_CAPFAIL))
+ ktrcapfail(type, needp, havep);
#endif
- return (ENOTCAPABLE);
- }
+ return (ENOTCAPABLE);
}
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 1:11 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29030777
Default Alt Text
D7369.diff (708 B)
Attached To
Mode
D7369: Eliminate unnecessary loop in _cap_check()
Attached
Detach File
Event Timeline
Log In to Comment