diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-06-02 19:58:25 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2011-06-02 19:58:25 +0800 |
commit | e8bf40e496dbf74e2ee91a95bf04886ad32a23f4 (patch) | |
tree | 26558e38dafffdf2318eb68bd26e54a98fb1d67a /x11/gdm/files | |
parent | 6c90da75235f2adc2c2cf2c590fb85459cdde03a (diff) | |
download | marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar.gz marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar.bz2 marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar.lz marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar.xz marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.tar.zst marcuscom-ports-e8bf40e496dbf74e2ee91a95bf04886ad32a23f4.zip |
Backport fix for CVE-2011-1709 from the 2.32.2 release.
As I understand it this only happens with GLib 2.28.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@16019 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11/gdm/files')
22 files changed, 634 insertions, 0 deletions
diff --git a/x11/gdm/files/gdm.in b/x11/gdm/files/gdm.in new file mode 100644 index 000000000..bfcb961fe --- /dev/null +++ b/x11/gdm/files/gdm.in @@ -0,0 +1,62 @@ +#!/bin/sh +# $FreeBSD: ports/x11/gdm/files/gdm.in,v 1.20 2010/07/25 19:35:05 kwm Exp $ +# $MCom: ports-stable/x11/gdm/files/gdm.in,v 1.5 2010/07/21 13:50:46 kwm Exp $ + +# PROVIDE: gdm +# REQUIRE: LOGIN cleanvar moused syscons dbus +# +# Add the following to /etc/rc.conf to start GDM at boot time: +# +# gdm_enable="YES" +# + +. /etc/rc.subr +. %%GNOME_SUBR%% + +gdm_enable=${gdm_enable-${gnome_enable}} +gdm_preserve_base_pam_conf=${gdm_preserve_base_pam_conf-NO} +gdm_lang=${gdm_lang-${LANG}} + +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin + +name="gdm" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/${name}.pid" +procname="%%PREFIX%%/sbin/gdm-binary" +start_cmd="gdm_start" + +gdm_start() +{ + if ! checkyesno gdm_enable ; then + return 0 + fi + echo "Starting ${name}." + + # make sure there is no pam configuration for gdm service in base system + if ! checkyesno gdm_preserve_base_pam_conf && [ -f /etc/pam.d/gdm ]; then + cp -p /etc/pam.d/gdm /etc/pam.d/gdm_disabled + rm -f /etc/pam.d/gdm + fi + + ( iter=0 + while ! ps -axoargs | grep "^/usr/libexec/getty " | grep -qv grep >/dev/null 2>&1; do + if [ ${iter} -eq 60 ]; then + break + fi + sleep 1 + iter=$(expr ${iter} + 1) + done + iter=0 + while ! %%LOCALBASE%%/bin/lshal >/dev/null 2>&1 ; do + if [ ${iter} -eq 60 ]; then + break + fi + sleep 1 + iter=$(expr ${iter} + 1) + done + LANG=${gdm_lang} ${command} ${gdm_flags} ) & +} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/x11/gdm/files/gdm.pam.in b/x11/gdm/files/gdm.pam.in new file mode 100644 index 000000000..0849259ad --- /dev/null +++ b/x11/gdm/files/gdm.pam.in @@ -0,0 +1,22 @@ +# +# $FreeBSD: ports/x11/gdm/files/gdm.pam.in,v 1.7 2010/07/25 19:35:05 kwm Exp $ +# $MCom: ports-stable/x11/gdm/files/gdm.pam.in,v 1.3 2010/07/21 13:50:46 kwm Exp $ +# +# PAM configuration for the "gdm" service +# + +# auth +#auth sufficient pam_krb5.so no_warn try_first_pass +#auth sufficient pam_ssh.so no_warn try_first_pass +auth required pam_unix.so no_warn try_first_pass +%%PAM_KEYRING%%auth optional %%LOCALBASE%%/lib/pam_gnome_keyring.so + +# account +account required pam_nologin.so +#account required pam_krb5.so +account required pam_unix.so + +# session +#session optional pam_ssh.so +session required pam_permit.so +%%PAM_KEYRING%%session optional %%LOCALBASE%%/lib/pam_gnome_keyring.so auto_start diff --git a/x11/gdm/files/patch-CVE-2011-1709 b/x11/gdm/files/patch-CVE-2011-1709 new file mode 100644 index 000000000..0c05eda44 --- /dev/null +++ b/x11/gdm/files/patch-CVE-2011-1709 @@ -0,0 +1,76 @@ +http://git.gnome.org/browse/gdm/commit/?h=gnome-2-32&id=c721deb4c3dbf170946af8ee3634327c06ea4536 + +--- data/Makefile.in.orig 2010-08-11 19:40:15.000000000 +0200 ++++ data/Makefile.in 2011-05-31 22:05:52.000000000 +0200 +@@ -399,6 +399,8 @@ EXTRA_DIST = \ + PostLogin \ + gconf.path \ + session-setup.entries \ ++ mime-dummy-handler.desktop \ ++ mimeapps.list \ + $(NULL) + + CLEANFILES = \ +@@ -903,6 +905,8 @@ uninstall-hook: + $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm \ + $(DESTDIR)$(PAM_PREFIX)/pam.d/gdm-autologin \ + $(DESTDIR)$(workingdir)/.gconf.path \ ++ $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop \ ++ $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list \ + -rf \ + $(DESTDIR)$(workingdir)/.gconf.mandatory \ + $(DESTDIR)$(screenshotdir) \ +@@ -1000,6 +1004,12 @@ install-data-hook: gdm.conf-custom Xsess + chown root:gdm $(DESTDIR)$(workingdir) || : ; \ + fi + ++ if test '!' -d $(DESTDIR)$(workingdir)/.local/share/applications; then \ ++ $(mkinstalldirs) $(DESTDIR)$(workingdir)/.local/share/applications; \ ++ chmod 0755 $(DESTDIR)$(workingdir)/.local/share/applications; \ ++ chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \ ++ fi ++ + if test '!' -d $(DESTDIR)$(cachedir); then \ + $(mkinstalldirs) $(DESTDIR)$(cachedir); \ + chmod 1755 $(DESTDIR)$(cachedir); \ +@@ -1013,6 +1023,9 @@ install-data-hook: gdm.conf-custom Xsess + chmod 1750 $(DESTDIR)$(workingdir)/.gconf.mandatory + chmod 1640 $(DESTDIR)$(workingdir)/.gconf.mandatory/*.xml + ++ $(INSTALL_DATA) $(srcdir)/mime-dummy-handler.desktop $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop ++ $(INSTALL_DATA) $(srcdir)/mimeapps.list $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- data/mime-dummy-handler.desktop.orig 2011-05-31 22:08:08.000000000 +0200 ++++ data/mime-dummy-handler.desktop 2011-05-31 22:08:03.000000000 +0200 +@@ -0,0 +1,6 @@ ++[Desktop Entry] ++Type=Application ++Name=Dummy URI Handler ++Exec=/bin/true %U ++Terminal=false ++StartupNotify=false +--- data/mimeapps.list.orig 2011-05-31 22:08:21.000000000 +0200 ++++ data/mimeapps.list 2011-05-31 22:08:17.000000000 +0200 +@@ -0,0 +1,19 @@ ++[Default Applications] ++x-scheme-handler/file=mime-dummy-handler.desktop ++x-scheme-handler/ftp=mime-dummy-handler.desktop ++x-scheme-handler/ghelp=mime-dummy-handler.desktop ++x-scheme-handler/help=mime-dummy-handler.desktop ++x-scheme-handler/http=mime-dummy-handler.desktop ++x-scheme-handler/https=mime-dummy-handler.desktop ++x-scheme-handler/info=mime-dummy-handler.desktop ++x-scheme-handler/irc=mime-dummy-handler.desktop ++x-scheme-handler/itms=mime-dummy-handler.desktop ++x-scheme-handler/mailto=mime-dummy-handler.desktop ++x-scheme-handler/man=mime-dummy-handler.desktop ++x-scheme-handler/mms=mime-dummy-handler.desktop ++x-scheme-handler/rtp=mime-dummy-handler.desktop ++x-scheme-handler/rtsp=mime-dummy-handler.desktop ++x-scheme-handler/sip=mime-dummy-handler.desktop ++x-scheme-handler/trash=mime-dummy-handler.desktop ++x-scheme-handler/webcal=mime-dummy-handler.desktop ++x-scheme-handler/xmpp=mime-dummy-handler.desktop diff --git a/x11/gdm/files/patch-common_Makefile.in b/x11/gdm/files/patch-common_Makefile.in new file mode 100644 index 000000000..2ab0a5001 --- /dev/null +++ b/x11/gdm/files/patch-common_Makefile.in @@ -0,0 +1,20 @@ +--- common/Makefile.in.orig 2008-08-20 14:34:16.000000000 -0400 ++++ common/Makefile.in 2008-08-20 14:36:50.000000000 -0400 +@@ -428,7 +428,8 @@ gdm_crash_logger_CPPFLAGS = \ + -DLOCALSTATEDIR=\"$(localstatedir)\" \ + $(NULL) + +-gdm_crash_logger_LDADD = $(GTHREAD_LIBS) ++gdm_crash_logger_LDADD = $(GTHREAD_LIBS) \ ++ -lexecinfo + @MKDTEMP_MISSING_FALSE@MKDTEMP_FILES = + @MKDTEMP_MISSING_TRUE@MKDTEMP_FILES = mkdtemp.c mkdtemp.h + libgdmcommon_la_SOURCES = \ +@@ -473,6 +474,7 @@ libgdmcommon_la_CFLAGS = \ + $(NULL) + + libgdmcommon_la_LIBADD = \ ++ -lexecinfo \ + $(NULL) + + libgdmcommon_la_LDFLAGS = \ diff --git a/x11/gdm/files/patch-common_gdm-address.c b/x11/gdm/files/patch-common_gdm-address.c new file mode 100644 index 000000000..9a4e620ba --- /dev/null +++ b/x11/gdm/files/patch-common_gdm-address.c @@ -0,0 +1,27 @@ +--- common/gdm-address.c.orig 2010-01-13 17:32:59.000000000 +0000 ++++ common/gdm-address.c 2010-01-17 12:55:48.000000000 +0000 +@@ -29,6 +29,8 @@ + #include <stropts.h> + #endif + #include <string.h> ++#include <sys/types.h> ++#include <sys/param.h> + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> + #endif +@@ -37,7 +39,6 @@ + #endif + #include <netdb.h> + #include <sys/ioctl.h> +-#include <net/if.h> + + #ifndef G_OS_WIN32 + #include <sys/select.h> +@@ -47,6 +48,7 @@ + #include <winsock2.h> + #include <ws2tcpip.h> + #endif ++#include <net/if.h> + + #include <glib-object.h> + diff --git a/x11/gdm/files/patch-common_gdm-address.h b/x11/gdm/files/patch-common_gdm-address.h new file mode 100644 index 000000000..a4fd39310 --- /dev/null +++ b/x11/gdm/files/patch-common_gdm-address.h @@ -0,0 +1,11 @@ +--- common/gdm-address.h.orig 2009-05-09 21:08:07.000000000 -0400 ++++ common/gdm-address.h 2009-05-09 21:08:34.000000000 -0400 +@@ -36,6 +36,8 @@ G_BEGIN_DECLS + + #define GDM_TYPE_ADDRESS (gdm_address_get_type ()) + ++#define gdm_sockaddr_len(sa) (((struct sockaddr *)sa)->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in)) ++ + typedef struct _GdmAddress GdmAddress; + + GType gdm_address_get_type (void); diff --git a/x11/gdm/files/patch-common_gdm-common.c b/x11/gdm/files/patch-common_gdm-common.c new file mode 100644 index 000000000..9fa4acafa --- /dev/null +++ b/x11/gdm/files/patch-common_gdm-common.c @@ -0,0 +1,13 @@ +--- common/gdm-common.c.orig 2007-12-23 10:29:20.000000000 +0100 ++++ common/gdm-common.c 2007-12-23 10:29:34.000000000 +0100 +@@ -33,6 +33,10 @@ + + #include "gdm-common.h" + ++#ifndef ENODATA ++#define ENODATA EAGAIN ++#endif ++ + void + gdm_set_fatal_warnings_if_unstable (void) + { diff --git a/x11/gdm/files/patch-config.h.in b/x11/gdm/files/patch-config.h.in new file mode 100644 index 000000000..d17901da1 --- /dev/null +++ b/x11/gdm/files/patch-config.h.in @@ -0,0 +1,12 @@ +--- config.h.in.orig 2007-11-02 20:48:28.000000000 -0400 ++++ config.h.in 2007-11-02 20:49:39.000000000 -0400 +@@ -23,6 +23,9 @@ + #undef HAVE_LC_MESSAGES + #undef HAVE_LIBSM + #undef HAVE_LIBXDMCP ++#undef HAVE_LOGIN ++#undef HAVE_LOGOUT ++#undef HAVE_LOGWTMP + #undef HAVE_LOGINCAP + #undef HAVE_LOGINDEVPERM + #undef HAVE_LOGINRESTRICTIONS diff --git a/x11/gdm/files/patch-daemon-gdm-xdmcp-display-factory.c b/x11/gdm/files/patch-daemon-gdm-xdmcp-display-factory.c new file mode 100644 index 000000000..ede7f2c2f --- /dev/null +++ b/x11/gdm/files/patch-daemon-gdm-xdmcp-display-factory.c @@ -0,0 +1,48 @@ +--- daemon/gdm-xdmcp-display-factory.c.orig 2009-12-21 17:36:30.000000000 +0100 ++++ daemon/gdm-xdmcp-display-factory.c 2009-12-26 23:26:24.000000000 +0100 +@@ -35,6 +35,7 @@ + #include <netdb.h> + #include <arpa/inet.h> + #include <net/if.h> ++#include <netinet/in.h> + #ifdef HAVE_SYS_SOCKIO_H + #include <sys/sockio.h> + #endif +@@ -76,7 +77,7 @@ + #define DEFAULT_USE_MULTICAST FALSE + #define DEFAULT_MULTICAST_ADDRESS "ff02::1" + #define DEFAULT_HONOR_INDIRECT TRUE +-#define DEFAULT_MAX_DISPLAYS_PER_HOST 1 ++#define DEFAULT_MAX_DISPLAYS_PER_HOST 2 + #define DEFAULT_MAX_DISPLAYS 16 + #define DEFAULT_MAX_PENDING_DISPLAYS 4 + #define DEFAULT_MAX_WAIT 30 +@@ -404,6 +405,11 @@ + create_socket (struct addrinfo *ai) + { + int sock; ++#ifdef ENABLE_IPV6 ++#ifdef IPV6_V6ONLY ++ int off = 0; ++#endif ++#endif + + sock = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (sock < 0) { +@@ -411,6 +417,16 @@ + return sock; + } + ++#ifdef ENABLE_IPV6 ++#ifdef IPV6_V6ONLY ++ if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof (off)) < 0) { ++ g_warning ("setsockopt: %s", g_strerror (errno)); ++ close (sock); ++ return -1; ++ } ++#endif ++#endif ++ + if (bind (sock, ai->ai_addr, ai->ai_addrlen) < 0) { + g_warning ("bind: %s", g_strerror (errno)); + close (sock); diff --git a/x11/gdm/files/patch-daemon_Makefile.in b/x11/gdm/files/patch-daemon_Makefile.in new file mode 100644 index 000000000..137352970 --- /dev/null +++ b/x11/gdm/files/patch-daemon_Makefile.in @@ -0,0 +1,18 @@ +--- daemon/Makefile.in.orig 2009-05-31 15:51:18.000000000 -0400 ++++ daemon/Makefile.in 2009-05-31 15:56:32.000000000 -0400 +@@ -525,6 +525,7 @@ test_session_LDADD = \ + $(XLIB_LIBS) \ + $(EXTRA_DAEMON_LIBS) \ + $(DAEMON_LIBS) \ ++ $(EXTRA_DAEMON_LIBS) \ + $(PAM_LIBS) \ + $(NULL) + +@@ -660,6 +661,7 @@ gdm_session_worker_SOURCES = session-wor + gdm_session_worker_LDFLAGS = \ + $(XLIB_LIBS) \ + $(PAM_LIBS) \ ++ $(EXTRA_DAEMON_LIBS) \ + $(NULL) + + gdm_session_worker_LDADD = \ diff --git a/x11/gdm/files/patch-daemon_gdm-session-worker.c b/x11/gdm/files/patch-daemon_gdm-session-worker.c new file mode 100644 index 000000000..fc29affdd --- /dev/null +++ b/x11/gdm/files/patch-daemon_gdm-session-worker.c @@ -0,0 +1,114 @@ +--- 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 +@@ -31,6 +31,9 @@ + #include <errno.h> + #include <grp.h> + #include <pwd.h> ++#ifdef HAVE_LOGINCAP ++#include <login_cap.h> ++#endif + + #ifdef HAVE_LOGINDEVPERM + #include <libdevinfo.h> +@@ -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:."; + } + + len = strlen (file) + 1; +@@ -1035,17 +1038,6 @@ gdm_cache_copy_file (GdmSessionWorker *w + error->message); + g_error_free (error); + } else { +- int res; +- +- res = chown (cachefilename, +- worker->priv->uid, +- worker->priv->gid); +- if (res == -1) { +- g_warning ("GdmSessionWorker: Error setting owner of cache file: %s", +- g_strerror (errno)); +- } +- +- g_chmod (cachefilename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + g_debug ("Copy successful"); + } + +@@ -1183,7 +1175,23 @@ gdm_session_worker_uninitialize_pam (Gdm + return; + + if (worker->priv->state >= GDM_SESSION_WORKER_STATE_SESSION_OPENED) { +- gdm_session_worker_cache_userfiles (worker); ++ pid_t pid; ++ ++ pid = fork (); ++ ++ if (pid == 0) { ++ if (setuid (worker->priv->uid) < 0) { ++ g_debug ("GdmSessionWorker: could not reset uid: %s", g_strerror (errno)); ++ _exit (1); ++ } ++ ++ gdm_session_worker_cache_userfiles (worker); ++ _exit (0); ++ } ++ ++ if (pid > 0) { ++ gdm_wait_on_pid (pid); ++ } + 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 + char *cachedirname; + char *home_dir; + int fd; ++#ifdef HAVE_LOGINCAP ++ char *login = worker->priv->username; ++ struct passwd *pwent = getpwnam (login); ++#endif + + /* Make sure cachedir gets created before we drop to user */ + cachedirname = gdm_session_worker_create_cachedir (worker); + g_free (cachedirname); + +- if (setuid (worker->priv->uid) < 0) { +- g_debug ("GdmSessionWorker: could not reset uid - %s", g_strerror (errno)); +- _exit (1); +- } ++ /* Call setsid() before setusercontext() */ + + 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 + _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) { ++ g_debug ("%s: setusercontext () failed for %s. " ++ "Aborting.", "gdm_session_worker_start_user_session", ++ login ? login : "(null)"); ++ } ++ ++ /* Propagate PATH environment variable from user context to child processes */ ++ ++ gdm_session_worker_set_environment_variable (worker, "PATH", getenv ("PATH")); ++ ++#else ++ if (setuid (worker->priv->uid) < 0) { ++ g_debug ("GdmSessionWorker: could not reset uid - %s", g_strerror (errno)); ++ _exit (1); ++ } ++#endif ++ + environment = gdm_session_worker_get_environment (worker); + + g_assert (geteuid () == getuid ()); diff --git a/x11/gdm/files/patch-data_Xsession.in b/x11/gdm/files/patch-data_Xsession.in new file mode 100644 index 000000000..894c97d16 --- /dev/null +++ b/x11/gdm/files/patch-data_Xsession.in @@ -0,0 +1,39 @@ +--- data/Xsession.in.orig 2008-05-12 20:25:54.000000000 -0400 ++++ data/Xsession.in 2008-06-09 01:29:59.000000000 -0400 +@@ -231,12 +231,31 @@ if [ "x$command" = "xdefault" ] ; then + fi + fi + ++is_gnome=0 ++if [ "x$command" = "xgnome-session" ]; then ++ is_gnome=1 ++fi ++ ++# add seahorse-agent if found ++if [ ${is_gnome} = 1 ]; then ++ seahorseagent="`gdmwhich seahorse-agent`" ++ if [ -n "$seahorseagent" ] && [ -x "$seahorseagent" ] && [ -z "$GPG_AGENT_INFO" ] ; then ++ command="dbus-launch --exit-with-session $seahorseagent --execute $command" ++ elif [ -z "$seahorseagent" ] ; then ++ echo "$0: seahorse-agent not found!" ++ fi ++fi ++ + # add ssh-agent if found +-sshagent="`gdmwhich ssh-agent`" +-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then +- command="$sshagent -- $command" +-elif [ -z "$sshagent" ] ; then +- echo "$0: ssh-agent not found!" ++# ssh-agent functionality is handled by gnome-keyring-daemon which is launched ++# from gnome-session ++if [ ${is_gnome} != 1 ]; then ++ sshagent="`gdmwhich ssh-agent`" ++ if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then ++ command="$sshagent -- $command" ++ elif [ -z "$sshagent" ] ; then ++ echo "$0: ssh-agent not found!" ++ fi + fi + + echo "$0: Setup done, will execute: $command" diff --git a/x11/gdm/files/patch-data_gconf.path b/x11/gdm/files/patch-data_gconf.path new file mode 100644 index 000000000..2efdb3cc9 --- /dev/null +++ b/x11/gdm/files/patch-data_gconf.path @@ -0,0 +1,9 @@ +--- data/gconf.path.orig 2008-12-26 17:04:03.000000000 -0500 ++++ data/gconf.path 2008-12-26 17:04:13.000000000 -0500 +@@ -1,5 +1,5 @@ + # treat system-wide settings as mandatory +-xml:readonly:/etc/gconf/gconf.xml.system ++xml:readonly:%%LOCALBASE%%/etc/gconf/gconf.xml.system + + # override some settings + # we treat settings in this location as diff --git a/x11/gdm/files/patch-data_gdm.schemas.in.in b/x11/gdm/files/patch-data_gdm.schemas.in.in new file mode 100644 index 000000000..f52dd8bd5 --- /dev/null +++ b/x11/gdm/files/patch-data_gdm.schemas.in.in @@ -0,0 +1,11 @@ +--- data/gdm.schemas.in.in.orig 2009-05-16 18:17:53.000000000 -0400 ++++ data/gdm.schemas.in.in 2009-05-16 18:18:01.000000000 -0400 +@@ -77,7 +77,7 @@ + <schema> + <key>xdmcp/DisplaysPerHost</key> + <signature>i</signature> +- <default>1</default> ++ <default>2</default> + </schema> + <schema> + <key>xdmcp/Port</key> diff --git a/x11/gdm/files/patch-data_greeter-autostart_gdm-simple-greeter.desktop.in.in b/x11/gdm/files/patch-data_greeter-autostart_gdm-simple-greeter.desktop.in.in new file mode 100644 index 000000000..7febf5165 --- /dev/null +++ b/x11/gdm/files/patch-data_greeter-autostart_gdm-simple-greeter.desktop.in.in @@ -0,0 +1,7 @@ +--- data/greeter-autostart/gdm-simple-greeter.desktop.in.in.orig 2008-11-23 22:22:04.000000000 -0500 ++++ data/greeter-autostart/gdm-simple-greeter.desktop.in.in 2008-11-23 22:22:09.000000000 -0500 +@@ -5,4 +5,3 @@ Exec=@LIBEXECDIR@/gdm-simple-greeter + OnlyShowIn=GNOME; + X-GNOME-Autostart-Phase=Application + X-GNOME-Autostart-Notify=true +-X-GNOME-AutoRestart=true diff --git a/x11/gdm/files/patch-gui_simple-chooser_gdm-host-chooser-widget.c b/x11/gdm/files/patch-gui_simple-chooser_gdm-host-chooser-widget.c new file mode 100644 index 000000000..b7ed32318 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-chooser_gdm-host-chooser-widget.c @@ -0,0 +1,11 @@ +--- gui/simple-chooser/gdm-host-chooser-widget.c.orig 2010-01-13 14:29:00.000000000 +0000 ++++ gui/simple-chooser/gdm-host-chooser-widget.c 2010-01-17 13:04:14.000000000 +0000 +@@ -543,6 +543,8 @@ xdmcp_init (GdmHostChooserWidget *widget + #ifdef ENABLE_IPV6 + widget->priv->socket_fd = socket (AF_INET6, SOCK_DGRAM, 0); + if (widget->priv->socket_fd != -1) { ++ int off = 0; ++ setsockopt(widget->priv->socket_fd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof (off)); + widget->priv->have_ipv6 = TRUE; + } + #endif diff --git a/x11/gdm/files/patch-gui_simple-greeter_Makefile.in b/x11/gdm/files/patch-gui_simple-greeter_Makefile.in new file mode 100644 index 000000000..e8a958e66 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_Makefile.in @@ -0,0 +1,11 @@ +--- gui/simple-greeter/Makefile.in.orig 2008-02-13 01:57:37.000000000 -0500 ++++ gui/simple-greeter/Makefile.in 2008-02-13 01:57:44.000000000 -0500 +@@ -445,7 +445,7 @@ INCLUDES = \ + -DGDMCONFDIR=\"$(gdmconfdir)\" \ + -DDATADIR=\""$(datadir)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ +- -DLIBLOCALEDIR=\""$(prefix)/lib/locale"\" \ ++ -DLIBLOCALEDIR=\""/usr/share/locale"\" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DGLADEDIR=\""$(pkgdatadir)"\" \ + -DLIBEXECDIR=\""$(libexecdir)"\" \ diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-languages.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-languages.c new file mode 100644 index 000000000..cd8a0f496 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-languages.c @@ -0,0 +1,11 @@ +--- gui/simple-greeter/gdm-languages.c.orig 2010-01-13 16:20:08.000000000 +0000 ++++ gui/simple-greeter/gdm-languages.c 2010-01-17 13:10:50.000000000 +0000 +@@ -365,7 +365,7 @@ add_locale (const char *language_name, + if (is_utf8) { + name = g_strdup (language_name); + } else if (utf8_only) { +- name = g_strdup_printf ("%s.utf8", language_name); ++ name = g_strdup_printf ("%s.UTF-8", language_name); + + language_name_get_codeset_details (name, NULL, &is_utf8); + if (is_utf8) { diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-remote-login-window.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-remote-login-window.c new file mode 100644 index 000000000..059d72cf4 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-remote-login-window.c @@ -0,0 +1,10 @@ +--- gui/simple-greeter/gdm-remote-login-window.c.orig 2008-03-24 11:27:13.000000000 +0100 ++++ gui/simple-greeter/gdm-remote-login-window.c 2008-03-24 11:27:31.000000000 +0100 +@@ -25,6 +25,7 @@ + #include <unistd.h> + #include <sys/types.h> + #include <sys/wait.h> ++#include <sys/signal.h> + #include <errno.h> + + #include <glib.h> diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c new file mode 100644 index 000000000..a7bfbc883 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c @@ -0,0 +1,57 @@ +--- gui/simple-greeter/gdm-user-manager.c.orig 2010-06-26 00:09:31.000000000 +0200 ++++ gui/simple-greeter/gdm-user-manager.c 2010-07-20 23:23:07.000000000 +0200 +@@ -62,6 +62,8 @@ + + #ifdef __sun + #define DEFAULT_MINIMAL_UID 100 ++#elif defined(__FreeBSD__) ++#define DEFAULT_MINIMAL_UID 1000 + #else + #define DEFAULT_MINIMAL_UID 500 + #endif +@@ -1678,12 +1680,17 @@ reload_passwd_file (GHashTable *valid_sh + NULL, + g_object_unref); + ++#ifdef __FreeBSD__ ++ setpwent (); ++#else ++ + errno = 0; + fp = fopen (PATH_PASSWD, "r"); + if (fp == NULL) { + g_warning ("Unable to open %s: %s", PATH_PASSWD, g_strerror (errno)); + goto out; + } ++#endif + + /* Make sure we keep users who are logged in no matter what. */ + g_hash_table_iter_init (&iter, current_users_by_name); +@@ -1733,9 +1740,15 @@ reload_passwd_file (GHashTable *valid_sh + + g_debug ("GdmUserManager: include_all is TRUE"); + ++#ifdef __FreeBSD__ ++ for (pwent = getpwent (); ++ pwent != NULL; ++ pwent = getpwent ()) { ++#else + for (pwent = fgetpwent (fp); + pwent != NULL; + pwent = fgetpwent (fp)) { ++#endif + + /* Skip users below MinimalUID... */ + if (pwent->pw_uid < DEFAULT_MINIMAL_UID) { +@@ -1810,7 +1823,11 @@ reload_passwd_file (GHashTable *valid_sh + out: + /* Cleanup */ + ++#ifdef __FreeBSD__ ++ endpwent (); ++#else + fclose (fp); ++#endif + + g_hash_table_iter_init (&iter, new_users_by_name); + while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer *) &user)) { diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c new file mode 100644 index 000000000..e5fb649c6 --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-user.c @@ -0,0 +1,34 @@ +--- gui/simple-greeter/gdm-user.c.orig 2009-12-16 17:52:36.000000000 -0500 ++++ gui/simple-greeter/gdm-user.c 2009-12-18 21:43:38.000000000 -0500 +@@ -425,6 +425,7 @@ _gdm_user_update (GdmUser *u + /* Display Name */ + if (pwent->pw_gecos && pwent->pw_gecos[0] != '\0') { + gchar *first_comma = NULL; ++ gchar *ampersand; + gchar *valid_utf8_name = NULL; + + if (g_utf8_validate (pwent->pw_gecos, -1, NULL)) { +@@ -449,6 +450,23 @@ _gdm_user_update (GdmUser *u + g_free (real_name); + real_name = NULL; + } ++ ++ while (real_name != NULL && (ampersand = strchr (real_name, '&')) != NULL) { ++ gchar *temp_real_name1; ++ gchar *temp_real_name2; ++ gchar *temp_name; ++ ++ temp_real_name1 = g_strndup (real_name, ++ (ampersand - real_name)); ++ temp_real_name2 = g_strdup (ampersand + 1); ++ temp_name = g_strdup (pwent->pw_name); ++ temp_name[0] = toupper (temp_name[0]); ++ g_free (real_name); ++ real_name = g_strdup_printf ("%s%s%s", temp_real_name1, temp_name, temp_real_name2); ++ g_free (temp_real_name1); ++ g_free (temp_real_name2); ++ g_free (temp_name); ++ } + } else { + real_name = NULL; + } diff --git a/x11/gdm/files/patch-gui_user-switch-applet_Makefile.in b/x11/gdm/files/patch-gui_user-switch-applet_Makefile.in new file mode 100644 index 000000000..d14791f00 --- /dev/null +++ b/x11/gdm/files/patch-gui_user-switch-applet_Makefile.in @@ -0,0 +1,11 @@ +--- gui/user-switch-applet/Makefile.in.orig 2010-03-20 15:19:16.000000000 -0500 ++++ gui/user-switch-applet/Makefile.in 2010-03-20 15:20:28.000000000 -0500 +@@ -324,7 +324,7 @@ + -DLIBDIR=\""$(libdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ +- -DLIBLOCALEDIR=\""$(prefix)/lib/locale"\" \ ++ -DLIBLOCALEDIR=\""/usr/share/locale"\" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DGLADEDIR=\""$(pkgdatadir)"\" \ + -DLIBEXECDIR=\""$(libexecdir)"\" \ |