Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264812 - sys-apps/pciutils update-pciids fails to preserve permissions
Summary: sys-apps/pciutils update-pciids fails to preserve permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 23:11 UTC by Redeeman
Modified: 2009-04-06 10:20 UTC (History)
0 users

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


Attachments
update-pciids.patch (update-pciids.patch,344 bytes, patch)
2009-04-03 23:12 UTC, Redeeman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Redeeman 2009-04-03 23:11:55 UTC
I run with umask 077, and i recently rebooted, and noticed hald failed to start, it segmentation faulted, i investigated this, and found the error to be that hal does ZERO error checking on the pciid opening, and didnt have permissions to open it, as it had gotten rw------- on /usr/share/misc/pci.ids from my update-pciids.

a quick chmod fixed it.

i looked at /usr/sbin/update-pciids and found the section at the bottom that gunzip's it, which fails to preserve permissions..

Reproducible: Always

Steps to Reproduce:
1. umask 077
2. update-pciids
3. ls -l /usr/share/misc
4. /etc/init.d/hald restart
Comment 1 Redeeman 2009-04-03 23:12:56 UTC
Created attachment 187252 [details, diff]
update-pciids.patch
Comment 2 Redeeman 2009-04-03 23:15:35 UTC
btw, should i create a bug about hald's non-error-checking behavior?

it would REALLY be lovely if it could say: "fix your permissions ffs!" instead of leaving this in the syslog:
Apr  3 20:08:29 [kernel] [   15.546819] hald[3798]: segfault at 0 ip 0000000000423685 sp 00007fffdfbb1b10 error 4 in hald[400000+53000]
Comment 3 SpanKY gentoo-dev 2009-04-04 18:56:10 UTC
would be safer to always force perms to a+r at the end of the file

and yes, you should file a bug about hald being a pos
Comment 5 Redeeman 2009-04-06 10:20:24 UTC
in that case you may also want to do a+r the other place where it sets permissions... i just followed their lead :)