Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576996 - sys-apps/dbus-1.10.6 root password is requested when usb storage is connected
Summary: sys-apps/dbus-1.10.6 root password is requested when usb storage is connected
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on: 578840
Blocks: 576028
  Show dependency tree
 
Reported: 2016-03-10 21:18 UTC by pszczekutowicz
Modified: 2016-06-22 19:54 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pszczekutowicz 2016-03-10 21:18:27 UTC
When I connect usb storage device like pendrive or harddisk root's password request pop up. When I try to unmount pendrive using nautilus eject icon request for root's password pop up and notification that device is busy is displayed.

With sys-apps/dbus-1.8.16 devices are mounted and unmounted automatically without any prompts.
Comment 1 pszczekutowicz 2016-03-10 21:19:14 UTC
Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.21-r2, 4.1.18-gentoo x86_64)
=================================================================
System uname: Linux-4.1.18-gentoo-x86_64-Intel-R-_Core-TM-_i5-4310U_CPU_@_2.00GHz-with-gentoo-2.2
KiB Mem:     8073236 total,   5654100 free
KiB Swap:    8291324 total,   8291324 free
Timestamp of repository gentoo: Thu, 10 Mar 2016 19:00:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth bzip2 cairo cli colord cracklib crypt cups cxx dbus dri dri3 dts eds egl emboss encode evo exif fam fat firefox flac fortran fuse gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg lcms libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg mtp multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio readline sdl seccomp session sna spell sse sse2 ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb uxa vaapi vorbis wayland wxwidgets x264 xattr xcb xml xv xvid xvmc xwayland zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Pacho Ramos gentoo-dev 2016-03-12 09:31:58 UTC
What udisks versions do you have installed?
Comment 3 pszczekutowicz 2016-03-12 17:17:59 UTC
$ qlist -Iv udisk
sys-fs/udisks-2.1.4
Comment 4 Pacho Ramos gentoo-dev 2016-03-12 19:13:18 UTC
I am suffering this bug (I didn't notice it earlier :S)
https://bugs.freedesktop.org/show_bug.cgi?id=94508

Maybe it's also showing in your case in this way, I mean, maybe there are leftover processes of other users running in your system and causing this behavior
Comment 5 pszczekutowicz 2016-03-12 20:50:42 UTC
I'am only user of this PC but if you ask about users like gdm I check and in both dbus version similar number of processes left alter logout and gdm service stop.

I'am trying to find some differences how things work with both versions of dbus and I found something like this (I'm no expert, just trying different things)

**sys-apps/dbus-1.8.16**

$ /usr/libexec/polkit-gnome-authentication-agent-1

** (polkit-gnome-authentication-agent-1:3167): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject

**sys-apps/dbus-1.10.6 **

$ /usr/libexec/polkit-gnome-authentication-agent-1

(polkit-gnome-authentication-agent-1:2499): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 2499
Comment 6 Pacho Ramos gentoo-dev 2016-03-13 08:52:56 UTC
Maybe our /etc/pam.d/gdm-launch-environment is not complete and should have something like:
http://askubuntu.com/questions/303309/cant-mount-usb-devices-shut-down-etc-as-a-user/375346#375346

:/
Comment 7 pszczekutowicz 2016-03-13 10:44:51 UTC
Please check https://bbs.archlinux.org/viewtopic.php?pid=1187153#p1187153

I did what opensrcrox suggested with different group name (I used wheel) and now I'am able to plug pendrive and it it mounted without any password prompt.
Comment 8 Pacho Ramos gentoo-dev 2016-03-14 09:14:25 UTC
It's strange we haven't seen that problem before as we haven't change the polkit rules for a long long time :/
Comment 9 Pacho Ramos gentoo-dev 2016-03-14 09:16:43 UTC
A familiar hit this problem too... but he solved it supposedly rebuilding all udisks slots :| (that is even more strange, but if that works). 

I am hesitant to touch much that rules, we must ensure we don't get affected by bug 401513 again with that changes
Comment 10 Alexander Weber 2016-03-25 21:07:13 UTC
Same issue on Systemd+Xfce. If I try to mount an external disk I get the next message in journalctl:
polkitd[2070] Operator of unix-session:6 successfully authenticated as unix-user:root to gain TEMPORARY authorization for action org.freedesktop.udisks2.filesystem-mount-other-seat for system-bus-name::1.82 [/usr/libexec/gvfs-udisks2-volume-monitor] (owned by unix-user:myuser)

or: polkitd[1834]: Operator of unix-session:1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-other-seat for system-bus-name::1.112 [/usr/libexec/gvfs-udisks2-volume-monitor] (owned by unix-user:myuser)

Seems the polkit rule is fine, but the (systemd? dbus? udisks?) don't detect the current session and try to authentificate as "other-seat" action.
On systemd I cannot provide ck-list-sessions, on my other openrc/consolekit system there is no issue.
Comment 11 poncho 2016-03-29 07:42:15 UTC
To work in conjunction with the dbus-user-session, udisks needs the following change:
https://bugs.freedesktop.org/show_bug.cgi?id=89501
https://cgit.freedesktop.org/cgit/?url=udisks/commit/&id=b208be44157253005ac053aeebe13e234a3ac291

it's part of >=sys-fs/udisks-2.1.6
https://cgit.freedesktop.org/cgit/?url=udisks/tree/NEWS#n88
Comment 12 pszczekutowicz 2016-04-10 06:28:34 UTC
Latest update of sys-apps/dbus (1.10.8-r1) solved this issue.
Comment 13 Pacho Ramos gentoo-dev 2016-06-22 19:54:12 UTC
This concrete issue was fixed in udisks side