debian/0000775000000000000000000000000012115172025007164 5ustar debian/libck-connector-dev.install0000664000000000000000000000032612115166500014406 0ustar usr/lib/*/libck-connector.so usr/lib/*/pkgconfig/ usr/include/ConsoleKit/ck-connector/ usr/share/dbus-1/interfaces/org.freedesktop.ConsoleKit.*.xml usr/share/doc/ConsoleKit/spec/ usr/share/doc/libck-connector-dev/ debian/consolekit.docs0000664000000000000000000000003112115166500012203 0ustar AUTHORS NEWS README TODO debian/libck-connector0.symbols0000664000000000000000000000053612115166500013737 0ustar libck-connector.so.0 libck-connector0 #MINVER# ck_connector_close_session@Base 0.2.1 ck_connector_get_cookie@Base 0.2.1 ck_connector_new@Base 0.2.1 ck_connector_open_session@Base 0.2.1 ck_connector_open_session_for_user@Base 0.2.1 ck_connector_open_session_with_parameters@Base 0.2.1 ck_connector_ref@Base 0.2.1 ck_connector_unref@Base 0.2.1 debian/90consolekit0000664000000000000000000000200312115166500011426 0ustar # -*- sh -*- # Xsession.d script for ck-launch-session. # # # This file is sourced by Xsession(5), not executed. CK_LAUNCH_SESSION=/usr/bin/ck-launch-session is_on_console() { session=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ --type=method_call --print-reply --reply-timeout=2000 \ /org/freedesktop/ConsoleKit/Manager \ org.freedesktop.ConsoleKit.Manager.GetCurrentSession \ | grep path | awk '{print $3}' | sed s/\"//g) x11_display=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ --type=method_call --print-reply --reply-timeout=2000 \ $session org.freedesktop.ConsoleKit.Session.GetX11Display \ | grep string | awk '{print $2}' | sed s/\"//g) if [ -z "$x11_display" ] ; then return 0 else return 1 fi } # gdm already creates a CK session for us, so do not run the expensive D-Bus # calls if we have $GDMSESSION if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] && \ ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then STARTUP="$CK_LAUNCH_SESSION $STARTUP" fi debian/copyright0000664000000000000000000000520512115166500011122 0ustar This package was debianized by Michael Biebl on Thu, 29 Mar 2007 01:38:27 +0200. It was downloaded from http://people.freedesktop.org/~mccann/dist/. Upstream Author: William Jon McCann Copyright: Copyright (C) 2006 William Jon McCann License: GPL v2 or later This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. =============================================================================== libck-connector/* pam-ck-connector/* Copyright: Copyright (c) 2007 David Zeuthen Copyright (c) 2007 William Jon McCann License: MIT license Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =============================================================================== The Debian packaging is (C) 2007, Michael Biebl and is licensed under the GPL, see above. debian/libpam-ck-connector.pam-auth-update0000664000000000000000000000025112115166500015730 0ustar Name: ConsoleKit Session Management Default: yes Priority: 0 Session-Interactive-Only: yes Session-Type: Additional Session-Final: optional pam_ck_connector.so nox11 debian/gbp.conf0000664000000000000000000000003612115166500010603 0ustar [DEFAULT] pristine-tar = True debian/source/0000775000000000000000000000000012115166500010465 5ustar debian/source/format0000664000000000000000000000001412115166500011673 0ustar 3.0 (quilt) debian/README.Debian0000664000000000000000000000050012115166500011221 0ustar ConsoleKit for Debian --------------------- ConsoleKit allows programs to track seats and sessions. It either needs integration into the login manager, like gdm, or it can go through a pam module. Install the package libpam-ck-connector for that. -- Michael Biebl Thu, 29 Mar 2007 01:38:27 +0200 debian/libpam-ck-connector.prerm0000664000000000000000000000015512115166500014064 0ustar #!/bin/sh set -e if [ "$1" = remove ]; then pam-auth-update --package --remove consolekit fi #DEBHELPER# debian/changelog0000664000000000000000000004404112115167522011047 0ustar consolekit (0.4.5-3.1ubuntu2) raring; urgency=low * debian/patches/04-long_device_names.patch: allow for device names longer than 16 characters. Thanks to Aleix Conchillo FlaquƩ for the patch. (LP: #1130923) -- Brian Murray Mon, 04 Mar 2013 10:58:51 -0800 consolekit (0.4.5-3.1ubuntu1) raring; urgency=low * debian/patches/03-cleanup_console_tags.patch: call g_dir_close() when we're done, fixing a small memory leak. -- Steve Langasek Wed, 23 Jan 2013 14:06:31 -0800 consolekit (0.4.5-3.1) unstable; urgency=low * Non-maintainer upload. * Include patch by Petr Salinger to ignore empty environments (Closes: #570015) -- Christoph Egger Mon, 30 Jul 2012 13:57:55 +0200 consolekit (0.4.5-3) unstable; urgency=low * Strip debian/tmp/ from .install files. * Remove pre-lenny migration code, drop debian/consolekit.preinst. * debian/consolekit.docs: Don't install a second copy of the spec file, there is already one in libck-connector-dev. * Bump debhelper compatibility level to 9 for hardening build flags via dpkg-buildflags and multiarch support. * Install libck-connector and libpam-ck-connector into multiarch paths and mark them as Multi-Arch: same. * Tighten dependencies on libck-connector0. * Bump Standards-Version to 3.9.3. No further changes. -- Michael Biebl Wed, 29 Feb 2012 23:04:51 +0100 consolekit (0.4.5-2) unstable; urgency=low * Add 00git_truncate_frequent.patch: ck-history: don't truncate --frequent output to 8 chars. (Closes: #660171, LP: #476811) * debian/README.Debian: Fix grammar, thanks lintian. -- Martin Pitt Fri, 24 Feb 2012 10:18:00 +0100 consolekit (0.4.5-1) unstable; urgency=low [ Michael Biebl ] * Bump Standards-Version to 3.9.2. No further changes. * Bump debhelper compatibility level to 8. [ Martin Pitt ] * New upstream bug fix release. * Drop 01-retry-console-open-on-EIO.patch, included upstream. -- Martin Pitt Fri, 20 May 2011 12:17:48 +0200 consolekit (0.4.4-1) unstable; urgency=low * New upstream release. -- Michael Biebl Fri, 25 Feb 2011 21:06:58 +0100 consolekit (0.4.3-2) unstable; urgency=low * Add 01-retry-console-open-on-EIO.patch: As reported in LP: #544139, ConsoleKit sometimes fails to track the active VT. This particular case was tracked down to a race condition that happens if you try to open /dev/console while the current TTY is currently being closed. This yields an -EIO error, in which case CK should just try again. Thanks Colin Watson for the patch! -- Martin Pitt Sat, 20 Nov 2010 18:17:28 +0100 consolekit (0.4.3-1) unstable; urgency=low * New upstream release. - The VT_WAITEVENT mechanism proved to be racy and e.g. caused events being lost on suspend/resume. So this change was reverted again. (Closes: #600756) * Remove patches - d/p/01-fallback_no_vt_waitevent.patch (obsolete) - d/p/80-gnukfreebsd_support_configure.ac.patch (merged upstream) - d/p/debian/patches/99-autoreconf.patch (use dh-autoreconf instead) * Use dh-autoreconf to update the build system - Add Build-Depends on dh-autoreconf. - Run autoreconf dh addon in debian/rules. * Switch to source format 3.0 (quilt) - Add debian/source/format. - Drop quilt from Build-Depends. - Remove /usr/share/cdbs/1/rules/patchsys-quilt.mk include. - Remove debian/README.source. * Move from cdbs to dh - Drop Build-Depends on cdbs. - Bump Build-Depends on debhelper to (>= 7.0.50~) for override targets. - Convert debian/rules to use dh. * debian/libck-connector-dev.install - Install D-Bus interfaces files. * Install systemd unit files. * debian/consolekit.docs - Install AUTHORS, NEWS, README and TODO. cdbs did this automatically for us, with dh we have to list them explicitly. -- Michael Biebl Wed, 17 Nov 2010 08:40:58 +0100 consolekit (0.4.2-1) unstable; urgency=low * New upstream release. - Use VT_WAITEVENT ioctl to monitor VT switches to avoid spawning a thread for each possible VT. This requires a Linux kernel 2.6.32 or newer. (Closes: #526499) * debian/control - Bump Standards-Version to 3.9.1. - Use architecture wildcard kfreebsd-any for the libkvm-dev Build-Depends. - Bump Build-Depends on libglib2.0-dev to (>= 2.14.0) for GRegex. * Remove patches which have been merged upstream. - debian/patches/01-dont_daemonize_when_activated.patch - debian/patches/02-dont_take_bus_name_until_ready.patch - debian/patches/04-dont_fail_with_invalid_seats_file.patch * debian/patches/01-fallback_no_vt_waitevent.patch - Add runtime check for VT_WAITEVENT and fallback to old behaviour of creating a thread for every possible VT. * debian/patches/82-hurd_support.patch - Updated for 0.4.2. - Check return value of malloc() to correctly handle OOM situations. Thanks Pino Toscano for the updated patch. -- Michael Biebl Tue, 21 Sep 2010 05:52:04 +0200 consolekit (0.4.1-4) unstable; urgency=low [ Martin Pitt ] * debian/90consolekit: gdm already creates a CK session for us, so do not run the expensive D-Bus calls if we have $GDMSESSION. * Bump Standards-Version to 3.8.4 (no changes necessary). -- Michael Biebl Wed, 24 Feb 2010 23:47:23 +0100 consolekit (0.4.1-3) unstable; urgency=low [ Martin Pitt ] * Bump Breaks to udev to << 147, since 147-1 is in unstable now. [ Michael Biebl ] * debian/patches/01-dont_daemonize_when_activated.patch - Don't daemonize when being activated by D-Bus. D-Bus service activation does not (yet) handle forking daemons properly. Patch pulled from upstream Git. * debian/patches/04-defer_daemonizing.patch - Drop this patch, obsoleted by 01-dont_daemonize_when_activated.patch. * debian/patches/02-dont_take_bus_name_until_ready.patch - Claim bus name after registering the manager object. This fixes a race when being activated by a method call on the manager object, where ConsoleKit gets started but the method call fails. (Closes: #561592) Patch pulled from upstream Git. * debian/patches/04-dont_fail_with_invalid_seats_file.patch - Don't segfault when reading an invalid seats file and ck_seat_new_from_file returns NULL. (Closes: #561106) -- Michael Biebl Tue, 12 Jan 2010 13:48:08 +0100 consolekit (0.4.1-2) unstable; urgency=low * Upload to unstable. -- Michael Biebl Tue, 10 Nov 2009 00:12:42 +0100 consolekit (0.4.1-1) experimental; urgency=low * New upstream release. * The 'session_active_changed' type has been removed for session.d/ callouts. Tools relying on that need to be ported to the new seat.d/ infrastructure and use 'seat_active_session_changed' instead. This breaks older versions of udev-acl, so add a Breaks: udev (<< 147~). -- Michael Biebl Thu, 05 Nov 2009 17:38:31 +0100 consolekit (0.3.1-2) unstable; urgency=low [ Martin Pitt ] * debian/consolekit.preinst: Remove obsolete 90-console-kit conffile for upgrades from Ubuntu 8.04. (Can be dropped after 10.04 LTS release.) [ Michael Biebl ] * debian/patches/82-hurd_support.patch - Add support for GNU/Hurd. (Closes: #552393) The patch adds a sysdeps-gnu backend, which implements the process management using Hurd's libps, the *ttyent API for the part of the console implementation and the rest using similar (valid) approaches of other backends. Also, it fixes the PATH_MAX usage in pam-ck-connector/pam-ck-connector.c by using a variable-length malloc'ed buffer. Thanks to Pino Toscano for the patch. * debian/patches/99-autoreconf.patch - Run autoreconf as 82-hurd_support.patch changes the build system. * debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch - Remove, made obsolete by 99-autoreconf.patch. -- Michael Biebl Mon, 26 Oct 2009 00:52:52 +0100 consolekit (0.3.1-1) unstable; urgency=low * New upstream release: - port to PolicyKit 1.0 - D-Bus policy updates - better diagnostic information for unimplemented backends - file monitoring fixes - get VT from X display if no controlling tty is available - add "nox11" option to PAM module - parse log entries with no body correctly - fix zero-sized struct/unions - solaris build fixes - parse gecos field for real name - leak fixes - compile warning fixes - fix doc xml validation errors - fix doc generation when srcdir != builddir - add example upstart events for logging - fix ChangeLog generation script to work with git-log moved to libexecdir * debian/control - Add Build-Depends on libpolkit-gobject-1-dev (>= 0.92). * debian/consolekit.install - Install policy definitions for ConsoleKit. * Drop patches - 04-consolekit_park.patch (obsolete, not used) - 05-dbus_policy.patch (merged upstream) - 05-pam-add-nox11.patch (merged upstream) - 06-xmlto_skip_validation.patch (fixed upstream, doc is valid xml now) - 08-fix-double-close.patch (merged upstream) - 09-directory-handle-leak.patch (merged upstream) - 10-file_monitor_remove_watch_crash.patch (merged upstream) - 11-unref-dbus-proxy.patch (merged upstream) - 12-allow-get-sessions.patch (merged upstream) * debian/pam-foreground-compat.ck - Don't create tag files for remote users. (Closes: #547347) -- Michael Biebl Fri, 02 Oct 2009 02:58:05 +0200 consolekit (0.3.0-4) unstable; urgency=low * debian/consolekit.logrotate: Install a logrotate configuration file for /var/log/ConsoleKit/history so that it doesn't get huge and cause ck-history to take a long while to run on login. ck-history already handles reading from rotated logs. (Closes: #537833) Thanks to James Westby for the patch. * debian/libpam-ck-connector.pam-auth-update: Mark this module as applying only to interactive sessions. (Closes: #543306) Thanks to Steve Langasek for the patch. * Add README.source which refers to the quilt documentation. * Bump Standards-Version to 3.8.3. -- Michael Biebl Wed, 02 Sep 2009 18:04:01 +0200 consolekit (0.3.0-3) unstable; urgency=low * debian/control - Update Vcs-* fields. Package is now managed with Git on git.debian.org. - Bump Standards-Version to 3.8.2. No further changes. * debian/copyright - Misc whitespace cleanups. - Refer to versioned GPL-2 file. * debian/consolekit.preinst - Use "set -e" instead of "#!/bin/sh -e". * debian/90consolekit - If an X session is started from the console using startx, make sure to register a CK session, even if XDG_SESSION_COOKIE is already set. (Closes: #520720) -- Michael Biebl Tue, 14 Jul 2009 20:09:54 +0200 consolekit (0.3.0-2) unstable; urgency=low * debian/consolekit.prerm - Stop console-kit-daemon upon package removal (using start-stop-daemon). (Closes: #518346) -- Michael Biebl Tue, 10 Mar 2009 17:15:35 +0100 consolekit (0.3.0-1) unstable; urgency=low * New upstream release. * debian/patches/01-dbus_policy.patch - Removed, the access to the restart and stop actions is now properly restricted by checks in the source code. * debian/patches/02-exit_with_dbus.patch - Removed, merged upstream. * debian/patches/05-dbus_policy.patch - Updated by pulling latest patch from upstream Git. * debian/patches/06-xmlto_skip_validation.patch - Skip XML validation when generating the documentation. (Closes: #516253) A proper fix will be, to make ConsoleKit.xml actually valid XML. * debian/consolekit.docs - Update path to spec html file. * Merge patches from Ubuntu - debian/patches/04-consolekit_park.patch (Closes: #489032) - debian/patches/05-pam-add-nox11.patch - debian/patches/08-fix-double-close.patch - debian/patches/09-directory-handle-leak.patch (Closes: #516532) - debian/patches/10-file_monitor_remove_watch_crash.patch - debian/patches/11-unref-dbus-proxy.patch - debian/patches/12-allow-get-sessions.patch * debian/control - Wrap Build-Depends. - Bump Build-Depends on debhelper to (>= 7). * debian/compat - Bump debhelper compat level to 7. * Fix FTBFS on GNU/kFreeBSD. (Closes: #511270) - debian/patches/80-gnukfreebsd_support_configure.ac.patch debian/patches/81-gnukfreebsd_support_pseudo_run_autoconf.patch + Add kfreebsd target to configure(.ac) script - debian/control + Add libkvm-dev to Build-Depends on kfreebsd ports. Patch by Luca Favatella, thanks. * debian/libpam-ck-connector.{pam-auth-update,install,postinst,prerm}, debian/rules: enable pam_ck_connector by default using the new pam-auth-update support. * debian/control: depend on libpam-runtime (>= 1.0.1-6) for the above. -- Michael Biebl Tue, 10 Mar 2009 12:48:43 +0100 consolekit (0.2.10-5) unstable; urgency=high * debian/watch - Fix the regex to not use the second Perl group. * Urgency high as it still blocks #503532. -- Michael Biebl Thu, 08 Jan 2009 16:56:40 +0100 consolekit (0.2.10-4) unstable; urgency=high [ Michael Biebl ] * debian/watch - Check for both .gz and .bz2 tarballs. * debian/control - Add ${misc:Depends} to libck-connector-dev. [ Simon McVittie ] * debian/patches/05-dbus_policy.patch: patch from Colin Walters so ConsoleKit introspection and SetIdleHint still work after CVE-2008-4311 is fixed in dbus-daemon. (Closes: #510645) * Urgency high for bugfix that blocks CVE-2008-4311 upload. -- Michael Biebl Wed, 07 Jan 2009 17:58:29 +0100 consolekit (0.2.10-3) unstable; urgency=low * debian/patches/04-defer_daemonizing.patch - Daemonize after registering the dbus name to avoid a race condition where dbus-daemon thinks that console-kit-daemon has failed to start properly and returns an error to the caller. (Closes: #507815) * Document all patches to make lintian happy. -- Michael Biebl Fri, 05 Dec 2008 01:28:46 +0100 consolekit (0.2.10-2) unstable; urgency=high * debian/patches/03-cleanup_console_tags.patch - Properly initialize GError to avoid daemon crash if /var/run/console/ does not exist. Also, demote message about it from warning to debug, since it is not an error condition at all. (Closes: #492686) Patch by Martin Pitt, thanks. -- Michael Biebl Mon, 28 Jul 2008 11:09:28 +0200 consolekit (0.2.10-1) unstable; urgency=low * New upstream release. (Closes: #464005, #489030) * debian/control - Add Build-Depends on pkg-config. - Add Build-Depends on zlib1g-dev. - Add Build-Depends on quilt. - Bump Standards-Version to 3.8.0. No further changes. * debian/org.freedesktop.ConsoleKit.service - Removed, merged upstream. * debian/libck-connector0.symbols - Add symbols file for libck-connector library. * consolekit.install - Install all binaries in /usr/bin and /usr/sbin instead of listing them individually. - Update the list of installed directories. - Install 90consolekit into /etc/X11/Xsession.d. * debian/pam-foreground-compat.ck - Add run-session.d script which creates pam_console compatible tag files. Script shamelessly taken from Ubuntu. (Closes: #422349) * debian/rules - Install pam-foreground-compat.ck into /usr/lib/ConsoleKit/run-session.d. - Include patchsys-quilt.mk for patch management. * debian/90consolekit - Xsession ConsoleKit integration. Script is taken from Ubuntu but renamed to better fit with the existing naming conventions for Xsession scripts. (Closes: #452627) * debian/patches/01-dbus_policy.patch - Allow only root to call the Restart and Stop D-Bus methods since we are not using PolicyKit to restrict the access to those methods. * debian/patches/02-exit_with_dbus.patch - Pulled from upstream git. Exit when D-Bus system bus is stopped. * debian/patches/03-cleanup_console_tags.patch - Cleanup console tag files on application startup and shutdown. -- Michael Biebl Sat, 26 Jul 2008 00:29:46 +0200 consolekit (0.2.3-3) unstable; urgency=low * debian/control - The Vcs-* fields are now officially supported, so remove the XS- prefix. - Bump Standards-Version to 3.7.3. No further changes required. - Drop dependency on lsb-base, as we no longer install a SysV init script. - Tighten dependency on dbus (>= 1.1.2). This is required for the D-Bus system activation support. * debian/consolekit.init - Deleted, no longer required. * debian/consolekit.install - Install the D-Bus service file debian/org.freedesktop.ConsoleKit.service into /usr/share/dbus-1/system-services. This allows to start the ConsoleKit service on demand. * debian/consolekit.preinst - Make sure the conffile /etc/init.d/consolekit and its symlinks in /etc/rc?.d are properly removed on package upgrades. -- Michael Biebl Tue, 11 Dec 2007 23:14:14 +0100 consolekit (0.2.3-2) unstable; urgency=low * debian/control - Add Depends: lsb-base (>= 3.0-6) as the init script uses the LSB logging functions. - Use the new "Homepage:" field to specify the upstream URL. -- Michael Biebl Sun, 21 Oct 2007 20:04:16 +0200 consolekit (0.2.3-1) unstable; urgency=low * New upstream release. * debian/consolekit.install - Install the ck-get-x11-display-device binary. - Install the configuration files in /etc/ConsoleKit/. * debian/consolekit.docs - Install the ConsoleKit specification document. -- Michael Biebl Wed, 19 Sep 2007 21:34:38 +0200 consolekit (0.2.1-2) unstable; urgency=low * Upload to unstable. -- Michael Biebl Fri, 10 Aug 2007 00:22:56 +0200 consolekit (0.2.1-1) experimental; urgency=low * Initial release. (Closes: #416568) -- Michael Biebl Thu, 29 Mar 2007 01:38:27 +0200 debian/consolekit.logrotate0000664000000000000000000000020712115166500013260 0ustar /var/log/ConsoleKit/history { monthly rotate 6 delaycompress compress notifempty missingok } debian/libck-connector0.install0000664000000000000000000000003712115166500013711 0ustar usr/lib/*/libck-connector.so.* debian/watch0000664000000000000000000000013712115166500010217 0ustar version=3 http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-(.*)\.tar\.(?:gz|bz2) debian/libpam-ck-connector.install0000664000000000000000000000015212115166500014402 0ustar lib/*/security/pam_ck_connector.so usr/share/man/man8/pam_ck_connector.8 usr/share/pam-configs/consolekit debian/compat0000664000000000000000000000000212115166500010363 0ustar 9 debian/libpam-ck-connector.postinst0000664000000000000000000000007212115166500014620 0ustar #!/bin/sh set -e pam-auth-update --package #DEBHELPER# debian/consolekit.prerm0000664000000000000000000000033012115166500012402 0ustar #!/bin/sh set -e DAEMON=/usr/sbin/console-kit-daemon PIDFILE=/var/run/console-kit-daemon.pid if [ "$1" = remove ]; then start-stop-daemon --stop --quiet --oknodo --exec $DAEMON --pidfile $PIDFILE fi #DEBHELPER# debian/control0000664000000000000000000000526512115166500010600 0ustar Source: consolekit Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Utopia Maintenance Team Uploaders: Michael Biebl Build-Depends: debhelper (>= 9), autotools-dev, pkg-config, libdbus-glib-1-dev (>= 0.30), libglib2.0-dev (>= 2.14.0), libx11-dev (>= 1.0.0), libkvm-dev [kfreebsd-any], xmlto, libpam0g-dev, libpolkit-gobject-1-dev (>= 0.92), zlib1g-dev, dh-autoreconf Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-utopia/consolekit.git Vcs-Browser: http://git.debian.org/?p=pkg-utopia/consolekit.git;a=summary Homepage: http://www.freedesktop.org/wiki/Software/ConsoleKit Package: consolekit Section: admin Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libck-connector0 (= ${binary:Version}), dbus (>= 1.1.2) Recommends: libpam-ck-connector Breaks: udev (<< 147) Description: framework for defining and tracking users, sessions and seats ConsoleKit is a system daemon for tracking what users are logged into the system and how they interact with the computer (e.g. which keyboard and mouse they use). . It provides asynchronous notification via the system message bus. . This package provides the system daemon and tools to interact with it. Package: libck-connector0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: ConsoleKit libraries ConsoleKit is a system daemon for tracking what users are logged into the system and how they interact with the computer (e.g. which keyboard and mouse they use). . This package provides a convenience library which simplifies the access to ConsoleKit. Package: libck-connector-dev Section: libdevel Architecture: any Depends: libck-connector0 (= ${binary:Version}), ${misc:Depends}, libdbus-1-dev Description: ConsoleKit development files ConsoleKit is a system daemon for tracking what users are logged into the system and how they interact with the computer (e.g. which keyboard and mouse they use). . This package provides the development libraries and headers. Package: libpam-ck-connector Section: admin Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, libck-connector0 (= ${binary:Version}), libpam-runtime (>= 1.0.1-6) Description: ConsoleKit PAM module ConsoleKit is a system daemon for tracking what users are logged into the system and how they interact with the computer (e.g. which keyboard and mouse they use). . This package provides a PAM module which can be used for console logins. Graphical login managers should talk to ConsoleKit directly. debian/patches/0000775000000000000000000000000012115172020010606 5ustar debian/patches/03-cleanup_console_tags.patch0000664000000000000000000000327412115166500016252 0ustar Cleanup console tag files on application startup and shutdown. Index: consolekit-0.4.5/src/main.c =================================================================== --- consolekit-0.4.5.orig/src/main.c +++ consolekit-0.4.5/src/main.c @@ -148,6 +148,44 @@ unlink (CONSOLE_KIT_PID_FILE); } +#define CONSOLE_TAGS_DIR "/var/run/console" + +static void +delete_console_tags (void) +{ + GDir *dir; + GError *error = NULL; + const gchar *name; + + g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR); + + dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error); + if (dir == NULL) { + g_debug ("Couldn't open directory %s: %s", CONSOLE_TAGS_DIR, + error->message); + g_error_free (error); + return; + } + while ((name = g_dir_read_name (dir)) != NULL) { + gchar *file; + file = g_build_filename (CONSOLE_TAGS_DIR, name, NULL); + + g_debug ("Removing tag file: %s", file); + if (unlink (file) == -1) { + g_warning ("Couldn't delete tag file: %s", file); + } + g_free (file); + } + g_dir_close (dir); +} + +static void +cleanup (void) +{ + delete_console_tags (); + delete_pid (); +} + /* copied from nautilus */ static int debug_log_pipes[2]; @@ -228,7 +266,7 @@ snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ()); written = write (pf, pid, strlen (pid)); close (pf); - g_atexit (delete_pid); + g_atexit (cleanup); } else { g_warning ("Unable to write pid file %s: %s", CONSOLE_KIT_PID_FILE, @@ -317,6 +355,8 @@ goto out; } + delete_console_tags (); + create_pid_file (); loop = g_main_loop_new (NULL, FALSE); debian/patches/04-long_device_names.patch0000664000000000000000000000105412115171774015530 0ustar Description: Add support for devices with long names Bug-Ubuntu: http://launchpad.net/bugs/1130923 Index: consolekit/src/ck-sysdeps-linux.c =================================================================== --- consolekit.orig/src/ck-sysdeps-linux.c 2013-03-04 10:53:26.597712000 -0800 +++ consolekit/src/ck-sysdeps-linux.c 2013-03-04 10:57:33.612308825 -0800 @@ -93,7 +93,7 @@ guint major_number; guint minor_first; guint minor_last; - char name[16]; + char name[32]; char devfs_type; } tty_map_node; debian/patches/00git_truncate_frequent.patch0000664000000000000000000000164612115166500016405 0ustar From 803cbdfbd78b66b17ead45b1584d65a258e785bf Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 25 May 2011 00:58:10 +0000 Subject: ck-history: don't truncate --frequent output to 8 chars GDM screenscrapes the output and so we need the full username. https://bugzilla.gnome.org/show_bug.cgi?id=650330 --- diff --git a/tools/ck-history.c b/tools/ck-history.c index d02caaa..85d9e6f 100644 --- a/tools/ck-history.c +++ b/tools/ck-history.c @@ -804,7 +804,7 @@ generate_report_frequent (int uid, data = user_counts->data; username = get_user_name_for_uid (data->uid); - g_print ("%-8.8s %u\n", username, data->count); + g_print ("%-8s %u\n", username, data->count); g_free (data); user_counts = g_list_delete_link (user_counts, user_counts); g_free (username); -- cgit v0.9.0.2-2-gbebe debian/patches/series0000664000000000000000000000025112115167125012033 0ustar # Debian patches for consolekit 00git_truncate_frequent.patch 03-cleanup_console_tags.patch 82-hurd_support.patch 99-kfreebsd-empty-env.patch 04-long_device_names.patch debian/patches/99-kfreebsd-empty-env.patch0000664000000000000000000000055512115166500015610 0ustar --- consolekit/src/ck-sysdeps-freebsd.c +++ consolekit/src/ck-sysdeps-freebsd.c @@ -261,6 +261,8 @@ for (i = 0; penv[i] != NULL; i++) { char **vals; + if (!penv[i][0]) continue; + vals = g_strsplit (penv[i], "=", 2); if (vals != NULL) { g_hash_table_insert (hash, debian/patches/82-hurd_support.patch0000664000000000000000000003262112115166500014626 0ustar Description: Add support for GNU/Hurd currently consolekit fails to build on GNU/Hurd mainly because there's no sysdeps backend for the GNU OS implemented. Also there is an unconditional PATH_MAX usage. The attached patch proposes a sysdeps-gnu backend, which implements the process management using Hurd's libps, the *ttyent API for the part of the console implementation and the rest using similar (valid) approaches of other backends. Also, it fixes the PATH_MAX usage in pam-ck-connector/pam-ck-connector.c by using a variable-length malloc'ed buffer. Author: Pino Toscano Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552393 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24738 Last-Update: 2010-09-20 Index: consolekit/configure.ac =================================================================== --- consolekit.orig/configure.ac 2010-09-20 03:07:20.969097019 +0200 +++ consolekit/configure.ac 2010-09-20 03:07:22.189095438 +0200 @@ -190,6 +190,9 @@ *-*-solaris*) CK_BACKEND="solaris" ;; + *-*-gnu*) + CK_BACKEND="gnu" + ;; *) AC_MSG_ERROR([No sysdeps back-end implemented for host $host]) ;; @@ -200,6 +203,7 @@ AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux]) AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD]) AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris]) +AM_CONDITIONAL(CK_COMPILE_GNU, test x$CK_BACKEND = xgnu, [Compiling for GNU]) AC_SUBST(CK_BACKEND) dnl --------------------------------------------------------------------------- Index: consolekit/src/Makefile.am =================================================================== --- consolekit.orig/src/Makefile.am 2010-09-20 03:07:09.397095424 +0200 +++ consolekit/src/Makefile.am 2010-09-20 03:07:22.189095438 +0200 @@ -57,11 +57,18 @@ $(NULL) libck_la_LIBADD = $(KVM_LIBS) endif +if CK_COMPILE_GNU +libck_la_SOURCES += \ + ck-sysdeps-gnu.c \ + $(NULL) +libck_la_LIBADD = -lps +endif EXTRA_libck_la_SOURCES = \ ck-sysdeps-linux.c \ ck-sysdeps-solaris.c \ ck-sysdeps-freebsd.c \ + ck-sysdeps-gnu.c \ $(NULL) sbin_PROGRAMS = \ Index: consolekit/src/ck-sysdeps-gnu.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ consolekit/src/ck-sysdeps-gnu.c 2010-09-20 03:07:22.189095438 +0200 @@ -0,0 +1,402 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2009 Pino Toscano + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef HAVE_PATHS_H +#include +#endif /* HAVE_PATHS_H */ + +#include "ck-sysdeps.h" + +struct _CkProcessStat +{ + struct proc_stat *ps; /* the statistics of a process */ +}; + +static struct ps_context *pc = NULL; + +static gboolean +get_proc_stat_from_pid (pid_t pid, + ps_flags_t flags, + struct proc_stat **res_ps) +{ + error_t err; + struct proc_stat *ps; + + g_assert (pid >= 0); + g_assert (res_ps != NULL); + + if (pc == NULL) { + err = ps_context_create (getproc (), &pc); + if (err) { + return FALSE; + } + } + + err = _proc_stat_create (pid, pc, &ps); + if (err) { + return FALSE; + } + + err = proc_stat_set_flags (ps, PSTAT_PID | flags); + if (err) { + return FALSE; + } + + *res_ps = ps; + return TRUE; +} + + +pid_t +ck_process_stat_get_ppid (CkProcessStat *stat) +{ + g_return_val_if_fail (stat != NULL, -1); + + return proc_stat_pid (stat->ps); +} + +char * +ck_process_stat_get_cmd (CkProcessStat *stat) +{ + g_return_val_if_fail (stat != NULL, NULL); + + return g_strdup (proc_stat_args (stat->ps)); +} + +char * +ck_process_stat_get_tty (CkProcessStat *stat) +{ + struct ps_tty *tty; + + g_return_val_if_fail (stat != NULL, NULL); + + tty = proc_stat_tty (stat->ps); + + return tty ? g_strdup (ps_tty_name (tty)) : NULL; +} + +gboolean +ck_process_stat_new_for_unix_pid (pid_t pid, + CkProcessStat **stat, + GError **error) +{ + gboolean res; + struct proc_stat *ps; + CkProcessStat *proc; + + g_return_val_if_fail (pid > 1, FALSE); + + if (stat == NULL) { + return FALSE; + } + + *stat = NULL; + + res = get_proc_stat_from_pid (pid, PSTAT_ARGS | PSTAT_TTY, &ps); + if (!res) { + return FALSE; + } + + proc = g_new0 (CkProcessStat, 1); + proc->ps = ps; + *stat = proc; + + return TRUE; +} + +void +ck_process_stat_free (CkProcessStat *stat) +{ + _proc_stat_free (stat->ps); + + g_free (stat); +} + +GHashTable * +ck_unix_pid_get_env_hash (pid_t pid) +{ + struct proc_stat *ps; + char *env_p; + size_t env_index; + size_t env_l; + gboolean res; + GHashTable *hash; + + g_return_val_if_fail (pid > 1, NULL); + + res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); + if (!res) { + return NULL; + } + + hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + g_free); + + env_index = 0; + env_l = 0; + env_p = proc_stat_env (ps); + while (env_index < proc_stat_env_len (ps)) { + env_l = strlen (env_p); + env_index += env_l + 1; + if (env_l) { + char **vals; + vals = g_strsplit (env_p, "=", 2); + if (vals != NULL) { + g_hash_table_insert (hash, + g_strdup (vals[0]), + g_strdup (vals[1])); + g_strfreev (vals); + } + } + env_p = env_p + env_l + 1; + } + + _proc_stat_free (ps); + + return hash; +} + +char * +ck_unix_pid_get_env (pid_t pid, + const char *var) +{ + struct proc_stat *ps; + char *env_p; + size_t env_index; + size_t env_l; + char *prefix; + int prefix_len; + char *val; + gboolean res; + + g_return_val_if_fail (pid > 1, NULL); + + val = NULL; + + res = get_proc_stat_from_pid (pid, PSTAT_ENV, &ps); + if (!res) { + return NULL; + } + + prefix = g_strdup_printf ("%s=", var); + prefix_len = strlen (prefix); + + env_index = 0; + env_l = 0; + env_p = proc_stat_env (ps); + while (env_index < proc_stat_env_len (ps)) { + env_l = strlen (env_p); + env_index += env_l + 1; + if (env_l && g_str_has_prefix (env_p, prefix)) { + val = g_strdup (env_p + prefix_len); + break; + } + env_p = env_p + env_l + 1; + } + + g_free (prefix); + + _proc_stat_free (ps); + + return val; +} + +uid_t +ck_unix_pid_get_uid (pid_t pid) +{ + struct proc_stat *ps; + gboolean res; + uid_t uid; + + g_return_val_if_fail (pid > 1, 0); + + res = get_proc_stat_from_pid (pid, PSTAT_OWNER_UID, &ps); + if (!res) { + return 0; + } + + uid = proc_stat_owner_uid (ps); + + _proc_stat_free (ps); + + return uid; +} + +pid_t +ck_unix_pid_get_ppid (pid_t pid) +{ + struct proc_stat *ps; + gboolean res; + pid_t ppid; + + g_return_val_if_fail (pid > 1, 0); + + res = get_proc_stat_from_pid (pid, PSTAT_PROC_INFO, &ps); + if (!res) { + return 0; + } + + ppid = proc_stat_proc_info (ps)->ppid; + + _proc_stat_free (ps); + + return ppid; +} + +gboolean +ck_unix_pid_get_login_session_id (pid_t pid, + char **idp) +{ + g_return_val_if_fail (pid > 1, FALSE); + + return FALSE; +} + +gboolean +ck_get_max_num_consoles (guint *num) +{ + int max_consoles; + int res; + gboolean ret; + struct ttyent *t; + + ret = FALSE; + max_consoles = 0; + + res = setttyent (); + if (res == 0) { + goto done; + } + + while ((t = getttyent ()) != NULL) { + if (t->ty_status & TTY_ON && strncmp (t->ty_name, "tty", 3) == 0) + max_consoles++; + } + + /* Increment one more so that all consoles are properly counted + * this is arguable a bug in vt_add_watches(). + */ + max_consoles++; + + ret = TRUE; + + endttyent (); + +done: + if (num != NULL) { + *num = max_consoles; + } + + return ret; +} + +gboolean +ck_supports_activatable_consoles (void) +{ + return TRUE; +} + +char * +ck_get_console_device_for_num (guint num) +{ + char *device; + + device = g_strdup_printf (_PATH_TTY "%u", num); + + return device; +} + +gboolean +ck_get_console_num_from_device (const char *device, + guint *num) +{ + guint n; + gboolean ret; + + n = 0; + ret = FALSE; + + if (device == NULL) { + return FALSE; + } + + if (sscanf (device, _PATH_TTY "%u", &n) == 1) { + ret = TRUE; + } + + if (num != NULL) { + *num = n; + } + + return ret; +} + +gboolean +ck_get_active_console_num (int console_fd, + guint *num) +{ + gboolean ret; + int res; + long cur_active; + char buf[30]; + guint active; + + g_assert (console_fd != -1); + + active = 0; + ret = FALSE; + + res = readlink ("/dev/cons/vcs", buf, sizeof (buf)); + if (res > 0) { + /* the resolved path is like "/dev/vcs/$number", so skip + the non-number part at the start */ + const char *p = buf; + while ((*p) && ((*p < '0') || (*p > '9'))) { + ++p; + } + if (*p) { + cur_active = strtol (p, NULL, 10); + g_debug ("Current VT: tty%ld", cur_active); + active = cur_active; + ret = TRUE; + } + } + + if (num != NULL) { + *num = active; + } + + return ret; +} Index: consolekit/pam-ck-connector/pam-ck-connector.c =================================================================== --- consolekit.orig/pam-ck-connector/pam-ck-connector.c 2010-09-20 17:15:53.000000000 +0200 +++ consolekit/pam-ck-connector/pam-ck-connector.c 2010-09-20 17:33:54.000000000 +0200 @@ -244,12 +244,12 @@ const char *s; uid_t uid; char buf[256]; - char ttybuf[PATH_MAX]; + char *ttybuf; DBusError error; dbus_bool_t is_local; ret = PAM_IGNORE; - + ttybuf = NULL; is_local = TRUE; _parse_pam_args (pamh, flags, argc, argv); @@ -295,7 +295,13 @@ x11_display = display_device; display_device = ""; } else if (strncmp (_PATH_DEV, display_device, 5) != 0) { - snprintf (ttybuf, sizeof (ttybuf), _PATH_DEV "%s", display_device); + int len = strlen (_PATH_DEV) + strlen (display_device) + 1; + ttybuf = malloc (len); + if (ttybuf == NULL) { + ck_pam_syslog (pamh, LOG_ERR, "oom allocating ttybuf"); + goto out; + } + snprintf (ttybuf, len, _PATH_DEV "%s", display_device); display_device = ttybuf; } @@ -411,6 +417,8 @@ ret = PAM_SUCCESS; out: + free (ttybuf); + return ret; } debian/consolekit.install0000664000000000000000000000132312115166500012726 0ustar etc/dbus-1/system.d/ConsoleKit.conf etc/ConsoleKit/ usr/share/dbus-1/system-services/ usr/share/polkit-1/ usr/lib/ConsoleKit/ var/log/ConsoleKit/ usr/sbin/ usr/bin/ debian/90consolekit etc/X11/Xsession.d/ lib/systemd/system/console-kit-daemon.service lib/systemd/system/console-kit-log-system-start.service lib/systemd/system/console-kit-log-system-stop.service lib/systemd/system/console-kit-log-system-restart.service lib/systemd/system/basic.target.wants/console-kit-log-system-start.service lib/systemd/system/halt.target.wants/console-kit-log-system-stop.service lib/systemd/system/poweroff.target.wants/console-kit-log-system-stop.service lib/systemd/system/reboot.target.wants/console-kit-log-system-restart.service debian/rules0000775000000000000000000000113412115166500010244 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- \ --libexecdir="\$$(prefix)/lib/ConsoleKit" \ --enable-pam-module \ --enable-docbook-docs \ --with-pid-file=/var/run/console-kit-daemon.pid \ --with-systemdsystemunitdir=/lib/systemd/system \ --with-pam-module-dir=/lib/$(DEB_HOST_MULTIARCH)/security override_dh_auto_install: dh_auto_install install -m 755 debian/pam-foreground-compat.ck debian/tmp/usr/lib/ConsoleKit/run-session.d/ install -D -m 644 debian/libpam-ck-connector.pam-auth-update debian/tmp/usr/share/pam-configs/consolekit debian/pam-foreground-compat.ck0000664000000000000000000000067612115166500013723 0ustar #!/bin/sh TAGDIR=/var/run/console [ -n "$CK_SESSION_USER_UID" ] || exit 1 [ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0 TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" if [ "$1" = "session_added" ]; then mkdir -p "$TAGDIR" echo "$CK_SESSION_ID" >> "$TAGFILE" fi if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" [ -s "$TAGFILE" ] || rm -f "$TAGFILE" fi