~ubuntu-branches/ubuntu/raring/consolekit/raring

« back to all changes in this revision

Viewing changes to debian/patches/82-hurd_support.patch

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-10-13 12:28:33 UTC
  • mfrom: (0.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20101013122833-i43tbcnvjs3jiynv
Tags: 0.4.2-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - 10-retry_console_open_eio.patch: Retry console opens if they return
    EIO, since this may happen while a tty is closing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
Author: Pino Toscano <pino@kde.org>
11
11
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552393
12
12
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24738
 
13
Last-Update: 2010-09-20
13
14
 
14
 
--- consolekit-0.3.1.orig/configure.ac
15
 
+++ consolekit-0.3.1/configure.ac
 
15
Index: consolekit/configure.ac
 
16
===================================================================
 
17
--- consolekit.orig/configure.ac        2010-09-20 03:07:20.969097019 +0200
 
18
+++ consolekit/configure.ac     2010-09-20 03:07:22.189095438 +0200
16
19
@@ -190,6 +190,9 @@
17
20
         *-*-solaris*)
18
21
         CK_BACKEND="solaris"
31
34
 AC_SUBST(CK_BACKEND)
32
35
 
33
36
 dnl ---------------------------------------------------------------------------
34
 
--- consolekit-0.3.1.orig/src/Makefile.am
35
 
+++ consolekit-0.3.1/src/Makefile.am
36
 
@@ -56,11 +56,18 @@
 
37
Index: consolekit/src/Makefile.am
 
38
===================================================================
 
39
--- consolekit.orig/src/Makefile.am     2010-09-20 03:07:09.397095424 +0200
 
40
+++ consolekit/src/Makefile.am  2010-09-20 03:07:22.189095438 +0200
 
41
@@ -57,11 +57,18 @@
37
42
        $(NULL)
38
43
 libck_la_LIBADD = $(KVM_LIBS)
39
44
 endif
52
57
        $(NULL)
53
58
 
54
59
 sbin_PROGRAMS =                \
55
 
--- /dev/null
56
 
+++ consolekit-0.3.1/src/ck-sysdeps-gnu.c
57
 
@@ -0,0 +1,396 @@
 
60
Index: consolekit/src/ck-sysdeps-gnu.c
 
61
===================================================================
 
62
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
 
63
+++ consolekit/src/ck-sysdeps-gnu.c     2010-09-20 03:07:22.189095438 +0200
 
64
@@ -0,0 +1,402 @@
58
65
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
59
66
+ *
60
67
+ * Copyright (C) 2009 Pino Toscano <pino@kde.org>
379
386
+        return ret;
380
387
+}
381
388
+
 
389
+gboolean
 
390
+ck_supports_activatable_consoles (void)
 
391
+{
 
392
+        return TRUE;
 
393
+}
 
394
+
382
395
+char *
383
396
+ck_get_console_device_for_num (guint num)
384
397
+{
451
464
+
452
465
+        return ret;
453
466
+}
454
 
--- consolekit-0.3.1.orig/pam-ck-connector/pam-ck-connector.c
455
 
+++ consolekit-0.3.1/pam-ck-connector/pam-ck-connector.c
456
 
@@ -244,7 +244,7 @@
 
467
Index: consolekit/pam-ck-connector/pam-ck-connector.c
 
468
===================================================================
 
469
--- consolekit.orig/pam-ck-connector/pam-ck-connector.c 2010-09-20 17:15:53.000000000 +0200
 
470
+++ consolekit/pam-ck-connector/pam-ck-connector.c      2010-09-20 17:33:54.000000000 +0200
 
471
@@ -244,12 +244,12 @@
457
472
         const char *s;
458
473
         uid_t       uid;
459
474
         char        buf[256];
462
477
         DBusError   error;
463
478
         dbus_bool_t is_local;
464
479
 
465
 
@@ -252,6 +252,8 @@
466
 
 
 
480
         ret = PAM_IGNORE;
 
481
-
 
482
+        ttybuf = NULL;
467
483
         is_local = TRUE;
468
484
 
469
 
+        ttybuf = NULL;
470
 
+
471
485
         _parse_pam_args (pamh, flags, argc, argv);
472
 
 
473
 
         /* Register with ConsoleKit as part of the session management */
474
 
@@ -295,7 +297,9 @@
 
486
@@ -295,7 +295,13 @@
475
487
                 x11_display = display_device;
476
488
                 display_device = "";
477
489
         } else if (strncmp (_PATH_DEV, display_device, 5) != 0) {
478
490
-                snprintf (ttybuf, sizeof (ttybuf), _PATH_DEV "%s", display_device);
479
491
+                int len = strlen (_PATH_DEV) + strlen (display_device) + 1;
480
492
+                ttybuf = malloc (len);
 
493
+                if (ttybuf == NULL) {
 
494
+                        ck_pam_syslog (pamh, LOG_ERR, "oom allocating ttybuf");
 
495
+                        goto out;
 
496
+                }
481
497
+                snprintf (ttybuf, len, _PATH_DEV "%s", display_device);
482
498
                 display_device = ttybuf;
483
499
         }
484
500
 
485
 
@@ -411,6 +415,7 @@
 
501
@@ -411,6 +417,8 @@
486
502
         ret = PAM_SUCCESS;
487
503
 
488
504
 out:
489
505
+        free (ttybuf);
 
506
+
490
507
         return ret;
491
508
 }
492
509