[SCM] KDE Base Workspace module packaging branch, kde4.5, updated. debian/4.4.5-3-29-g76de6e3

George Kiagiadakis gkiagia-guest at alioth.debian.org
Fri Aug 20 09:52:31 UTC 2010


The following commit has been merged in the kde4.5 branch:
commit 8df3ccaa90101afc4f54f5beaee6c9ff241e22dd
Author: George Kiagiadakis <kiagiadakis.george at gmail.com>
Date:   Fri Aug 20 11:33:11 2010 +0300

    Re-work patch 11_kdm_X_path.diff.
    
    It doesn't make any sense to realloc argv[0] since it's a pointer
    that is later set to point to a static string and it also doesn't
    make any sense to show an error before trying the fallback.
---
 debian/changelog                  |    1 +
 debian/patches/11_kdm_X_path.diff |   44 +++++++++---------------------------
 2 files changed, 12 insertions(+), 33 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f170858..fe6a980 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,7 @@ kdebase-workspace (4:4.5.0-0r1) UNRELEASED; urgency=low
   * Adjust the kdm postinst and postrm scripts to create and remove (on purge)
     a "kdm" user, which is now used by default as the user to run the greeter.
     As a consequence, add dependency on adduser on the kdm package.
+  * Re-work patch 11_kdm_X_path.diff.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sat, 31 Jul 2010 16:41:50 +0300
 
diff --git a/debian/patches/11_kdm_X_path.diff b/debian/patches/11_kdm_X_path.diff
index 194f4c7..d9d2125 100644
--- a/debian/patches/11_kdm_X_path.diff
+++ b/debian/patches/11_kdm_X_path.diff
@@ -1,53 +1,31 @@
 --- a/kdm/backend/dm.c
 +++ b/kdm/backend/dm.c
-@@ -39,6 +39,7 @@
- #include "dm_error.h"
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
- #include <stdarg.h>
-@@ -609,6 +610,16 @@
+@@ -608,7 +608,13 @@
+             exit(1);
          debug("exec %\"[s\n", argv);
          (void)execv(argv[0], argv);
-         logError("X server %\"s cannot be executed\n", argv[0]);
+-        logError("X server %\"s cannot be executed\n", argv[0]);
 +
 +        /* Let's try again with a standard path */
-+        argv[0] = (char *)realloc(argv[0], strlen("/usr/bin/X") + 1);
-+        if (argv[0] != NULL) {
-+            argv[0] = "/usr/bin/X";
-+            debug( "exec %\"[s\n", argv );
-+            (void)execv( argv[0], argv );
-+            logError( "X server %\"s cannot be executed\n", argv[0] );
-+        }
++        argv[0] = "/usr/bin/X";
++        debug( "exec %\"[s\n", argv );
++        (void)execv( argv[0], argv );
 +
++        logError( "X server %\"s cannot be executed\n", argv[0] );
          exit(1);
      case -1:
          logError("Forking X server for remote login failed: %m");
 --- a/kdm/backend/server.c
 +++ b/kdm/backend/server.c
-@@ -41,6 +41,7 @@
- #include <X11/Xlib.h>
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <signal.h>
- 
- 
-@@ -97,6 +98,16 @@
+@@ -97,6 +97,12 @@
           */
          (void)Signal(SIGUSR1, SIG_IGN);
          (void)execv(argv[0], argv);
 +
 +        /* Let's try again with a standard path */
-+        argv[0] = (char *)realloc(argv[0], strlen("/usr/bin/X") + 1);
-+        if (argv[0] != NULL) {
-+            argv[0] = "/usr/bin/X";
-+            debug( "exec %\"[s\n", argv );
-+            (void)execv( argv[0], argv );
-+            logError( "X server %\"s cannot be executed\n", argv[0] );
-+        }
++        argv[0] = "/usr/bin/X";
++        debug( "exec %\"[s\n", argv );
++        (void)execv( argv[0], argv );
 +
          logError("X server %\"s cannot be executed\n", argv[0]);
          exit(47);

-- 
KDE Base Workspace module packaging



More information about the pkg-kde-commits mailing list