Bug 40384 - ck-collect-session-info collects bad login_session_id on 64bit machine when /proc/xxx/sessionid isn't set
Summary: ck-collect-session-info collects bad login_session_id on 64bit machine when /...
Status: NEW
Alias: None
Product: ConsoleKit
Classification: Unclassified
Component: Daemon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: william.jon.mccann
QA Contact:
Depends on:
Reported: 2011-08-25 19:40 UTC by Yubao Liu
Modified: 2011-08-25 19:40 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Yubao Liu 2011-08-25 19:40:05 UTC
On Debian 32 bit testing and 64bit unstable, /proc/xxx/sessionid both are 4294967295 (G_MAXUINT32), this means the value isn't set according to this code:
ck_unix_pid_get_login_session_id (pid_t  pid,
                                  char **idp)
        /* Will be G_MAXULONG if it isn't set */
        if (ulong_value == G_MAXULONG) {
                goto out;

On 32bit machine, G_MAXUINT32 == G_MAXULONG, on 64bit machine,
G_MAXUINT32 < G_MAXULONG, so on 64bit machine, consolekit will
think all processes have same login_session_id 4294967295.

$ uname -a
Linux thomas 3.0.0-1-amd64 #1 SMP Wed Aug 17 04:08:52 UTC 2011 x86_64 GNU/Linux
$ cat /etc/issue
Debian GNU/Linux wheezy/sid \n \l

Debian testing and sid are using consolekit-0.4.5-1.

I don't know why /proc/xxx/sessionid isn't set.

Why don't you use getsid() to obtain session id?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.