Bug 491877 - session bus started outside from the consolekit session in slim
session bus started outside from the consolekit session in slim
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: slim (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Lorenzo Villani
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-24 10:14 EDT by Tomeu Vizoso
Modified: 2010-06-28 07:33 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 07:33:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomeu Vizoso 2009-03-24 10:14:29 EDT
Description of problem:

X clients are started inside ck-xinit-session as a fallback so that if the display manager doesn't start the consolekit session by itself, there's a console session anyway.

But the session bus is started earlier by /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh so the autostarted services will have less policy kit authorizations because of not running inside the console session.

I guess that one of the following needs to happen:

- display managers like slim need to start the console session on their own,

- the fallback is fixed, so the message bus is started inside ck-xinit-session.
Comment 1 Matthias Clasen 2009-03-24 13:07:25 EDT
The right thing here is clearly to reduce the shell script madness in xinit, and fix up display managers to interact with ConsoleKit
Comment 2 Matthias Clasen 2009-03-24 18:50:01 EDT
Anyway, dbus is not involved in this; moving this bug to slim
Comment 3 Patrice Dumas 2009-03-24 19:34:33 EDT
(In reply to comment #0)
> Description of problem:
> 
> X clients are started inside ck-xinit-session as a fallback so that if the
> display manager doesn't start the consolekit session by itself, there's a
> console session anyway.

I don't see it that way. I'd rather say that the consolekit session is 
started last for no specific reason. But it could be started before.
 
> But the session bus is started earlier by
> /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh so the autostarted services
> will have less policy kit authorizations because of not running inside the
> console session.

It is by mere chance that it is started earlier.

> I guess that one of the following needs to happen:
> 
> - display managers like slim need to start the console session on their own,

Or the consolekit session should be started in the session scripts in xinitrc-common before xinitrc.d scripts are started. It is not only an issue for the dm, but also for X started through xinitrc. Maybe it could also be possible to start the consolekit session in etc/X11/xinit/xinitrc.d/. I guess that this would require some changes since currently I guess that ck-xinit-session has to exec a program and closes the dbus conncetion when the program is returning.
In fact, reading the code, it looks like there is no explicit code to close the consolekit session, I guess it is closed at exit in some way since ck_connector_close_session doesn't seems to be called explicitely. 

Maybe the solution would be to code something like ck-xinit-session that returns the cookie and its pid, and have the process killed after the end of the session to close the dbus connection.

The problem I see is if the dm crashes the consolekit session leader could still be alive and the dbus connection would then still be open.
Comment 4 Patrice Dumas 2009-03-25 11:59:33 EDT
Looking at dbus-launch, maybe the right solution would be to have something similar with the consolekit session leader.

Isn't there a need for some common code to do a process that exits when the session exits to keep dbus connections?
Comment 5 Patrice Dumas 2009-03-25 12:23:12 EDT
I'd like to have a look at how the services that need consolekit session are started. Can you point me to a package that install such a /etc/X11/xinit/xinitrc.d file, or tell where such autostarted services are started?



Anyway, one possibility I see would be to have dbus-launch start CK_XINIT_SESSION if needed. I think it could work. So, there would be, before 00-start-message-bus.sh (could be in 00-start-consolekit-session, maybe installed together with libck-connector):


CK_XINIT_SESSION=
if [ -x /usr/bin/ck-xinit-session -a -z "$XDG_SESSION_COOKIE" ]; then
    CK_XINIT_SESSION="/usr/bin/ck-xinit-session"
fi


And 00-start-message-bus.sh would be modified to be:


if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
        eval `dbus-launch --sh-syntax --exit-with-session $CK_XINIT_SESSION`
fi


Wouldn't that work?
Comment 6 Bug Zapper 2009-06-09 08:33:39 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2010-04-27 09:18:44 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2010-06-28 07:33:15 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.