(gutsy) package installation doesn't honour service settings

Bug #138955 reported by Roger Binns on 2007-09-11
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
pam (Ubuntu)

Bug Description

I have the samba (folder sharing) service installed on my machine, but have it turned off in System > Administration > Services. (I only want it on in rare controlled occassions).

I just did an update which caused pam to be updated which decided to restart all services using pam and in the process it restarted samba. However samba was not running at the time, nor is it enabled in the gui tool or in any /etc/rc?.d directory.

Package installation should really be obeying the service settings rather than just blindly restarting everything potentially affected. Additionally it should look to see if the service is already running. If it isn't then there is no need to restart it!

This affects pam upgrades and likely other packages as well. Additionally it is a minor security problem because the administrator can have deliberately disabled services yet they can still end up running.

Scott Kitterman (kitterman) wrote :

The pam upgrade opened a debconf window for me asking which services I wanted restarted. Didn't you get such a question?

Roger Binns (ubuntu-rogerbinns) wrote :

Yes I did, but why should I have to keep babysitting these things - they have billions of cycles per second. The upgrade script could easily have figured out that Samba wasn't running hence restarting it is pointless. And I happen to know what Samba is. In the rest of the interfaces it is presented as "Folder sharing".

I don't remember the specifics but something similar happened to me with Feisty. I didn't want any network accessible services running on my laptop. I installed Battle for Wesnoth which then installed and ran a daemon not needed for single player game play. I promptly when in and disabled it. And then an upgrade happened and it was re-enabled/re-started again.

This whole issue could probably be addressed by making invoke-rc.d more intelligent. For example it could not start programs that don't have /etc/rc?.d links.

Roger Binns (ubuntu-rogerbinns) wrote :

Care to explain exactly what is invalid? I explicitly told Ubuntu not to start the Folder Sharing service. It did so when upgrading packages anyway. I will admit that in this example it included the list of services it intended to restart, but it certainly didn't include a dictionary translating from geekspeak ("samba") into terminology used elsewhere ("Folder Sharing").

Because the system asked you if you wanted to do a restart on Samba and you
said yes.

Roger Binns (ubuntu-rogerbinns) wrote :

If this is supposed to be a distro aimed at deep geeks then I have no issue with the behaviour. But it isn't. There were two problems, both of which can be fixed and would make the experience better. The first is that different terminology is used ("samba" vs "Folder sharing").

The second is that I had already explicitly disabled Folder Sharing/samba via the Ubuntu administrator tools. The pam update code completely ignored that. The dialog says "restart" yet at least one of the services was not running and had been disabled. I do not think it is unrealistic for the update code to take note of my previous choices and current state, and not include samba in the list (or anything else that isn't running and is disabled). The goal of the restarts is to ensure that the version of pam just removed is not used and only the newly installed one is, and not cause "collateral damage".

In order to answer the pam upgrade dialog, I certainly do think it is ridiculous to have to memorize every administrative action I have made in the past, have to go and translate short names into descriptive ones (how many people know what avahi does?), and then check to see if I previously disabled the service, for each and every one listed.

Scott Kitterman (kitterman) wrote :

OK. I'll give you it should leave it stopped if it was stopped as a reasonable, but low priority issue for pam. In general users won't get these kinds of upgrades on released software. There is a certain amount of you need to know what you are doing when running development releases.

Steve Langasek (vorlon) wrote :

This is a bug in gnome-system-tools (the System->Admin->Services interface), not in pam. libpam0g uses the defined interface for starting and stopping services from package scripts, invoke-rc.d; whereas services-admin from gnome-system-tools is subverting this interface, by removing the start symlink in /etc/rc2.d instead of replacing it with a stop symlink, leaving the state of the service in that runlevel undefined.

You will find that upgrading the samba package will also cause the service to be silently restarted under these circumstances.

Changed in gnome-system-tools:
importance: Undecided → Low
status: New → Triaged
Changed in pam:
status: Triaged → Invalid
Pedro Villavicencio (pedro) wrote :

Thanks for the report Roger Binns , It has been a long time without any comment or a duplicate in this bug report and It is possible that the bug has been fixed. May you please try to reproduce it with the latest Stable Release of Ubuntu the Natty Narwhal and add the respective comments to the report? You can learn how to get that release at http://www.ubuntu.com/download . Thanks again and we appreciate your help.

Changed in gnome-system-tools (Ubuntu):
status: Triaged → Incomplete
Roger Binns (ubuntu-rogerbinns) wrote :

Really? You wait four years, the cause and fix is identified (comment #7), and ask if it still happens? Remind me again what the point of reporting bugs is?

Scott Kitterman (kitterman) wrote :

I agree. Randomly setting bugs to incomplete isn't a good approach.

Changed in gnome-system-tools (Ubuntu):
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers