Project

General

Profile

Bug #2045 ยป hal-eject.patch

suggested fix - Milan Jurik, 2012-01-30 05:52 PM

View differences:

new/usr/src/cmd/hal/hald/hald_dbus.c Mon Jan 23 19:50:54 2012
959 959
{
960 960
	struct stat st;
961 961

  
962
	return ((stat("/dev/console", &st) == 0) && (st.st_uid == uid));
962
	return ((stat("/dev/vt/console_user", &st) == 0) && (st.st_uid == uid));
963 963
}
964 964
#endif /* sun */
965 965

  
966
-- old/usr/src/cmd/hal/tools/hal-storage-shared.c	Mon Jan 23 19:51:01 2012
966
++ new/usr/src/cmd/hal/tools/hal-storage-shared.c	Mon Jan 23 19:51:00 2012
......
379 379
					mounted_by_other_uid = FALSE;
380 380
				}
381 381
#ifdef sun
382
				if (stat("/dev/console", &st) == 0 &&
382
				if (stat("/dev/vt/console_user", &st) == 0 &&
383 383
				    st.st_uid == atoi (invoked_by_uid)) {
384 384
					/*
385 385
					 * Owner is allowed to take over. Before we have real
    (1-1/1)