changeset 10941:005529612762

6863533 TX Device Allocation Manager shows devices to allocate to users without appropriate rights 6881589 incorrect variable name in audio_clean 6874590 TX does not update logindevperm correctly for virtual console feature
author Nathan Bush <nathan.bush@sun.com>
date Tue, 03 Nov 2009 17:06:24 -0800
parents c04a3259b948
children eaa343de0d06
files usr/src/cmd/allocate/allocate3.c usr/src/cmd/allocate/audio_clean.sh usr/src/cmd/tsol/labeld/svc-labeld
diffstat 3 files changed, 10 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/allocate/allocate3.c	Tue Nov 03 15:48:39 2009 -0800
+++ b/usr/src/cmd/allocate/allocate3.c	Tue Nov 03 17:06:24 2009 -0800
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <auth_attr.h>
 #include <auth_list.h>
 #include <dirent.h>
@@ -363,10 +361,7 @@
 		error = DACACCERR;
 		goto out;
 	}
-	if (optflag & USERID)
-		is_authorized = 1;
-	else
-		is_authorized = _is_dev_authorized(da, uid);
+	is_authorized = _is_dev_authorized(da, uid);
 	if (optflag & LISTFREE) {	/* list_devices -n */
 		/*
 		 * list all free devices
--- a/usr/src/cmd/allocate/audio_clean.sh	Tue Nov 03 15:48:39 2009 -0800
+++ b/usr/src/cmd/allocate/audio_clean.sh	Tue Nov 03 17:06:24 2009 -0800
@@ -136,7 +136,7 @@
 ZONENAME=$4
 ZONEPATH=$5
 SAVEDIR=/etc/security/audio
-MAP=`dminfo -v -n $AUDIO`
+MAP=`dminfo -v -n $DEVICE`
 DEVICE=`echo $MAP | cut -f1 -d:`
 TYPE=`echo $MAP | cut -f2 -d:`
 FILES=`echo $MAP | cut -f3 -d:`
--- a/usr/src/cmd/tsol/labeld/svc-labeld	Tue Nov 03 15:48:39 2009 -0800
+++ b/usr/src/cmd/tsol/labeld/svc-labeld	Tue Nov 03 17:06:24 2009 -0800
@@ -19,10 +19,9 @@
 #
 # CDDL HEADER END
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 
 . /lib/svc/share/smf_include.sh
 
@@ -61,12 +60,13 @@
 		return
 	fi
 	for line in \
-		"/dev/console	0600	/dev/sound/" \
-		"/dev/console	0400	/dev/removable-media/" \
-		"/dev/console	0400	/dev/hotpluggable/" \
-		"/dev/console	0600	/dev/usb/\[0-9a-f\]" \
+		"/dev/sound/" \
+		"/dev/removable-media/" \
+		"/dev/hotpluggable/" \
+		"/dev/usb/\[0-9a-f\]" \
 			; do
-		sed -e "s!^$from$line!$to$line!" $LOGINDEVPERM > /tmp/tmp.$$
+		sed -e "s!^$from\([^# 	]\{1,\}[ 	}\{1,\}[0-9]\{1,\}[ 	]\{1,\}\)$line!$to\1$line!" \
+		    $LOGINDEVPERM > /tmp/tmp.$$
 		cp /tmp/tmp.$$ $LOGINDEVPERM
 	done
 	rm -f /tmp/tmp.$$