2010-10-27 Brian Cameron <[email protected]> NEVADA_151
authordavelam
Wed, 27 Oct 2010 00:38:09 +0000
branchNEVADA_151
changeset 20264 12adaad92776
parent 20263 0050e881a875
child 20265 5030d1f1ddeb
2010-10-27 Brian Cameron <[email protected]> (Bug fix for b151a) * base-specs/dbus.spec, patches/dbus-03-consoleuser.diff: Add patch to fix CR #6963885.
ChangeLog
base-specs/dbus.spec
patches/dbus-03-consoleuser.diff
--- a/ChangeLog	Tue Oct 26 02:59:07 2010 +0000
+++ b/ChangeLog	Wed Oct 27 00:38:09 2010 +0000
@@ -1,7 +1,13 @@
-2010-10-25  Dave Lin <[email protected]>
+2010-10-27  Dave Lin <[email protected]>
 
 	==== Nevada build 151 ====
 
+2010-10-27  Brian Cameron  <[email protected]>
+
+	(Bug fix for b151a)
+	* base-specs/dbus.spec, patches/dbus-03-consoleuser.diff: Add patch
+	  to fix CR #6963885.
+
 2010-10-25  Dave Lin <[email protected]>
 
 	* base-specs/nwam-manager.spec : Add patch to fix build issue.
--- a/base-specs/dbus.spec	Tue Oct 26 02:59:07 2010 +0000
+++ b/base-specs/dbus.spec	Wed Oct 27 00:38:09 2010 +0000
@@ -25,8 +25,10 @@
 # System services are disabled by default in Solaris configuration since
 # they are not yet supported on Solaris.
 Patch1:       dbus-01-nosystemservice.diff
-# date:2010-08-16 owner:padraig type:bug doo#16787
+# date:2010-08-16 owner:padraig type:bug doo:16787
 Patch2:       dbus-02-closefrom.diff
+# date:2010-10-20 owner:yippi type:bug bugster:6993687
+Patch3:       dbus-03-consoleuser.diff
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
 Docdir:	      %{_defaultdocdir}/doc
 Autoreqprov:  on
@@ -70,6 +72,7 @@
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %ifos linux
@@ -144,6 +147,8 @@
 %{_libdir}/python?.?/vendor-packages/*
 
 %changelog
+* Wed Oct 20 2010 - [email protected]
+- Add patch dbus-03-consoleuser.diff to fix bugster:6963885.
 * Mon Aug 16 2010 - [email protected]
 - Add dbus-02-closefrom.diff rto fix doo 16787.
 * Tue Mar 23 2010 - [email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dbus-03-consoleuser.diff	Wed Oct 27 00:38:09 2010 +0000
@@ -0,0 +1,53 @@
+--- dbus-1.2.24/dbus/dbus-sysdeps-util-unix.c-orig	2010-10-19 13:27:19.672465743 -0500
++++ dbus-1.2.24/dbus/dbus-sysdeps-util-unix.c	2010-10-19 13:28:39.691609495 -0500
+@@ -45,6 +45,10 @@
+ #include <sys/un.h>
+ #include <syslog.h>
+ 
++#ifdef __sun
++#include <pwd.h>
++#endif
++
+ #ifdef HAVE_SYS_SYSLIMITS_H
+ #include <sys/syslimits.h>
+ #endif
+@@ -496,8 +500,31 @@ _dbus_user_at_console (const char *usern
+ 
+   DBusString f;
+   dbus_bool_t result;
++#ifdef __sun
++  struct passwd *passwd_entry;
++#endif
+ 
+   result = FALSE;
++
++#ifdef __sun
++  passwd_entry = getpwnam (username);
++  if (passwd_entry != NULL)
++    {
++      struct stat st;
++      uid_t uid;
++
++      uid = passwd_entry->pw_uid;
++
++      if (stat ("/dev/vt/console_user", &st) == 0 && st.st_uid == uid)
++        {
++         /*
++          * Owner is allowed to take over. Before we have real
++          * ownership in HAL, assume it's the console owner.
++          */
++          result = TRUE;
++        }
++    }
++#else
+   if (!_dbus_string_init (&f))
+     {
+       _DBUS_SET_OOM (error);
+@@ -521,6 +548,7 @@ _dbus_user_at_console (const char *usern
+ 
+  out:
+   _dbus_string_free (&f);
++#endif
+ 
+   return result;
+ }