mac_stub.c revision 106788
1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network 9 * Associates Laboratories, the Security Research Division of Network 10 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), 11 * as part of the DARPA CHATS research program. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: 16 * 1. Redistributions of source code must retain the above copyright 17 * notice, this list of conditions and the following disclaimer. 18 * 2. Redistributions in binary form must reproduce the above copyright 19 * notice, this list of conditions and the following disclaimer in the 20 * documentation and/or other materials provided with the distribution. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 106788 2002-11-12 04:20:36Z rwatson $ 35 */ 36 37/* 38 * Developed by the TrustedBSD Project. 39 * Generic mandatory access module that does nothing. 40 */ 41 42#include <sys/types.h> 43#include <sys/param.h> 44#include <sys/acl.h> 45#include <sys/conf.h> 46#include <sys/extattr.h> 47#include <sys/kernel.h> 48#include <sys/mac.h> 49#include <sys/mount.h> 50#include <sys/proc.h> 51#include <sys/systm.h> 52#include <sys/sysproto.h> 53#include <sys/sysent.h> 54#include <sys/vnode.h> 55#include <sys/file.h> 56#include <sys/socket.h> 57#include <sys/socketvar.h> 58#include <sys/pipe.h> 59#include <sys/sysctl.h> 60 61#include <fs/devfs/devfs.h> 62 63#include <net/bpfdesc.h> 64#include <net/if.h> 65#include <net/if_types.h> 66#include <net/if_var.h> 67 68#include <netinet/in.h> 69#include <netinet/ip_var.h> 70 71#include <vm/vm.h> 72 73#include <sys/mac_policy.h> 74 75SYSCTL_DECL(_security_mac); 76 77SYSCTL_NODE(_security_mac, OID_AUTO, none, CTLFLAG_RW, 0, 78 "TrustedBSD mac_none policy controls"); 79 80static int mac_none_enabled = 0; 81SYSCTL_INT(_security_mac_none, OID_AUTO, enabled, CTLFLAG_RW, 82 &mac_none_enabled, 0, "Enforce none policy"); 83 84/* 85 * Policy module operations. 86 */ 87static void 88mac_none_destroy(struct mac_policy_conf *conf) 89{ 90 91} 92 93static void 94mac_none_init(struct mac_policy_conf *conf) 95{ 96 97} 98 99static int 100mac_none_syscall(struct thread *td, int call, void *arg) 101{ 102 103 return (0); 104} 105 106/* 107 * Label operations. 108 */ 109static void 110mac_none_init_label(struct label *label) 111{ 112 113} 114 115static int 116mac_none_init_label_waitcheck(struct label *label, int flag) 117{ 118 119 return (0); 120} 121 122static void 123mac_none_destroy_label(struct label *label) 124{ 125 126} 127 128static int 129mac_none_externalize_label(struct label *label, char *element_name, 130 char *element_data, size_t size, size_t *len, int *claimed) 131{ 132 133 return (0); 134} 135 136static int 137mac_none_internalize_label(struct label *label, char *element_name, 138 char *element_data, int *claimed) 139{ 140 141 return (0); 142} 143 144/* 145 * Labeling event operations: file system objects, and things that look 146 * a lot like file system objects. 147 */ 148static void 149mac_none_associate_vnode_devfs(struct mount *mp, struct label *fslabel, 150 struct devfs_dirent *de, struct label *delabel, struct vnode *vp, 151 struct label *vlabel) 152{ 153 154} 155 156static int 157mac_none_associate_vnode_extattr(struct mount *mp, struct label *fslabel, 158 struct vnode *vp, struct label *vlabel) 159{ 160 161 return (0); 162} 163 164static void 165mac_none_associate_vnode_singlelabel(struct mount *mp, 166 struct label *fslabel, struct vnode *vp, struct label *vlabel) 167{ 168 169} 170 171static void 172mac_none_create_devfs_device(dev_t dev, struct devfs_dirent *devfs_dirent, 173 struct label *label) 174{ 175 176} 177 178static void 179mac_none_create_devfs_directory(char *dirname, int dirnamelen, 180 struct devfs_dirent *devfs_dirent, struct label *label) 181{ 182 183} 184 185static void 186mac_none_create_devfs_symlink(struct ucred *cred, struct devfs_dirent *dd, 187 struct label *ddlabel, struct devfs_dirent *de, struct label *delabel) 188{ 189 190} 191 192static int 193mac_none_create_vnode_extattr(struct ucred *cred, struct mount *mp, 194 struct label *fslabel, struct vnode *dvp, struct label *dlabel, 195 struct vnode *vp, struct label *vlabel, struct componentname *cnp) 196{ 197 198 return (0); 199} 200 201static void 202mac_none_create_mount(struct ucred *cred, struct mount *mp, 203 struct label *mntlabel, struct label *fslabel) 204{ 205 206} 207 208static void 209mac_none_create_root_mount(struct ucred *cred, struct mount *mp, 210 struct label *mntlabel, struct label *fslabel) 211{ 212 213} 214 215static void 216mac_none_relabel_vnode(struct ucred *cred, struct vnode *vp, 217 struct label *vnodelabel, struct label *label) 218{ 219 220} 221 222static int 223mac_none_setlabel_vnode_extattr(struct ucred *cred, struct vnode *vp, 224 struct label *vlabel, struct label *intlabel) 225{ 226 227 return (0); 228} 229 230static void 231mac_none_update_devfsdirent(struct devfs_dirent *devfs_dirent, 232 struct label *direntlabel, struct vnode *vp, struct label *vnodelabel) 233{ 234 235} 236 237/* 238 * Labeling event operations: IPC object. 239 */ 240static void 241mac_none_create_mbuf_from_socket(struct socket *so, struct label *socketlabel, 242 struct mbuf *m, struct label *mbuflabel) 243{ 244 245} 246 247static void 248mac_none_create_socket(struct ucred *cred, struct socket *socket, 249 struct label *socketlabel) 250{ 251 252} 253 254static void 255mac_none_create_pipe(struct ucred *cred, struct pipe *pipe, 256 struct label *pipelabel) 257{ 258 259} 260 261static void 262mac_none_create_socket_from_socket(struct socket *oldsocket, 263 struct label *oldsocketlabel, struct socket *newsocket, 264 struct label *newsocketlabel) 265{ 266 267} 268 269static void 270mac_none_relabel_socket(struct ucred *cred, struct socket *socket, 271 struct label *socketlabel, struct label *newlabel) 272{ 273 274} 275 276static void 277mac_none_relabel_pipe(struct ucred *cred, struct pipe *pipe, 278 struct label *pipelabel, struct label *newlabel) 279{ 280 281} 282 283static void 284mac_none_set_socket_peer_from_mbuf(struct mbuf *mbuf, struct label *mbuflabel, 285 struct socket *socket, struct label *socketpeerlabel) 286{ 287 288} 289 290static void 291mac_none_set_socket_peer_from_socket(struct socket *oldsocket, 292 struct label *oldsocketlabel, struct socket *newsocket, 293 struct label *newsocketpeerlabel) 294{ 295 296} 297 298/* 299 * Labeling event operations: network objects. 300 */ 301static void 302mac_none_create_bpfdesc(struct ucred *cred, struct bpf_d *bpf_d, 303 struct label *bpflabel) 304{ 305 306} 307 308static void 309mac_none_create_datagram_from_ipq(struct ipq *ipq, struct label *ipqlabel, 310 struct mbuf *datagram, struct label *datagramlabel) 311{ 312 313} 314 315static void 316mac_none_create_fragment(struct mbuf *datagram, struct label *datagramlabel, 317 struct mbuf *fragment, struct label *fragmentlabel) 318{ 319 320} 321 322static void 323mac_none_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel) 324{ 325 326} 327 328static void 329mac_none_create_ipq(struct mbuf *fragment, struct label *fragmentlabel, 330 struct ipq *ipq, struct label *ipqlabel) 331{ 332 333} 334 335static void 336mac_none_create_mbuf_from_mbuf(struct mbuf *oldmbuf, 337 struct label *oldmbuflabel, struct mbuf *newmbuf, 338 struct label *newmbuflabel) 339{ 340 341} 342 343static void 344mac_none_create_mbuf_linklayer(struct ifnet *ifnet, struct label *ifnetlabel, 345 struct mbuf *mbuf, struct label *mbuflabel) 346{ 347 348} 349 350static void 351mac_none_create_mbuf_from_bpfdesc(struct bpf_d *bpf_d, struct label *bpflabel, 352 struct mbuf *mbuf, struct label *mbuflabel) 353{ 354 355} 356 357static void 358mac_none_create_mbuf_from_ifnet(struct ifnet *ifnet, struct label *ifnetlabel, 359 struct mbuf *m, struct label *mbuflabel) 360{ 361 362} 363 364static void 365mac_none_create_mbuf_multicast_encap(struct mbuf *oldmbuf, 366 struct label *oldmbuflabel, struct ifnet *ifnet, struct label *ifnetlabel, 367 struct mbuf *newmbuf, struct label *newmbuflabel) 368{ 369 370} 371 372static void 373mac_none_create_mbuf_netlayer(struct mbuf *oldmbuf, 374 struct label *oldmbuflabel, struct mbuf *newmbuf, struct label *newmbuflabel) 375{ 376 377} 378 379static int 380mac_none_fragment_match(struct mbuf *fragment, struct label *fragmentlabel, 381 struct ipq *ipq, struct label *ipqlabel) 382{ 383 384 return (1); 385} 386 387static void 388mac_none_relabel_ifnet(struct ucred *cred, struct ifnet *ifnet, 389 struct label *ifnetlabel, struct label *newlabel) 390{ 391 392} 393 394static void 395mac_none_update_ipq(struct mbuf *fragment, struct label *fragmentlabel, 396 struct ipq *ipq, struct label *ipqlabel) 397{ 398 399} 400 401/* 402 * Labeling event operations: processes. 403 */ 404static void 405mac_none_create_cred(struct ucred *cred_parent, struct ucred *cred_child) 406{ 407 408} 409 410static void 411mac_none_execve_transition(struct ucred *old, struct ucred *new, 412 struct vnode *vp, struct label *vnodelabel, 413 struct label *interpvnodelabel, struct image_params *imgp, 414 struct label *execlabel) 415{ 416 417} 418 419static int 420mac_none_execve_will_transition(struct ucred *old, struct vnode *vp, 421 struct label *vnodelabel, struct label *interpvnodelabel, 422 struct image_params *imgp, struct label *execlabel) 423{ 424 425 return (0); 426} 427 428static void 429mac_none_create_proc0(struct ucred *cred) 430{ 431 432} 433 434static void 435mac_none_create_proc1(struct ucred *cred) 436{ 437 438} 439 440static void 441mac_none_relabel_cred(struct ucred *cred, struct label *newlabel) 442{ 443 444} 445 446/* 447 * Access control checks. 448 */ 449static int 450mac_none_check_bpfdesc_receive(struct bpf_d *bpf_d, struct label *bpflabel, 451 struct ifnet *ifnet, struct label *ifnet_label) 452{ 453 454 return (0); 455} 456 457static int 458mac_none_check_cred_relabel(struct ucred *cred, struct label *newlabel) 459{ 460 461 return (0); 462} 463 464static int 465mac_none_check_cred_visible(struct ucred *u1, struct ucred *u2) 466{ 467 468 return (0); 469} 470 471static int 472mac_none_check_ifnet_relabel(struct ucred *cred, struct ifnet *ifnet, 473 struct label *ifnetlabel, struct label *newlabel) 474{ 475 476 return (0); 477} 478 479static int 480mac_none_check_ifnet_transmit(struct ifnet *ifnet, struct label *ifnetlabel, 481 struct mbuf *m, struct label *mbuflabel) 482{ 483 484 return (0); 485} 486 487static int 488mac_none_check_mount_stat(struct ucred *cred, struct mount *mp, 489 struct label *mntlabel) 490{ 491 492 return (0); 493} 494 495static int 496mac_none_check_pipe_ioctl(struct ucred *cred, struct pipe *pipe, 497 struct label *pipelabel, unsigned long cmd, void /* caddr_t */ *data) 498{ 499 500 return (0); 501} 502 503static int 504mac_none_check_pipe_poll(struct ucred *cred, struct pipe *pipe, 505 struct label *pipelabel) 506{ 507 508 return (0); 509} 510 511static int 512mac_none_check_pipe_read(struct ucred *cred, struct pipe *pipe, 513 struct label *pipelabel) 514{ 515 516 return (0); 517} 518 519static int 520mac_none_check_pipe_relabel(struct ucred *cred, struct pipe *pipe, 521 struct label *pipelabel, struct label *newlabel) 522{ 523 524 return (0); 525} 526 527static int 528mac_none_check_pipe_stat(struct ucred *cred, struct pipe *pipe, 529 struct label *pipelabel) 530{ 531 532 return (0); 533} 534 535static int 536mac_none_check_pipe_write(struct ucred *cred, struct pipe *pipe, 537 struct label *pipelabel) 538{ 539 540 return (0); 541} 542 543static int 544mac_none_check_proc_debug(struct ucred *cred, struct proc *proc) 545{ 546 547 return (0); 548} 549 550static int 551mac_none_check_proc_sched(struct ucred *cred, struct proc *proc) 552{ 553 554 return (0); 555} 556 557static int 558mac_none_check_proc_signal(struct ucred *cred, struct proc *proc, int signum) 559{ 560 561 return (0); 562} 563 564static int 565mac_none_check_socket_bind(struct ucred *cred, struct socket *socket, 566 struct label *socketlabel, struct sockaddr *sockaddr) 567{ 568 569 return (0); 570} 571 572static int 573mac_none_check_socket_connect(struct ucred *cred, struct socket *socket, 574 struct label *socketlabel, struct sockaddr *sockaddr) 575{ 576 577 return (0); 578} 579 580static int 581mac_none_check_socket_deliver(struct socket *so, struct label *socketlabel, 582 struct mbuf *m, struct label *mbuflabel) 583{ 584 585 return (0); 586} 587 588static int 589mac_none_check_socket_listen(struct ucred *cred, struct socket *so, 590 struct label *socketlabel) 591{ 592 593 return (0); 594} 595 596static int 597mac_none_check_socket_relabel(struct ucred *cred, struct socket *socket, 598 struct label *socketlabel, struct label *newlabel) 599{ 600 601 return (0); 602} 603 604static int 605mac_none_check_socket_visible(struct ucred *cred, struct socket *socket, 606 struct label *socketlabel) 607{ 608 609 return (0); 610} 611 612static int 613mac_none_check_system_reboot(struct ucred *cred, int how) 614{ 615 616 return (0); 617} 618 619static int 620mac_none_check_system_swapon(struct ucred *cred, struct vnode *vp, 621 struct label *label) 622{ 623 624 return (0); 625} 626 627static int 628mac_none_check_system_sysctl(struct ucred *cred, int *name, u_int namelen, 629 void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen) 630{ 631 632 return (0); 633} 634 635static int 636mac_none_check_vnode_access(struct ucred *cred, struct vnode *vp, 637 struct label *label, int acc_mode) 638{ 639 640 return (0); 641} 642 643static int 644mac_none_check_vnode_chdir(struct ucred *cred, struct vnode *dvp, 645 struct label *dlabel) 646{ 647 648 return (0); 649} 650 651static int 652mac_none_check_vnode_chroot(struct ucred *cred, struct vnode *dvp, 653 struct label *dlabel) 654{ 655 656 return (0); 657} 658 659static int 660mac_none_check_vnode_create(struct ucred *cred, struct vnode *dvp, 661 struct label *dlabel, struct componentname *cnp, struct vattr *vap) 662{ 663 664 return (0); 665} 666 667static int 668mac_none_check_vnode_delete(struct ucred *cred, struct vnode *dvp, 669 struct label *dlabel, struct vnode *vp, struct label *label, 670 struct componentname *cnp) 671{ 672 673 return (0); 674} 675 676static int 677mac_none_check_vnode_deleteacl(struct ucred *cred, struct vnode *vp, 678 struct label *label, acl_type_t type) 679{ 680 681 return (0); 682} 683 684static int 685mac_none_check_vnode_exec(struct ucred *cred, struct vnode *vp, 686 struct label *label, struct image_params *imgp, 687 struct label *execlabel) 688{ 689 690 return (0); 691} 692 693static int 694mac_none_check_vnode_getacl(struct ucred *cred, struct vnode *vp, 695 struct label *label, acl_type_t type) 696{ 697 698 return (0); 699} 700 701static int 702mac_none_check_vnode_getextattr(struct ucred *cred, struct vnode *vp, 703 struct label *label, int attrnamespace, const char *name, struct uio *uio) 704{ 705 706 return (0); 707} 708 709static int 710mac_none_check_vnode_link(struct ucred *cred, struct vnode *dvp, 711 struct label *dlabel, struct vnode *vp, struct label *label, 712 struct componentname *cnp) 713{ 714 715 return (0); 716} 717 718static int 719mac_none_check_vnode_lookup(struct ucred *cred, struct vnode *dvp, 720 struct label *dlabel, struct componentname *cnp) 721{ 722 723 return (0); 724} 725 726static int 727mac_none_check_vnode_mmap(struct ucred *cred, struct vnode *vp, 728 struct label *label, int prot) 729{ 730 731 return (0); 732} 733 734static int 735mac_none_check_vnode_mprotect(struct ucred *cred, struct vnode *vp, 736 struct label *label, int prot) 737{ 738 739 return (0); 740} 741 742static int 743mac_none_check_vnode_open(struct ucred *cred, struct vnode *vp, 744 struct label *filelabel, int acc_mode) 745{ 746 747 return (0); 748} 749 750static int 751mac_none_check_vnode_poll(struct ucred *active_cred, struct ucred *file_cred, 752 struct vnode *vp, struct label *label) 753{ 754 755 return (0); 756} 757 758static int 759mac_none_check_vnode_read(struct ucred *active_cred, struct ucred *file_cred, 760 struct vnode *vp, struct label *label) 761{ 762 763 return (0); 764} 765 766static int 767mac_none_check_vnode_readdir(struct ucred *cred, struct vnode *vp, 768 struct label *dlabel) 769{ 770 771 return (0); 772} 773 774static int 775mac_none_check_vnode_readlink(struct ucred *cred, struct vnode *vp, 776 struct label *vnodelabel) 777{ 778 779 return (0); 780} 781 782static int 783mac_none_check_vnode_relabel(struct ucred *cred, struct vnode *vp, 784 struct label *vnodelabel, struct label *newlabel) 785{ 786 787 return (0); 788} 789 790static int 791mac_none_check_vnode_rename_from(struct ucred *cred, struct vnode *dvp, 792 struct label *dlabel, struct vnode *vp, struct label *label, 793 struct componentname *cnp) 794{ 795 796 return (0); 797} 798 799static int 800mac_none_check_vnode_rename_to(struct ucred *cred, struct vnode *dvp, 801 struct label *dlabel, struct vnode *vp, struct label *label, int samedir, 802 struct componentname *cnp) 803{ 804 805 return (0); 806} 807 808static int 809mac_none_check_vnode_revoke(struct ucred *cred, struct vnode *vp, 810 struct label *label) 811{ 812 813 return (0); 814} 815 816static int 817mac_none_check_vnode_setacl(struct ucred *cred, struct vnode *vp, 818 struct label *label, acl_type_t type, struct acl *acl) 819{ 820 821 return (0); 822} 823 824static int 825mac_none_check_vnode_setextattr(struct ucred *cred, struct vnode *vp, 826 struct label *label, int attrnamespace, const char *name, struct uio *uio) 827{ 828 829 return (0); 830} 831 832static int 833mac_none_check_vnode_setflags(struct ucred *cred, struct vnode *vp, 834 struct label *label, u_long flags) 835{ 836 837 return (0); 838} 839 840static int 841mac_none_check_vnode_setmode(struct ucred *cred, struct vnode *vp, 842 struct label *label, mode_t mode) 843{ 844 845 return (0); 846} 847 848static int 849mac_none_check_vnode_setowner(struct ucred *cred, struct vnode *vp, 850 struct label *label, uid_t uid, gid_t gid) 851{ 852 853 return (0); 854} 855 856static int 857mac_none_check_vnode_setutimes(struct ucred *cred, struct vnode *vp, 858 struct label *label, struct timespec atime, struct timespec mtime) 859{ 860 861 return (0); 862} 863 864static int 865mac_none_check_vnode_stat(struct ucred *active_cred, struct ucred *file_cred, 866 struct vnode *vp, struct label *label) 867{ 868 869 return (0); 870} 871 872static int 873mac_none_check_vnode_write(struct ucred *active_cred, 874 struct ucred *file_cred, struct vnode *vp, struct label *label) 875{ 876 877 return (0); 878} 879 880static struct mac_policy_ops mac_none_ops = 881{ 882 .mpo_destroy = mac_none_destroy, 883 .mpo_init = mac_none_init, 884 .mpo_syscall = mac_none_syscall, 885 .mpo_init_bpfdesc_label = mac_none_init_label, 886 .mpo_init_cred_label = mac_none_init_label, 887 .mpo_init_devfsdirent_label = mac_none_init_label, 888 .mpo_init_ifnet_label = mac_none_init_label, 889 .mpo_init_ipq_label = mac_none_init_label, 890 .mpo_init_mbuf_label = mac_none_init_label_waitcheck, 891 .mpo_init_mount_label = mac_none_init_label, 892 .mpo_init_mount_fs_label = mac_none_init_label, 893 .mpo_init_pipe_label = mac_none_init_label, 894 .mpo_init_socket_label = mac_none_init_label_waitcheck, 895 .mpo_init_socket_peer_label = mac_none_init_label_waitcheck, 896 .mpo_init_vnode_label = mac_none_init_label, 897 .mpo_destroy_bpfdesc_label = mac_none_destroy_label, 898 .mpo_destroy_cred_label = mac_none_destroy_label, 899 .mpo_destroy_devfsdirent_label = mac_none_destroy_label, 900 .mpo_destroy_ifnet_label = mac_none_destroy_label, 901 .mpo_destroy_ipq_label = mac_none_destroy_label, 902 .mpo_destroy_mbuf_label = mac_none_destroy_label, 903 .mpo_destroy_mount_label = mac_none_destroy_label, 904 .mpo_destroy_mount_fs_label = mac_none_destroy_label, 905 .mpo_destroy_pipe_label = mac_none_destroy_label, 906 .mpo_destroy_socket_label = mac_none_destroy_label, 907 .mpo_destroy_socket_peer_label = mac_none_destroy_label, 908 .mpo_destroy_vnode_label = mac_none_destroy_label, 909 .mpo_externalize_cred_label = mac_none_externalize_label, 910 .mpo_externalize_ifnet_label = mac_none_externalize_label, 911 .mpo_externalize_pipe_label = mac_none_externalize_label, 912 .mpo_externalize_socket_label = mac_none_externalize_label, 913 .mpo_externalize_socket_peer_label = mac_none_externalize_label, 914 .mpo_externalize_vnode_label = mac_none_externalize_label, 915 .mpo_internalize_cred_label = mac_none_internalize_label, 916 .mpo_internalize_ifnet_label = mac_none_internalize_label, 917 .mpo_internalize_pipe_label = mac_none_internalize_label, 918 .mpo_internalize_socket_label = mac_none_internalize_label, 919 .mpo_internalize_vnode_label = mac_none_internalize_label, 920 .mpo_associate_vnode_devfs = mac_none_associate_vnode_devfs, 921 .mpo_associate_vnode_extattr = mac_none_associate_vnode_extattr, 922 .mpo_associate_vnode_singlelabel = mac_none_associate_vnode_singlelabel, 923 .mpo_create_devfs_device = mac_none_create_devfs_device, 924 .mpo_create_devfs_directory = mac_none_create_devfs_directory, 925 .mpo_create_devfs_symlink = mac_none_create_devfs_symlink, 926 .mpo_create_vnode_extattr = mac_none_create_vnode_extattr, 927 .mpo_create_mount = mac_none_create_mount, 928 .mpo_create_root_mount = mac_none_create_root_mount, 929 .mpo_relabel_vnode = mac_none_relabel_vnode, 930 .mpo_setlabel_vnode_extattr = mac_none_setlabel_vnode_extattr, 931 .mpo_update_devfsdirent = mac_none_update_devfsdirent, 932 .mpo_create_mbuf_from_socket = mac_none_create_mbuf_from_socket, 933 .mpo_create_pipe = mac_none_create_pipe, 934 .mpo_create_socket = mac_none_create_socket, 935 .mpo_create_socket_from_socket = mac_none_create_socket_from_socket, 936 .mpo_relabel_pipe = mac_none_relabel_pipe, 937 .mpo_relabel_socket = mac_none_relabel_socket, 938 .mpo_set_socket_peer_from_mbuf = mac_none_set_socket_peer_from_mbuf, 939 .mpo_set_socket_peer_from_socket = mac_none_set_socket_peer_from_socket, 940 .mpo_create_bpfdesc = mac_none_create_bpfdesc, 941 .mpo_create_ifnet = mac_none_create_ifnet, 942 .mpo_create_ipq = mac_none_create_ipq, 943 .mpo_create_datagram_from_ipq = mac_none_create_datagram_from_ipq, 944 .mpo_create_fragment = mac_none_create_fragment, 945 .mpo_create_ipq = mac_none_create_ipq, 946 .mpo_create_mbuf_from_mbuf = mac_none_create_mbuf_from_mbuf, 947 .mpo_create_mbuf_linklayer = mac_none_create_mbuf_linklayer, 948 .mpo_create_mbuf_from_bpfdesc = mac_none_create_mbuf_from_bpfdesc, 949 .mpo_create_mbuf_from_ifnet = mac_none_create_mbuf_from_ifnet, 950 .mpo_create_mbuf_multicast_encap = mac_none_create_mbuf_multicast_encap, 951 .mpo_create_mbuf_netlayer = mac_none_create_mbuf_netlayer, 952 .mpo_fragment_match = mac_none_fragment_match, 953 .mpo_relabel_ifnet = mac_none_relabel_ifnet, 954 .mpo_update_ipq = mac_none_update_ipq, 955 .mpo_create_cred = mac_none_create_cred, 956 .mpo_execve_transition = mac_none_execve_transition, 957 .mpo_execve_will_transition = mac_none_execve_will_transition, 958 .mpo_create_proc0 = mac_none_create_proc0, 959 .mpo_create_proc1 = mac_none_create_proc1, 960 .mpo_relabel_cred = mac_none_relabel_cred, 961 .mpo_check_bpfdesc_receive = mac_none_check_bpfdesc_receive, 962 .mpo_check_cred_relabel = mac_none_check_cred_relabel, 963 .mpo_check_cred_visible = mac_none_check_cred_visible, 964 .mpo_check_ifnet_relabel = mac_none_check_ifnet_relabel, 965 .mpo_check_ifnet_transmit = mac_none_check_ifnet_transmit, 966 .mpo_check_mount_stat = mac_none_check_mount_stat, 967 .mpo_check_pipe_ioctl = mac_none_check_pipe_ioctl, 968 .mpo_check_pipe_poll = mac_none_check_pipe_poll, 969 .mpo_check_pipe_read = mac_none_check_pipe_read, 970 .mpo_check_pipe_relabel = mac_none_check_pipe_relabel, 971 .mpo_check_pipe_stat = mac_none_check_pipe_stat, 972 .mpo_check_pipe_write = mac_none_check_pipe_write, 973 .mpo_check_proc_debug = mac_none_check_proc_debug, 974 .mpo_check_proc_sched = mac_none_check_proc_sched, 975 .mpo_check_proc_signal = mac_none_check_proc_signal, 976 .mpo_check_socket_bind = mac_none_check_socket_bind, 977 .mpo_check_socket_connect = mac_none_check_socket_connect, 978 .mpo_check_socket_deliver = mac_none_check_socket_deliver, 979 .mpo_check_socket_listen = mac_none_check_socket_listen, 980 .mpo_check_socket_relabel = mac_none_check_socket_relabel, 981 .mpo_check_socket_visible = mac_none_check_socket_visible, 982 .mpo_check_system_reboot = mac_none_check_system_reboot, 983 .mpo_check_system_swapon = mac_none_check_system_swapon, 984 .mpo_check_system_sysctl = mac_none_check_system_sysctl, 985 .mpo_check_vnode_access = mac_none_check_vnode_access, 986 .mpo_check_vnode_chdir = mac_none_check_vnode_chdir, 987 .mpo_check_vnode_chroot = mac_none_check_vnode_chroot, 988 .mpo_check_vnode_create = mac_none_check_vnode_create, 989 .mpo_check_vnode_delete = mac_none_check_vnode_delete, 990 .mpo_check_vnode_deleteacl = mac_none_check_vnode_deleteacl, 991 .mpo_check_vnode_exec = mac_none_check_vnode_exec, 992 .mpo_check_vnode_getacl = mac_none_check_vnode_getacl, 993 .mpo_check_vnode_getextattr = mac_none_check_vnode_getextattr, 994 .mpo_check_vnode_link = mac_none_check_vnode_link, 995 .mpo_check_vnode_lookup = mac_none_check_vnode_lookup, 996 .mpo_check_vnode_mmap = mac_none_check_vnode_mmap, 997 .mpo_check_vnode_mprotect = mac_none_check_vnode_mprotect, 998 .mpo_check_vnode_open = mac_none_check_vnode_open, 999 .mpo_check_vnode_poll = mac_none_check_vnode_poll, 1000 .mpo_check_vnode_read = mac_none_check_vnode_read, 1001 .mpo_check_vnode_readdir = mac_none_check_vnode_readdir, 1002 .mpo_check_vnode_readlink = mac_none_check_vnode_readlink, 1003 .mpo_check_vnode_relabel = mac_none_check_vnode_relabel, 1004 .mpo_check_vnode_rename_from = mac_none_check_vnode_rename_from, 1005 .mpo_check_vnode_rename_to = mac_none_check_vnode_rename_to, 1006 .mpo_check_vnode_revoke = mac_none_check_vnode_revoke, 1007 .mpo_check_vnode_setacl = mac_none_check_vnode_setacl, 1008 .mpo_check_vnode_setextattr = mac_none_check_vnode_setextattr, 1009 .mpo_check_vnode_setflags = mac_none_check_vnode_setflags, 1010 .mpo_check_vnode_setmode = mac_none_check_vnode_setmode, 1011 .mpo_check_vnode_setowner = mac_none_check_vnode_setowner, 1012 .mpo_check_vnode_setutimes = mac_none_check_vnode_setutimes, 1013 .mpo_check_vnode_stat = mac_none_check_vnode_stat, 1014 .mpo_check_vnode_write = mac_none_check_vnode_write, 1015}; 1016 1017MAC_POLICY_SET(&mac_none_ops, trustedbsd_mac_none, "TrustedBSD MAC/None", 1018 MPC_LOADTIME_FLAG_UNLOADOK, NULL); 1019