Page MenuHomeFreeBSD

Honor module dependency order when registering MAC modules.
ClosedPublic

Authored by stevek on Apr 15 2023, 8:49 PM.
Tags
None
Referenced Files
F86662338: D39589.id120605.diff
Sun, Jun 23, 4:02 PM
Unknown Object (File)
Fri, Jun 21, 7:02 AM
Unknown Object (File)
Fri, Jun 21, 6:28 AM
Unknown Object (File)
Fri, Jun 21, 2:50 AM
Unknown Object (File)
Fri, Jun 21, 2:47 AM
Unknown Object (File)
Fri, Jun 21, 2:35 AM
Unknown Object (File)
Fri, Jun 21, 1:49 AM
Unknown Object (File)
Sun, May 26, 11:59 AM
Subscribers

Details

Summary

Ensure MAC modules are inserted in order that they are registered.

Obtained from: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/security/mac/mac_framework.c
566–568

This comment doesn't really apply to the code below anymore. It belongs at the point where we choose the list.

567

This code is just maintaining the order that policies were registered. Whether or not this has anything to do with module dependencies is up to the caller of mac_policy_register(). The comment could explain this more clearly.

sys/security/mac/mac_framework.c
567

Yes, this looks like it's really just a cleanup of the order in the list. sjg originally did the change. I'll adjust the commit log.

stevek edited the summary of this revision. (Show Details)

Updated commit log and source file comments

The last revision just deleted the comment. It would be better to note somewhere that the insertion order actually matters.

This revision is now accepted and ready to land.Apr 18 2023, 3:50 PM