Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 438696 - gnome-base/gdm-3.4.1-r3 with USE="systemd" makes gnome-session unrecognizable by polkit
Summary: gnome-base/gdm-3.4.1-r3 with USE="systemd" makes gnome-session unrecognizable...
Status: RESOLVED DUPLICATE of bug 439130
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nirbheek Chauhan (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 10:43 UTC by Morse
Modified: 2012-12-19 16:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_438696.txt,5.54 KB, text/plain)
2012-10-17 10:43 UTC, Morse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Morse 2012-10-17 10:43:05 UTC
Created attachment 326760 [details]
emerge --info

After I updated networkmanager to 0.9.6.0 as part of global update to gnome 3.4, I can't do anything with NM. Everything is write-protected, both in nm-connection-editor and in gnome-control-center. I can't [re]connect to any wired, wireless or vpn. Just nothing happens.

The only messaage I can get is when I try to change config for openvpn: I see a "Insufficient privileges." error.

All of these work under root.

Can't find any relevant logs.

emerge info in attach.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-17 18:24:29 UTC
What happens when you run the following command as non-root (assuming you are in a gnome session)?

pkcheck --action-id org.freedesktop.NetworkManager.settings.modify.system --process $(pidof gnome-session)
Comment 2 Morse 2012-10-17 19:35:48 UTC
morse@morseworkbook ~ $ pkcheck --action-id org.freedesktop.NetworkManager.settings.modify.system --process 2264
Not authorized.
Comment 3 Morse 2012-10-17 19:45:58 UTC
By the way, modify.own is also forbidden.

