From 45916cd2fec6e79bca5dee0421bd39e3c2910d1e Mon Sep 17 00:00:00 2001 From: jpk Date: Fri, 24 Mar 2006 12:29:20 -0800 Subject: PSARC/2002/762 Layered Trusted Solaris PSARC/2005/060 TSNET: Trusted Networking with Security Labels PSARC/2005/259 Layered Trusted Solaris Label Interfaces PSARC/2005/573 Solaris Trusted Extensions for Printing PSARC/2005/691 Trusted Extensions for Device Allocation PSARC/2005/723 Solaris Trusted Extensions Filesystem Labeling PSARC/2006/009 Labeled Auditing PSARC/2006/155 Trusted Extensions RBAC Changes PSARC/2006/191 is_system_labeled 6293271 Zone processes should use zone_kcred instead of kcred 6394554 integrate Solaris Trusted Extensions --HG-- rename : usr/src/cmd/dminfo/Makefile => deleted_files/usr/src/cmd/dminfo/Makefile rename : usr/src/cmd/dminfo/dminfo.c => usr/src/cmd/allocate/dminfo.c --- usr/src/cmd/devfsadm/i386/misc_link_i386.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'usr/src/cmd/devfsadm/i386/misc_link_i386.c') diff --git a/usr/src/cmd/devfsadm/i386/misc_link_i386.c b/usr/src/cmd/devfsadm/i386/misc_link_i386.c index 484214dfa7..1e400531bc 100644 --- a/usr/src/cmd/devfsadm/i386/misc_link_i386.c +++ b/usr/src/cmd/devfsadm/i386/misc_link_i386.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -34,6 +33,9 @@ #include #include #include +#include + +extern int system_labeled; static int lp(di_minor_t minor, di_node_t node); static int serial_dialout(di_minor_t minor, di_node_t node); @@ -151,16 +153,20 @@ vt00(di_minor_t minor, di_node_t node) static int diskette(di_minor_t minor, di_node_t node) { + int flags = 0; char *a2; char link[PATH_MAX]; char *addr = di_bus_addr(node); char *mn = di_minor_name(minor); + if (system_labeled) + flags = DA_ADD|DA_FLOPPY; + if (strcmp(addr, "0,0") == 0) { if (strcmp(mn, "c") == 0) { - (void) devfsadm_mklink("diskette", node, minor, 0); + (void) devfsadm_mklink("diskette", node, minor, flags); } else if (strcmp(mn, "c,raw") == 0) { - (void) devfsadm_mklink("rdiskette", node, minor, 0); + (void) devfsadm_mklink("rdiskette", node, minor, flags); } } @@ -171,11 +177,13 @@ diskette(di_minor_t minor, di_node_t node) if (strcmp(mn, "c") == 0) { (void) strcpy(link, "diskette"); (void) strcat(link, a2); - (void) devfsadm_mklink(link, node, minor, 0); + (void) devfsadm_mklink(link, node, minor, + flags); } else if (strcmp(mn, "c,raw") == 0) { (void) strcpy(link, "rdiskette"); (void) strcat(link, a2); - (void) devfsadm_mklink(link, node, minor, 0); + (void) devfsadm_mklink(link, node, minor, + flags); } } } -- cgit v1.2.3