changeset 13590:48985d630b76

2045 eject fails for active console user Reviewed by: Andrew Stormont <Andrew.Stormont@nexenta.com> Reviewed by: Albert Lee <trisk@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Milan Jurik <milan.jurik@xylab.cz>
date Mon, 30 Jan 2012 18:55:11 +0100
parents 29b4b175ee0f
children 0b83d70b9fe5
files usr/src/cmd/hal/hald/hald_dbus.c usr/src/cmd/hal/tools/hal-storage-shared.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/hal/hald/hald_dbus.c	Thu Feb 02 13:37:31 2012 +0000
+++ b/usr/src/cmd/hal/hald/hald_dbus.c	Mon Jan 30 18:55:11 2012 +0100
@@ -959,7 +959,7 @@
 {
 	struct stat st;
 
-	return ((stat("/dev/console", &st) == 0) && (st.st_uid == uid));
+	return ((stat("/dev/vt/console_user", &st) == 0) && (st.st_uid == uid));
 }
 #endif /* sun */
 
--- a/usr/src/cmd/hal/tools/hal-storage-shared.c	Thu Feb 02 13:37:31 2012 +0000
+++ b/usr/src/cmd/hal/tools/hal-storage-shared.c	Mon Jan 30 18:55:11 2012 +0100
@@ -379,7 +379,7 @@
 					mounted_by_other_uid = FALSE;
 				}
 #ifdef sun
-				if (stat("/dev/console", &st) == 0 &&
+				if (stat("/dev/vt/console_user", &st) == 0 &&
 				    st.st_uid == atoi (invoked_by_uid)) {
 					/*
 					 * Owner is allowed to take over. Before we have real