aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2012-01-03 03:21:24 +0800
committermarcus <marcus@FreeBSD.org>2012-01-03 03:21:24 +0800
commit28b087a3daa25fabf2b2a2b091a50776cb1d52d4 (patch)
tree51509c1a31ed5ee8a8303b1e2be4f7e2ae9fb033 /x11
parent97e13a9c87030f0ee61a886cd2c10dc5de966b1b (diff)
downloadfreebsd-ports-gnome-28b087a3daa25fabf2b2a2b091a50776cb1d52d4.tar.gz
freebsd-ports-gnome-28b087a3daa25fabf2b2a2b091a50776cb1d52d4.tar.zst
freebsd-ports-gnome-28b087a3daa25fabf2b2a2b091a50776cb1d52d4.zip
Make sure to exit if there is a problem setting up the desktop session.
If not, the user would be dropped in as root. PR: 159721
Diffstat (limited to 'x11')
-rw-r--r--x11/gdm/Makefile2
-rw-r--r--x11/gdm/files/patch-daemon_gdm-session-worker.c17
2 files changed, 10 insertions, 9 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile
index 1a62853c707c..fbf0415b2962 100644
--- a/x11/gdm/Makefile
+++ b/x11/gdm/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gdm
PORTVERSION= 2.30.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/x11/gdm/files/patch-daemon_gdm-session-worker.c b/x11/gdm/files/patch-daemon_gdm-session-worker.c
index 59b0b8d7669d..31baf67050ed 100644
--- a/x11/gdm/files/patch-daemon_gdm-session-worker.c
+++ b/x11/gdm/files/patch-daemon_gdm-session-worker.c
@@ -1,5 +1,5 @@
---- daemon/gdm-session-worker.c.orig 2010-08-11 12:40:07.000000000 -0500
-+++ daemon/gdm-session-worker.c 2011-06-25 09:43:55.000000000 -0500
+--- daemon/gdm-session-worker.c.orig 2010-08-11 13:40:07.000000000 -0400
++++ daemon/gdm-session-worker.c 2011-08-13 23:37:04.000000000 -0400
@@ -31,6 +31,9 @@
#include <errno.h>
#include <grp.h>
@@ -10,16 +10,16 @@
#ifdef HAVE_LOGINDEVPERM
#include <libdevinfo.h>
-@@ -341,7 +344,7 @@
+@@ -341,7 +344,7 @@ gdm_session_execute (const char *file,
* what to search if PATH is unset. POSIX may, dunno.
*/
- path = "/bin:/usr/bin:.";
-+ path = "/bin:/usr/bin:/usr/local/bin:.";
++ path = "/bin:/usr/bin:%%LOCALBASE%%/bin:.";
}
len = strlen (file) + 1;
-@@ -1035,17 +1038,6 @@
+@@ -1035,17 +1038,6 @@ gdm_cache_copy_file (GdmSessionWorker *w
error->message);
g_error_free (error);
} else {
@@ -37,7 +37,7 @@
g_debug ("Copy successful");
}
-@@ -1183,7 +1175,23 @@
+@@ -1183,7 +1175,23 @@ gdm_session_worker_uninitialize_pam (Gdm
return;
if (worker->priv->state >= GDM_SESSION_WORKER_STATE_SESSION_OPENED) {
@@ -62,7 +62,7 @@
pam_close_session (worker->priv->pam_handle, 0);
gdm_session_auditor_report_logout (worker->priv->auditor);
-@@ -2027,15 +2035,16 @@
+@@ -2027,15 +2035,16 @@ gdm_session_worker_start_user_session (G
char *cachedirname;
char *home_dir;
int fd;
@@ -83,7 +83,7 @@
if (setsid () < 0) {
g_debug ("GdmSessionWorker: could not set pid '%u' as leader of new session and process group - %s",
-@@ -2043,6 +2052,25 @@
+@@ -2043,6 +2052,26 @@ gdm_session_worker_start_user_session (G
_exit (2);
}
@@ -93,6 +93,7 @@
+ g_debug ("%s: setusercontext () failed for %s. "
+ "Aborting.", "gdm_session_worker_start_user_session",
+ login ? login : "(null)");
++ _exit (1);
+ }
+
+ /* Propagate PATH environment variable from user context to child processes */