PERFORCE change 187782 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Jan 13 22:24:20 UTC 2011
http://p4web.freebsd.org/@@187782?ac=10
Change 187782 by trasz at trasz_victim on 2011/01/13 22:23:52
Fix rather obvious thinko in rule matching.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#4 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#4 (text+ko) ====
@@ -396,22 +396,26 @@
switch (filter->hr_subject_type) {
case RCTL_SUBJECT_TYPE_PROCESS:
- if (filter->hr_subject.hs_proc !=
+ if (filter->hr_subject.hs_proc != NULL &&
+ rule->hr_subject.hs_proc !=
filter->hr_subject.hs_proc)
return (0);
break;
case RCTL_SUBJECT_TYPE_USER:
- if (filter->hr_subject.hs_uip !=
+ if (filter->hr_subject.hs_uip != NULL &&
+ rule->hr_subject.hs_uip !=
filter->hr_subject.hs_uip)
return (0);
break;
case RCTL_SUBJECT_TYPE_LOGINCLASS:
- if (filter->hr_subject.hs_loginclass !=
+ if (filter->hr_subject.hs_loginclass != NULL &&
+ rule->hr_subject.hs_loginclass !=
filter->hr_subject.hs_loginclass)
return (0);
break;
case RCTL_SUBJECT_TYPE_JAIL:
- if (filter->hr_subject.hs_prison !=
+ if (filter->hr_subject.hs_prison != NULL &&
+ rule->hr_subject.hs_prison !=
filter->hr_subject.hs_prison)
return (0);
break;
More information about the p4-projects
mailing list