r22652 - in /desktop/unstable/gdm/debian: changelog patches/68_hurd_pathmax.patch patches/69_hurd_gdm_reset_locale.patch patches/series
pochu at users.alioth.debian.org
pochu at users.alioth.debian.org
Sat Dec 19 15:18:51 UTC 2009
Author: pochu
Date: Sat Dec 19 15:18:51 2009
New Revision: 22652
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22652
Log:
* debian/patches/68_hurd_pathmax.patch:
- Don't use MAXPATHLEN and PATH_MAX since it's not defined on
GNU/Hurd. Use dynamic allocation instead.
* debian/patches/69_hurd_gdm_reset_locale.patch:
- Don't implement gdm_reset_locale() only if RLIM_NLIMITS is defined,
since it has nothing to do with it and it's undefined on the Hurd.
Added:
desktop/unstable/gdm/debian/patches/68_hurd_pathmax.patch
desktop/unstable/gdm/debian/patches/69_hurd_gdm_reset_locale.patch
Modified:
desktop/unstable/gdm/debian/changelog
desktop/unstable/gdm/debian/patches/series
Modified: desktop/unstable/gdm/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm/debian/changelog?rev=22652&op=diff
==============================================================================
--- desktop/unstable/gdm/debian/changelog [utf-8] (original)
+++ desktop/unstable/gdm/debian/changelog [utf-8] Sat Dec 19 15:18:51 2009
@@ -1,3 +1,14 @@
+gdm (2.20.10-2) UNRELEASED; urgency=low
+
+ * debian/patches/68_hurd_pathmax.patch:
+ - Don't use MAXPATHLEN and PATH_MAX since it's not defined on
+ GNU/Hurd. Use dynamic allocation instead.
+ * debian/patches/69_hurd_gdm_reset_locale.patch:
+ - Don't implement gdm_reset_locale() only if RLIM_NLIMITS is defined,
+ since it has nothing to do with it and it's undefined on the Hurd.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org> Mon, 14 Dec 2009 21:59:58 +0100
+
gdm (2.20.10-1) unstable; urgency=low
* 21_XKeepsCrashing_bashism.patch: new patch, fix a bashism.
Added: desktop/unstable/gdm/debian/patches/68_hurd_pathmax.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm/debian/patches/68_hurd_pathmax.patch?rev=22652&op=file
==============================================================================
--- desktop/unstable/gdm/debian/patches/68_hurd_pathmax.patch (added)
+++ desktop/unstable/gdm/debian/patches/68_hurd_pathmax.patch [utf-8] Sat Dec 19 15:18:51 2009
@@ -1,0 +1,97 @@
+--- a/daemon/gdm.c
++++ b/daemon/gdm.c
+@@ -1439,28 +1439,33 @@
+ static gboolean
+ linux_only_is_running (pid_t pid)
+ {
+- char resolved_self[PATH_MAX];
+- char resolved_running[PATH_MAX];
++ char *resolved_self;
++ char *resolved_running;
++ gboolean ret;
+
+ char *running = g_strdup_printf ("/proc/%lu/exe", (gulong)pid);
+
+- if (realpath ("/proc/self/exe", resolved_self) == NULL) {
++ if ((resolved_self = realpath ("/proc/self/exe", NULL)) == NULL) {
+ g_free (running);
+ /* probably not a linux system */
+ return TRUE;
+ }
+
+- if (realpath (running, resolved_running) == NULL) {
++ if ((resolved_running = realpath (running, NULL)) == NULL) {
+ g_free (running);
++ free (resolved_self);
+ /* probably not a linux system */
+ return TRUE;
+ }
+
+ g_free (running);
+
++ ret = FALSE;
+ if (strcmp (resolved_running, resolved_self) == 0)
+- return TRUE;
+- return FALSE;
++ ret = TRUE;
++ free (resolved_self);
++ free (resolved_running);
++ return ret;
+ }
+
+ static void
+--- a/daemon/gdm-daemon-config.c
++++ b/daemon/gdm-daemon-config.c
+@@ -2524,13 +2524,13 @@
+ }
+
+ if (picfile != NULL) {
+- char buf[PATH_MAX];
+- if (realpath (picfile, buf) == NULL) {
++ char *buf;
++ if ((buf = realpath (picfile, NULL)) == NULL) {
+ g_free (picfile);
+ picfile = NULL;
+ } else {
+ g_free (picfile);
+- picfile = g_strdup (buf);
++ picfile = buf;
+ }
+ }
+
+--- a/daemon/slave.c
++++ b/daemon/slave.c
+@@ -60,8 +60,6 @@
+
+ #if !defined (MAXPATHLEN) && defined (PATH_MAX)
+ #define MAXPATHLEN PATH_MAX
+-#elif !defined (MAXPATHLEN)
+-#error "MAXPATHLEN or PATH_MAX undefined"
+ #endif
+
+ #include <X11/Xlib.h>
+@@ -4191,14 +4189,13 @@
+ /* If using pseudo-devices, setup symlink if it does not exist */
+ if (device != NULL &&
+ gdm_daemon_config_get_value_bool (GDM_KEY_UTMP_PSEUDO_DEVICE)) {
+- gchar buf[MAXPATHLEN + 1];
++ gchar *buf;
+
+- memset (buf, 0, sizeof (gchar) * (MAXPATHLEN + 1));
+
+ if (stat (device, &st) != 0) {
+ gdm_debug ("Creating pseudo-device %s", device);
+ symlink ("/dev/null", device);
+- } else if (readlink (device, buf, MAXPATHLEN) > 0) {
++ } else if ((buf = realpath (device, NULL)) != NULL) {
+ if (strcmp (buf, "/dev/null") == 0) {
+ /* Touch symlink */
+ struct utimbuf timebuf;
+@@ -4214,6 +4211,7 @@
+ } else {
+ gdm_debug ("Device %s points to %s", device, buf);
+ }
++ free (buf);
+ } else {
+ gdm_debug ("Device %s is not a symlink", device);
+ }
Added: desktop/unstable/gdm/debian/patches/69_hurd_gdm_reset_locale.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm/debian/patches/69_hurd_gdm_reset_locale.patch?rev=22652&op=file
==============================================================================
--- desktop/unstable/gdm/debian/patches/69_hurd_gdm_reset_locale.patch (added)
+++ desktop/unstable/gdm/debian/patches/69_hurd_gdm_reset_locale.patch [utf-8] Sat Dec 19 15:18:51 2009
@@ -1,0 +1,93 @@
+--- a/daemon/misc.c
++++ b/daemon/misc.c
+@@ -1680,43 +1680,6 @@
+ return ret;
+ }
+
+-#ifdef RLIM_NLIMITS
+-#define NUM_OF_LIMITS RLIM_NLIMITS
+-#else /* ! RLIM_NLIMITS */
+-#ifdef RLIMIT_NLIMITS
+-#define NUM_OF_LIMITS RLIMIT_NLIMITS
+-#endif /* RLIMIT_NLIMITS */
+-#endif /* RLIM_NLIMITS */
+-
+-/* If we can count limits then the reset code is simple */
+-#ifdef NUM_OF_LIMITS
+-
+-static struct rlimit limits[NUM_OF_LIMITS];
+-
+-void
+-gdm_get_initial_limits (void)
+-{
+- int i;
+-
+- for (i = 0; i < NUM_OF_LIMITS; i++) {
+- /* Some sane defaults */
+- limits[i].rlim_cur = RLIM_INFINITY;
+- limits[i].rlim_max = RLIM_INFINITY;
+- /* Get the limits */
+- getrlimit (i, &(limits[i]));
+- }
+-}
+-
+-void
+-gdm_reset_limits (void)
+-{
+- int i;
+-
+- for (i = 0; i < NUM_OF_LIMITS; i++) {
+- /* Get the limits */
+- setrlimit (i, &(limits[i]));
+- }
+-}
+
+ #define CHECK_LC(value, category) \
+ (g_str_has_prefix (line->str, value "=")) \
+@@ -1813,6 +1776,46 @@
+
+ #undef CHECK_LC
+
++#ifdef RLIM_NLIMITS
++#define NUM_OF_LIMITS RLIM_NLIMITS
++#else /* ! RLIM_NLIMITS */
++#ifdef RLIMIT_NLIMITS
++#define NUM_OF_LIMITS RLIMIT_NLIMITS
++#endif /* RLIMIT_NLIMITS */
++#endif /* RLIM_NLIMITS */
++
++/* If we can count limits then the reset code is simple */
++#ifdef NUM_OF_LIMITS
++
++static struct rlimit limits[NUM_OF_LIMITS];
++
++void
++gdm_get_initial_limits (void)
++{
++ int i;
++
++ for (i = 0; i < NUM_OF_LIMITS; i++) {
++ /* Some sane defaults */
++ limits[i].rlim_cur = RLIM_INFINITY;
++ limits[i].rlim_max = RLIM_INFINITY;
++ /* Get the limits */
++ getrlimit (i, &(limits[i]));
++ }
++}
++
++
++void
++gdm_reset_limits (void)
++{
++ int i;
++
++ for (i = 0; i < NUM_OF_LIMITS; i++) {
++ /* Get the limits */
++ setrlimit (i, &(limits[i]));
++ }
++}
++
++
+ #else /* ! NUM_OF_LIMITS */
+ /* We have to go one by one here */
+
Modified: desktop/unstable/gdm/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gdm/debian/patches/series?rev=22652&op=diff
==============================================================================
--- desktop/unstable/gdm/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gdm/debian/patches/series [utf-8] Sat Dec 19 15:18:51 2009
@@ -12,4 +12,6 @@
56_xnest-wrapper.patch
62_reference-manual-docbook-entity-reference.patch
#66_socket-in-var-run-for-fhs.patch
+68_hurd_pathmax.patch
+69_hurd_gdm_reset_locale.patch
70_mandatory-relibtoolize.patch
More information about the pkg-gnome-commits
mailing list