| Summary: | ck-collect-session-info collects bad login_session_id on 64bit machine when /proc/xxx/sessionid isn't set | ||
|---|---|---|---|
| Product: | ConsoleKit | Reporter: | Yubao Liu <yubao.liu> |
| Component: | Daemon | Assignee: | william.jon.mccann |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | CC: | lennart, rstrode |
| Version: | unspecified | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
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.
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: src/ck-sysdeps-linux.c gboolean 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?