summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-16Fix bug console-kit-daemon exit when receiving SIGPOLL on Solaris.Halton Huo1-0/+2
Refer to bug http://defect.opensolaris.org/bz/show_bug.cgi?id=11612
2009-10-16Correct tty return value after VT support is integrated in Solaris.Halton Huo1-19/+0
2009-09-25Turn on silent build by defaultRay Strode1-1/+1
It's all the rage these days and makes seeing warnings much easier.
2009-09-24fix styleWilliam Jon McCann1-7/+14
2009-09-24post release version bumpWilliam Jon McCann1-1/+1
2009-09-24Another? So soon?0.4.1William Jon McCann1-0/+8
2009-09-24Fix a crasherWilliam Jon McCann1-1/+0
2009-09-24fix a small memory leakMatthias Clasen1-6/+1
2009-09-24update email addressWilliam Jon McCann1-2/+1
2009-09-24post release version bumpWilliam Jon McCann1-1/+1
2009-09-24Update for release0.4.0William Jon McCann3-2/+20
2009-09-24bump version before new releaseWilliam Jon McCann2-2/+2
2009-09-14close file descriptors before exit funcHalton Huo1-0/+1
This bug is copied from http://defect.opensolaris.org/bz/show_bug.cgi?id=10291. The patch is attached, Please review it. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22986
2009-09-14log the kernel release and boot arguments at start timeWilliam Jon McCann4-5/+77
Someone needs to add support for non-Linux platforms. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23948
2009-09-14show display in host field if the host isn't setWilliam Jon McCann1-7/+15
This is consistent with how we write the wtmp records in GDM. https://bugs.freedesktop.org/show_bug.cgi?id=23944
2009-09-14print the uptime for the reboot items in the reportWilliam Jon McCann1-2/+39
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23279
2009-09-14fix logic for finding session remove eventsWilliam Jon McCann1-4/+4
The logic is supposed to find any type of removal event. This can be one of CK_LOG_EVENT_SEAT_SESSION_REMOVED, CK_LOG_EVENT_SYSTEM_START, CK_LOG_EVENT_SYSTEM_STOP, or CK_LOG_EVENT_SYSTEM_RESTART. This is used to determine if the removal was normal or RECORD_STATUS_CRASH, or RECORD_STATUS_DOWN. And indicated in the report log as something like: "Thu Sep 3 21:28 - down (20:20)"
2009-09-14fix a few small leaksWilliam Jon McCann1-5/+10
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23939
2009-08-12Add seat.d/ callout directory and guarantee we dump the database before ↵Lennart Poettering5-25/+200
callout invocation This adds a callout directory called seat.d/ that follows the basic session.d/ semantics but works on seats instead of sessions. As replacement for the old session.d/ 'session_active_changed' semantics seat.d/ knows 'seat_active_session_changed'. Which combines the two callouts necessary for session_active_changed into one. This has various advantages: it's not as racy, allows the suppressing of ACL permission changes when switching between sessions of the same user, reduces the amount of disk IO and finally is less ugly. This patch also moves all callout invocations into the CkManager. This has the advantage that we can guarantee to have fully dumped the CK database before the callout. In summary, the session.d/ directory will now get two types of callout invocations: session_added session_removed In contrast, seat.d/ gets three types: seat_added seat_removed seat_active_session_changed The 'seat_active_session_changed' callout type gets two sets of environment variables describing the old resp. the new session that is active. Either set can be left out if no session was active before, or no session will be active after the switch. This is similar to the logic behind D-Bus' NameOwnerChanged. This patch duplicates CkSeat's 'session-removed' signal into 'session-removed-full' (and friends). Reason for that is that the signal forwarded via D-Bus needs the session id as string while the callout code needs the session itself as object. Since at the time of invocation the CkSeat is no longer in the seats hashtable it is hence necessary to pass the object in as argument to the signal handlers, which makes this duplification necessary to not confuse dbus-glib. For a similar reason 'active-session-changed' is duplicated as well.
2009-08-12get rid of session.d's session_active_changed calloutLennart Poettering2-3/+7
The 'session_active_changed' callout is an invitaton to racy misuses since it splits up the session switches into two events. This patch gets rid of it. At this point there are two known users of the session.d/ callouts: - Suse/Ubuntu ship a script for emulating pam_atconsole style /var/run/console management for supporting D-Bus' at_console feature properly. Both Martin Pitt and Kay Sievers however are happy with having this feature go away. In addition I prepared a patch for D-Bus which makes the need for these scripts go away entirely. That patch is currently awaiting review. - udev's udev-acl tool currently uses this. However this doesn't work correctly anyway since it relies on that the CK database is correctly dumped before the tool is invoked, which CK does not handle properly at this time. In fact fixing this problem is the main reason why I came up with this patch series. Kay is also very interested in seeing the 'session_active_changed' logic go away. A later commit introduces a replacement functionality that is less racy. Please note that this patch does not drop session.d/ in its entirety. Only the 'session_active_changed' type callout is removed. Scripts that only rely on 'session_added'/'session_removed' will continue to work fine, and will continue to be supported.
2009-08-12database: write the console database to disk before signalling via dbusLennart Poettering3-27/+23
We simply change the order how the signal handlers for D-Bus and the database dumping are registered. According to the gobject docs it is guaranteed that the signal handlers are run in the same order as they are registered, so this should be safe and have the desired effect.
2009-08-11Enforce that the env array has the right sizeLennart Poettering1-0/+2
Hit an assert if folks add env vars but don't increase the env var array size.
2009-08-11when printing size_t use %z format stringLennart Poettering1-1/+1
2009-08-11make CK database world readableLennart Poettering3-6/+1
The CK database shall be readable by the D-Bus daemon which runs under its own user id hence make sure it is readable for non-root processes. To make sure this leaks no information this drops the session cookie from the database.
2009-08-11get rid of ck_seat_set_active_session() prototype since no such function existsLennart Poettering1-3/+0
2009-08-11Move ck_session_run_programs() from ck-run-programs.h to ck-session.hLennart Poettering2-3/+3
It's a method of CkSession hence it belongs in ck-session.h
2009-07-22post release version bumpRay Strode1-1/+1
2009-07-22Fix example upstart system start script0.3.1Ray Strode2-2/+2
It was trying to write the log message way too early, before the root filesystem was mounted.
2009-07-21Update NEWS for 0.3.1 releaseRay Strode1-0/+21
2009-07-21Reference entities relative to srcdir not cwdRay Strode1-6/+6
The docs were failing to build when srcdir != builddir because ConsoleKit.xml was ending up in builddir and all its entities are in srcdir. This commit makes ConsoleKit.xml load the entities from srcdir, which fixes make distcheck.
2009-07-21Call "git log" instead of "git-log" in MakefileRay Strode1-1/+1
git-log (with a hyphen) is an obsolete way to call git log.
2009-07-20Add CanStop/Restart to D-Bus security policyMartin Pitt1-0/+6
This change is necessarily following commit: e0d9cc359b3099307067107b59ec691418e280b8
2009-07-20Port to PolicyKit 1.0 apisMatthias Clasen6-473/+226
2009-07-20Get VT from X display if no controlling ttyRay Strode1-0/+72
In some cases a controlling tty won't be able available to peek at to find the VT of the X display. In those cases, we fall back to looking at the XFree86_VT property. We can do this because we know the display is a local display since we've already gotten peer credentials from its socket.
2009-07-20Fix connector build on SolarisHalton Huo1-7/+0
Solaris now builds with flags to give getpwnam_r more standard semantics. bug 22361
2009-07-20Allow GetSessions to get calledVincent Untz1-0/+3
The manager interface GetSessions function was disallowed by the dbus security policy, despite only exporting information that's available in other ways. This commit opens it up. See http://bugs.freedesktop.org/show_bug.cgi?id=20471
2009-07-16avoid a (harmless) warning messageMatthias Clasen1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=21310
2009-07-16fix a bunch of xml validation errorsWilliam Jon McCann6-63/+82
https://bugs.freedesktop.org/show_bug.cgi?id=20232
2009-02-12fix parsing log entries with no bodyWilliam Jon McCann1-8/+17
2009-02-11clearer diagnostic if platform back-end isn't implementedDaniel Macks1-0/+3
Error if no backend for target host
2009-02-11parse gecos field to get real nameWilliam Jon McCann1-2/+13
2009-02-11don't leak dbus proxyJames Westby1-0/+2
2009-02-11fix building with Solaris PAMHalton Huo2-1/+19
This patch is a little different with Brian's. Let's me explain the whole patch one by one. 1. pam-ck-connector/Makefile.am (same with Brian's) Solaris does not have libpam_misc, so only build test_pam under linux 2. +#include <limits.h> This is to get macro PATH_MAX from system. I think it is better than +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif On ubuntu, PATH_MAX=4096, on Solaris, PATH_MAX=1024 3. +#include <security/pam_appl.h> This is to include declaration of pam_handle_t, to resolve error like: "/usr/include/security/pam_modules.h", line 38: syntax error before or at: * "/usr/include/security/pam_modules.h", line 45: syntax error before or at: * 4.-#include <security/_pam_macros.h> Solaris does not have this file, I remove it, no more error, seems no use here. 5. +#ifndef PAM_EXTERN ... part Solaris PAM_EXTERN marco in pam_modules.h, while Ubuntu has, I just copy the logic from Ubuntu. 6. getpwnam_r part (same with Brian's) getpwnam_r() have difference behavior between Solaris and Ubuntu. https://bugs.freedesktop.org/show_bug.cgi?id=18173
2009-02-11fix zero-sized struct/unionWilliam Jon McCann1-0/+4
https://bugs.freedesktop.org/show_bug.cgi?id=18149
2009-02-11serialize removals, and avoid using freed data caused by removalsJames Westby1-32/+94
I changed the code to also loop through watch->notifies when removing the watch due to inotify, and NULL each notify->watch reference, the code then checks this before trying to delete the watch itself if asked to remove the notify. In order to prevent other race conditions in this area I also made the inotify code not pass a watch to emit_events_in_idle, as the watch may get freed in the meantime. It instead passes the wd and the emit loop looks up the watch, discarding the event if the watch has been removed. I did however leave in the code that checks for a removed watch before doing anything with inotify, as I hoped that this would just optimise this case.
2009-02-11close directory to fix leakSteve Langasek1-0/+1
Chris Jones observed that console-kit-daemon had open a large number of redundant file descriptors, pointing to /etc/ConsoleKit/run-session.d and /usr/lib/ConsoleKit/run-session.d. It turns out that ck_run_programs() doesn't close the directory handles after iterating, resulting in a fd leak and a small memory leak. The attached patch corrects this.
2009-02-11add "nox11" option to the PAM moduleMartin Pitt2-0/+11
Ignores PAM sessions where PAM_TTY is an X11 display. This allows adding pam_ck_connector to PAM's "common-session" without interfering with the already existing ConsoleKit operations in gdm, the Xsession script, etc. https://bugs.freedesktop.org/show_bug.cgi?id=16746
2009-02-11add example upstart events for loggingWilliam Jon McCann4-0/+27
These can be used to add system start/stop/restart logging but hooking into Upstart event mechanism.
2009-01-18fix up D-Bus permissionsColin Walters1-40/+80
2008-10-02check the result of the fchown callWilliam Jon McCann1-1/+6