2009-10-16 Halton Huo <
[email protected]>
* base-specs/gdm.spec: Add patch gdm-17-console-user.diff
* patches/gdm-14-sol-notty.diff: rework
* patches/gdm-17-console-user.diff: Added to set /dev/console
when display :0 running on VT
--- a/ChangeLog Fri Oct 16 07:28:59 2009 +0000
+++ b/ChangeLog Fri Oct 16 08:08:08 2009 +0000
@@ -1,3 +1,10 @@
+2009-10-16 Halton Huo <[email protected]>
+
+ * base-specs/gdm.spec: Add patch gdm-17-console-user.diff
+ * patches/gdm-14-sol-notty.diff: rework
+ * patches/gdm-17-console-user.diff: Added to set /dev/console
+ when display :0 running on VT
+
2009-10-16 Brian Cameron <[email protected]>
* SUNWgnome-terminal.spec: Fix Requires/BuildRequires.
--- a/base-specs/gdm.spec Fri Oct 16 07:28:59 2009 +0000
+++ b/base-specs/gdm.spec Fri Oct 16 08:08:08 2009 +0000
@@ -58,8 +58,15 @@
Patch14: gdm-14-sol-notty.diff
# date:2009-10-02 owner:yippi type:bug bugzilla:596830 state:upstream
Patch15: gdm-15-autologin.diff
-# date:2009-12-13 owner:niall type:bug doo:10981
+# date:2009-10-13 owner:niall type:bug doo:10981
Patch16: gdm-16-trusted-extensions.diff
+# Lots of bugs complain no premission when Xorg is running with VT support.
+# Gary and Brian discussed about a tempory solution is:
+# if Xorg running on a VT device like /dev/vt/#, we set device value to
+# /dev/console if display number is :0.
+# This will let user login in on :0 gain the permission of devices.
+# date:2009-10-16 owner:halton type:branding doo:11620 bugster:6885815,6886849
+Patch17: gdm-17-console-user.diff
URL: http://projects.gnome.org/gdm/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -88,6 +95,7 @@
%patch14 -p1
%patch15 -p1
%patch16 -p1
+%patch17 -p1
%build
%ifos linux
@@ -189,6 +197,8 @@
%{_localstatedir}/lib/gdm
%changelog
+* Fri Oct 16 2009 - [email protected]
+- Add branding patch console-user.diff to set /dev/console when display :0 running on VT.
* Tue Oct 13 2009 - [email protected]
- Fix opensolaris.org defect #10981 to enable trusted extensions support
* Fri Oct 02 2009 - [email protected]
--- a/patches/gdm-14-sol-notty.diff Fri Oct 16 07:28:59 2009 +0000
+++ b/patches/gdm-14-sol-notty.diff Fri Oct 16 08:08:08 2009 +0000
@@ -1,5 +1,14 @@
+commit 161d77f89c29b2fcd5cce8ba27d323e60b53a7f1
+Author: Halton Huo <[email protected]>
+Date: Fri Oct 16 15:22:40 2009 +0800
+
+ gdm-14-sol-notty.diff
+ If /usr/lib/ck-get-x11-display-device return no tty like " ? "
+ gdm should create symlink /dev/dtlocal to /dev/null if display is local
+ othewise create symlink /dev/dtremote to /dev/null if display is not local
+
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
-index 5591d42..ad8f745 100644
+index 5591d42..6ffa393 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -26,6 +26,7 @@
@@ -26,47 +35,70 @@
gboolean res;
GError *error;
-@@ -229,6 +232,39 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
- g_error_free (error);
- } else {
- out = g_strstrip (out);
-+ if (g_str_equal (out, "?")) {
-+ gchar buf[MAXPATHLEN + 1];
-+
-+ memset (buf, 0, sizeof (gchar) * (MAXPATHLEN + 1));
-+
-+ if (server->priv->is_local) {
-+ out = g_strdup ("/dev/dtlocal");
-+ } else {
-+ out = g_strdup ("/dev/dtremote");
-+ }
+@@ -218,21 +221,58 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
+ server->priv->display_name);
+
+ g_debug ("GdmServer: Running helper %s", command);
+
-+ if (stat (out, &st) != 0) {
-+ g_debug ("Creating pseudo-device %s", out);
-+ symlink ("/dev/null", out);
-+ } else if (readlink (out, buf, MAXPATHLEN) > 0) {
-+ if (strcmp (buf, "/dev/null") == 0) {
-+ /* Touch symlink */
-+ struct utimbuf timebuf;
-+
-+ timebuf.modtime = time ((time_t *) 0);
-+ timebuf.actime = timebuf.modtime;
+ out = NULL;
+ res = g_spawn_command_line_sync (command,
+ &out,
+ NULL,
+ &status,
+ &error);
++ g_free (command);
+
-+ if ((utime (out, &timebuf)) != 0)
-+ g_debug ("Problem updating access time of pseudo-device %s", out);
-+ else
-+ g_debug ("Touching pseudo-device %s", out);
-+ } else {
-+ g_debug ("Device %s points to %s", out, buf);
-+ }
-+ } else {
-+ g_debug ("Device %s is not a symlink", out);
-+ }
-+ }
- g_debug ("GdmServer: Got tty: '%s'", out);
+ if (! res) {
+ g_warning ("Could not run helper: %s", error->message);
+ g_error_free (error);
+- } else {
+- out = g_strstrip (out);
+- g_debug ("GdmServer: Got tty: '%s'", out);
++ g_free (out);
++ return NULL;
}
-@@ -1197,5 +1233,23 @@ gdm_server_new (const char *display_id)
+- g_free (command);
++ out = g_strstrip (out);
++ if (g_str_equal (out, "?")) {
++ gchar buf[MAXPATHLEN + 1];
++
++ memset (buf, 0, sizeof (gchar) * (MAXPATHLEN + 1));
++
++ if (server->priv->is_local) {
++ out = g_strdup ("/dev/dtlocal");
++ } else {
++ out = g_strdup ("/dev/dtremote");
++ }
++
++ if (stat (out, &st) != 0) {
++ g_debug ("Creating pseudo-device %s", out);
++ symlink ("/dev/null", out);
++ } else if (readlink (out, buf, MAXPATHLEN) > 0) {
++ if (strcmp (buf, "/dev/null") == 0) {
++ /* Touch symlink */
++ struct utimbuf timebuf;
++
++ timebuf.modtime = time ((time_t *) 0);
++ timebuf.actime = timebuf.modtime;
++
++ if ((utime (out, &timebuf)) != 0)
++ g_debug ("Problem updating access time of pseudo-device %s", out);
++ else
++ g_debug ("Touching pseudo-device %s", out);
++ } else {
++ g_debug ("Device %s points to %s", out, buf);
++ }
++ } else {
++ g_debug ("Device %s is not a symlink", out);
++ }
++ }
++
++ g_debug ("GdmServer: Got tty: '%s'", out);
+
+ return out;
+ }
+@@ -1197,5 +1237,23 @@ gdm_server_new (const char *display_id)
server->priv->auth_file = NULL;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gdm-17-console-user.diff Fri Oct 16 08:08:08 2009 +0000
@@ -0,0 +1,28 @@
+commit 7b3d52af57a610e0b63a994588683675e9733bf6
+Author: Halton Huo <[email protected]>
+Date: Fri Oct 16 15:47:52 2009 +0800
+
+ On Solaris, if device is vt like /dev/vt/#, we set device value to
+ /dev/console if display number is :0. This will let user login in
+ on :0 gain the permission of devices.
+
+diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
+index 6ffa393..3b50ea6 100644
+--- a/daemon/gdm-server.c
++++ b/daemon/gdm-server.c
+@@ -272,6 +272,15 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
+ }
+ }
+
++ /* On Solaris, if device is vt like /dev/vt/#, we set device value to
++ * /dev/console if display number is :0. This will let user login in
++ * on :0 gain the permission of devices.
++ */
++ if (g_str_has_prefix (out, "/dev/vt/") &&
++ g_str_equal (server->priv->display_name, ":0")) {
++ out = g_strdup ("/dev/console");
++ }
++
+ g_debug ("GdmServer: Got tty: '%s'", out);
+
+ return out;