aboutsummaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorJeremy Messenger <mezz@FreeBSD.org>2011-06-25 14:52:19 +0000
committerJeremy Messenger <mezz@FreeBSD.org>2011-06-25 14:52:19 +0000
commit77b70c45d69db43eeee410a03b283334678b7f98 (patch)
treeaf77c1e8934908d99f2d0588a37b6af4b35c5ac0 /x11
parent436197740c27e0282fb565fa62847f3d138c12b1 (diff)
downloadports-77b70c45d69db43eeee410a03b283334678b7f98.tar.gz
ports-77b70c45d69db43eeee410a03b283334678b7f98.zip
Before, the setusercontext(3) call in gdm is missing a few flags. Replace
those LOGIN_* to LOGIN_SETALL to enable all but not LOGIN_SETGROUP. It fixes the rctl resource limits. Note that, the MAC framework is untest with it. Bump the PORTREVISION. PR: ports/158174 Submitted by: trasz
Notes
Notes: svn path=/head/; revision=276371
Diffstat (limited to 'x11')
-rw-r--r--x11/gdm/Makefile2
-rw-r--r--x11/gdm/files/patch-daemon_gdm-session-worker.c19
2 files changed, 9 insertions, 12 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile
index c5659afefbb1..d0d989df3847 100644
--- a/x11/gdm/Makefile
+++ b/x11/gdm/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gdm
PORTVERSION= 2.30.5
-PORTREVISION= 2
+PORTREVISION= 3
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 fc29affddab0..59b0b8d7669d 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 19:40:07.000000000 +0200
-+++ daemon/gdm-session-worker.c 2011-03-29 10:37:37.000000000 +0200
+--- 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
@@ -31,6 +31,9 @@
#include <errno.h>
#include <grp.h>
@@ -10,7 +10,7 @@
#ifdef HAVE_LOGINDEVPERM
#include <libdevinfo.h>
-@@ -341,7 +344,7 @@ gdm_session_execute (const char *file,
+@@ -341,7 +344,7 @@
* what to search if PATH is unset. POSIX may, dunno.
*/
@@ -19,7 +19,7 @@
}
len = strlen (file) + 1;
-@@ -1035,17 +1038,6 @@ gdm_cache_copy_file (GdmSessionWorker *w
+@@ -1035,17 +1038,6 @@
error->message);
g_error_free (error);
} else {
@@ -37,7 +37,7 @@
g_debug ("Copy successful");
}
-@@ -1183,7 +1175,23 @@ gdm_session_worker_uninitialize_pam (Gdm
+@@ -1183,7 +1175,23 @@
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 @@ gdm_session_worker_start_user_session (G
+@@ -2027,15 +2035,16 @@
char *cachedirname;
char *home_dir;
int fd;
@@ -83,16 +83,13 @@
if (setsid () < 0) {
g_debug ("GdmSessionWorker: could not set pid '%u' as leader of new session and process group - %s",
-@@ -2043,6 +2052,28 @@ gdm_session_worker_start_user_session (G
+@@ -2043,6 +2052,25 @@
_exit (2);
}
+#ifdef HAVE_LOGINCAP
+ if (setusercontext (NULL, pwent, pwent->pw_uid,
-+ LOGIN_SETLOGIN | LOGIN_SETPATH |
-+ LOGIN_SETPRIORITY | LOGIN_SETRESOURCES |
-+ LOGIN_SETUMASK | LOGIN_SETUSER |
-+ LOGIN_SETENV) < 0) {
++ LOGIN_SETALL & ~LOGIN_SETGROUP) < 0) {
+ g_debug ("%s: setusercontext () failed for %s. "
+ "Aborting.", "gdm_session_worker_start_user_session",
+ login ? login : "(null)");