update-notifier doesn't handle secured .list files gracefully

Bug #269467 reported by Rick McBride
2
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: update-notifier

Description: Ubuntu 8.04.1
Release: 8.04
update-notifier:
  Installed: 0.70.9
  Candidate: 0.70.9
  Version table:
 *** 0.70.9 0
        500 http://us.archive.ubuntu.com hardy-updates/main Packages
        100 /var/lib/dpkg/status
     0.70.7 0
        500 http://us.archive.ubuntu.com hardy/main Packages

ubunet development has moved to a different configuration for a private PPA. As part of this, repository info is now in

/etc/apt/sources.list.d/ubunet.list

Since username and password are kept in ubunet.list, it is set to chmod 600.

Unfortunately this appears to cause problems for update-notifier, as it shows orange "updates available"

Clicking on the icon to retrieve updated results in
---
Could not initialize the package information

A unresolvable problem occurred while initializing the package information.

Please report this bug against the 'update-manager' package and include the following error message:

'E:Opening /etc/apt/sources.list.d/ubunet.list - ifstream::ifstream (13 Permission denied), E:The list of sources could not be read.'
----

acknowledging this dialog closes update manager.

This sequence of events is probably happening because update-notifier is trying to read the file prior to prompting for su creds. It should handle this with a credentials prompt, or some other manner that doesn't result in unceremonious exit.

sudo apt-get (etc) does get the updates, but update-notifier is still showing "updates ready" Mousing over it in this state gives a tooltip of

---
An error occured, please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The error mesage was: ' Error: Opening the cache (E:Opening /etc/apt/sources.list.d/ubunet.list - ifstream::ifstream (13 Permission denied), E: the list of sources could not be read.)'This usually means that your installed packages have unmet dependencies
---
Neither suggestion in the tooltip clears the status.

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

Thanks for your bugreport.

You are correct about the cause for this problem. As a workaround you could set
/etc/apt/sources.list.d/ubunet.list
to root.admin and mode 640.

Changed in update-notifier:
importance: Undecided → Medium
status: New → Triaged
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.