Synaptic should be able to switch from non-root to root mode without losing state

Bug #80753 reported by Bogdan Butnaru
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: synaptic

When started without super-user privileges Synaptic goes into some kind of "read-only" mode instead of asking for the privileges when clicking on "apply".

It does show an info window at startup describing the situation, which I guess is OK (and makes this more of an enhancement request rather than a bug), but it's very easy to click-through it and forget. The "Apply" button is afterwards disabled, and the reason is easy to forget by this time.

This can be worked-around by using "gksu synaptic" as a menu-entry, but that's wrong from a security perspective (and annoying), as the superuser privileges are only required for applying the changes. (For instance, I may start synaptic just to check if I have something installed or if there are any updates available.) Asking for passwords before it being necessary -- and even before knowing if it's necessary -- is very bad security practice, because frequency trains people to enter their password without thinking.

The package manager that's started by the Add/Remove... standard menu entry is smart enough to do that, but unfortunately it's not a full replacement for Synaptic (I don't know why, but not all packages are available for selection using it).

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Actually gnome-app-install is quite dump :) Since it cannot install packages itself it calls synaptic with root privileges to do the job.

ASAIK it is not allowed to raise your privilges in UNIX world. So far we would have to call another process to do the install part - like gnome-app-install.

There is the plan to use a socket for the dist-upgrade tool. D-Bus doesn't seem to be able to handle file descriptors.

Currently we use gksu synaptic in the menu entry.

Cheers,

Sebastian

Changed in synaptic:
status: Unconfirmed → Confirmed
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I thought Synaptic uses apt-get to do the real installing work. In that case, it could ask privileges for that.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Not. Both apt-get and Synaptic are on the same level: Both use libapt.

Michael Vogt (mvo)
Changed in synaptic:
importance: Undecided → Wishlist
Revision history for this message
antistress (antistress) wrote :

i'd like to complete that report with my point of view
let me know if i have to fill another report instead

With Ubuntu :

when you launch services-admin from the Administration menu, it let you see your services without being able to make any change unless you unlock it with password

when you launch synaptic from Administration menu, you 1st need password to see your packages.
i think that user should be able to run synaptic from Administration menu to see his packages and synpatic should propose an Unlock button to allow the user to do some changes.
I think this is the idea behind Policykit.

User should be able to open Synaptic and browse (not doing changes on them) his packages without password from Administration menu

(ubuntu jaunty alpha)

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :
Revision history for this message
Ben (ben2talk) wrote :

When I ('ben') am logged into my wife's ('pig') account, I can open 'Users and Groups' normally (as Pig isn't a sudo'er) and there is a nice 'Unlock' key, which allows any administrator hanging around to choose their ID and authorise with their own password.

With 'gksu' launchers, it becomes a little more painful, have to get a terminal going (bummer, shortcut doesn't work in her account, have to type 'gnome-terminal') and do 'su ben' and then 'gksu' whatever.

Mixing up GUI and terminal is a bit of a pain sometimes - 'Appearance' works in one launcher, whereas you need 'gnome-appearance-properties' for terminal.

In order to elevate the experience, there needs to be a shortcut. When a NON sudo'er tries to sudo anything, rather than threatening to report me to myself, I'd prefer to be faced with an authentication panel.

If there is an 'open as Adminstrator' option, then it should work for an administrator anywhere and everywhere. Please fix this or I'll stab you through the heart with a plastic fork.

(actually I'm more worried about newer users, because it's enough to hear them complain about how unlike Windows it is at the best of times, and it's worse when they're right).

Revision history for this message
James Haigh (james.r.haigh) wrote :

BUGabundo: Software Centre (as it's called now) doesn't replace Synaptic, it replaces Add/Remove Applications.

Synaptic is /much/ more powerful than USC, and I would hope that this bug does get fixed at some point.

Revision history for this message
James Haigh (james.r.haigh) wrote :

Work on this bug may be common with work on:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/830492

Revision history for this message
James Haigh (james.r.haigh) wrote :

This bug actually blocks my solution to bug #830492 for Synaptic.

Revision history for this message
James Haigh (james.r.haigh) wrote :

Solving this bug would probably also avoid bug #747203 for Synaptic.

Revision history for this message
Michael Vogt (mvo) wrote :

Hey James! Its great to hear that you work on bug #830492 and synaptic in general. It did not get as much attention from me as it deserves because my regular day job keeps me very busy. But I would love to hear if you might be interessted in a working on a fix for this bug in synpatic. It should actually not be that hard, I'm happy to help with it!

Revision history for this message
James Haigh (james.r.haigh) wrote :

What language is Synaptic written in?

Having explored Aptdaemon and seen how flexible it is, it would be ideal if there was a Synaptic-like version of Software Centre (which intentionally doesn't have many features), or if Synaptic was ported to Aptdaemon.

It's a shame Synaptic is no longer installed by default on Ubuntu. It's so powerful.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.