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
Unknown Object (File)
Wed, Jun 26, 6:07 AM
Unknown Object (File)
Wed, Jun 26, 12:50 AM
Unknown Object (File)
Mon, Jun 24, 7:51 PM
Unknown Object (File)
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
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 Passed
Unit
No Test Coverage
Build Status
Buildable 50973
Build 47864: arc lint + arc unit

Event Timeline

sys/security/mac/mac_framework.c
564–565

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

565

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
565

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