Can it be somehow relevant that I'm using systemd?
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-17 20:01:12 UTC
(In reply to comment #3)
> By the way, modify.own is also forbidden.
> 
> Can it be somehow relevant that I'm using systemd?

Yes. If systemd is not recognizing you as in an active user session, polkit will not authorize you to use networkmanager.

Make sure that you have >=sys-auth/pambase-20120417-r1 with USE=systemd, and are logging in from a systemd-compatible login manager, such as gdm-3.4.1-r3 with USE=systemd. Attempting to just do "startx" will break many parts of gnome3, in particular anything related to polkit authorization.

Also, check that you are using the latest version of polkit (0.107-r1) with the systemd USE flag set.
Comment 5 Morse 2012-10-17 20:07:43 UTC
[ebuild   R   ~] sys-auth/pambase-20120417-r1  USE="consolekit cracklib gnome-keyring sha512 systemd -debug -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc (-selinux)" 0 kB
[ebuild   R   ~] gnome-base/gdm-3.4.1-r3  USE="consolekit gnome-shell introspection ipv6 ldap systemd tcpd xinerama xklavier -accessibility -audit -debug -fallback -fprint -plymouth (-selinux) -smartcard -test" 0 kB
[ebuild   R    ] sys-auth/polkit-0.107-r1  USE="gtk introspection nls pam -examples -kde (-selinux) (-systemd)" 0 kB

Everything looks OK.
As a grand-finale I checked org.freedesktop.NetworkManager.network-control (which is "yes" for both active and inactive). Same result: Not authorized.
Comment 6 Morse 2012-10-17 20:18:21 UTC
I have lots of these in journalctl:

Oct 17 13:54:00 morseworkbook dbus[2070]: [system] Rejected send message, 2 matched rules; type="method_return", sender=":1.0" (uid=0 pid=2069 comm="/usr/lib/systemd/systemd-logind ") interf
ace="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.18" (uid=1000 pid=2264 comm="gnome-session ")

Can it be that it's systemd trying to recognize me? Then it's dbus rules that needs fixing.
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-17 20:43:04 UTC
@systemd team, any suggestions?
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-10-17 21:17:23 UTC
(In reply to comment #7)
> @systemd team, any suggestions?

Well, let's start from the basics: what

$ loginctl

gives you? It should list you with a seat.
Comment 9 Morse 2012-10-17 21:19:04 UTC
   SESSION        UID USER             SEAT            
        c1       1000 morse            seat0           

1 sessions listed.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-10-17 21:21:20 UTC
(In reply to comment #9)
>    SESSION        UID USER             SEAT            
>         c1       1000 morse            seat0           
> 
> 1 sessions listed.

That looks fine. Is sys-apps/dbus built with USE=systemd as well?
Comment 11 Morse 2012-10-17 21:24:42 UTC
[ebuild   R   ~] sys-apps/dbus-1.6.8-r1  USE="X systemd -debug -doc (-selinux) -static-libs -test" 0 kB

USE="systemd" is global, every package should be built with it
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-10-17 21:27:21 UTC
Well, that's where my ideas end. Sorry.
Comment 13 Morse 2012-10-17 22:32:52 UTC
I changed my dbus policy to allow anything. Now there are no rejected messages in the logs. Still not authorized to do a thing.

Tried to login to the regular text console. That session was recognized all right: passed "active" checks from itself and "inactive" from others.

Something must be wrong with gdm. Can I somehow launch all the gnome stuff without it? At least for testing purposes.
Comment 14 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-17 22:42:15 UTC
(In reply to comment #13)
> I changed my dbus policy to allow anything. Now there are no rejected
> messages in the logs. Still not authorized to do a thing.
> 
> Tried to login to the regular text console. That session was recognized all
> right: passed "active" checks from itself and "inactive" from others.
> 
> Something must be wrong with gdm. Can I somehow launch all the gnome stuff
> without it? At least for testing purposes.

Does it make a difference if you emerge pambase and gdm with USE=-consolekit?

Are there any processes hanging around from previous gnome logins (e.g. pulseaudio - see bug #435042 comment 17)? Try killing them from the console.

As for launching gnome without gdm - it's complicated, and we don't have up-to-date documentation, especially for systemd users :/ See bug #436392
Comment 15 Morse 2012-10-18 20:14:18 UTC
sys-auth/pambase[consolekit] required by (sys-auth/polkit-0.107-r1::gentoo, installed)

If I start removing all this stuff, I'll end rebuilding the whole system.
Comment 16 Morse 2012-10-21 19:21:06 UTC
I rebuilded gdm and gnome-session without "systemd" use flag, and  now everything works.

Surprisingly, loginctl still shows my session with a seat.

Even more surprisingly, the file /usr/lib64/systemd/system/gdm.service wasn't removed (although now it's orphaned) and still works: gdm is launched by systemd.

I'll check if it's gnome-session's, gdm's or both's flags that made the trick.
Comment 17 Morse 2012-10-21 19:31:49 UTC
It's gdm.
Comment 18 Morse 2012-10-24 11:49:44 UTC
I found the "error", it's in usr/portage/profiles/arch/amd64/package.use.mask file (in my case):

# Robert Piasek <dagger@gentoo.org> (26 Apr 2012)
# Packages with optional systemd support. Masked in base and unmasked on arches
# where sys-apps/systemd is available.
# Samuli Suominen <ssuominen@gentoo.org> (07 Sep 2012)
# Masked again because this was never allowed before systemd is marked stable.
#sys-auth/polkit -systemd

polkit was merged without systemd support.

Dear devs, please decide whether systemd is masked or merely unstable.
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2012-12-19 16:57:26 UTC
(In reply to comment #18)
> I found the "error", it's in
> usr/portage/profiles/arch/amd64/package.use.mask file (in my case):
> 
> # Robert Piasek <dagger@gentoo.org> (26 Apr 2012)
> # Packages with optional systemd support. Masked in base and unmasked on
> arches
> # where sys-apps/systemd is available.
> # Samuli Suominen <ssuominen@gentoo.org> (07 Sep 2012)
> # Masked again because this was never allowed before systemd is marked
> stable.
> #sys-auth/polkit -systemd
> 
> polkit was merged without systemd support.
> 
> Dear devs, please decide whether systemd is masked or merely unstable.

It must be masked for long as it's unstable because otherwise KEYWORDS don't match. 

So no bug here, only user error with the USE=systemd handling. Marking as dupe of bug 439130.

*** This bug has been marked as a duplicate of bug 439130 ***