FYI for those with outstanding patches against src/sys/kern/kern_mac.c (source code rearrangement)

Robert Watson rwatson at FreeBSD.org
Tue Oct 21 02:36:51 GMT 2003


I'm in the throes of breaking out kern_mac.c into multiple source files
due to its unwieldy size, the difficulty in ordering and organizing so
many functions, and that fact that it had become the second largest source
file in src/sys/kern all suggested it was overdue.  After some
experimentation, I've broken it down into files by subsystem, as follows:

 src/sys/kern/kern_mac.c

    MAC Framework initialization, common infrastructure, system calls. 

 src/sys/sys/mac.h

    APIs and definitions between kernel and MAC Framework, APIs and
    definitions for userspace applications. 

 src/sys/sys/mac_policy.h

    APIs and definitions for MAC policy modules.

 src/sys/security/mac/mac_internal.h

    APIs and definitions internal to the MAC Framework.

 src/sys/security/mac/mac_net.c
 src/sys/security/mac/mac_pipe.c
 src/sys/security/mac/mac_posix_sem.c
 src/sys/security/mac/mac_system.c
 src/sys/security/mac/mac_sysv_msg.c
 src/sys/security/mac/mac_sysv_sem.c
 src/sys/security/mac/mac_sysv_shm.c
 src/sys/security/mac/mac_vfs.c

    Implementations of entry points, labeling, and infrastructure for
    various subsystems, including the network stack, pipe IPC, POSIX
    semaphores, system privileges and services, System V IPC, and VFS.

Right now, this layout change are in the trustedbsd_mac branch, and I'm
preparing to bring them into the FreeBSD base tree.  In the next couple of
weeks, once the current set of infrastructure changes in the
trustedbsd_sebsd branch has shaken out, I'll merge the layout changes to
there.  I will also likely do a follow-up move of kern_mac.c to
src/sys/security/mac/mac_framework.c once these moves have settled and
it's clear the new split is working.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Network Associates Laboratories

To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-discuss" in the body of the message



More information about the trustedbsd-discuss mailing list