Bug 754169 - needs-restarting should state that it needs root privileges
needs-restarting should state that it needs root privileges
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
rawhide
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
abrt_hash:2ebc07243755c1c950ee8c42a77...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-15 10:23 EST by Kamil Páral
Modified: 2014-06-11 12:28 EDT (History)
9 users (show)

See Also:
Fixed In Version: yum-utils-1.1.31-23.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-10 03:52:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kamil Páral 2011-11-15 10:23:15 EST
libreport version: 2.0.6
abrt_version:   2.0.4.981
cmdline:        /usr/bin/python -tt /usr/bin/needs-restarting
comment:        Run 'needs-restarting' as common user instead of root.
executable:     /usr/bin/needs-restarting
kernel:         3.1.1-1.fc16.x86_64
reason:         needs-restarting:84:get_open_files:IOError: [Errno 13] Permission denied
time:           Tue Nov 15 16:20:51 2011
uid:            500
username:       kparal

backtrace:
:needs-restarting:84:get_open_files:IOError: [Errno 13] Permission denied
:
:Traceback (most recent call last):
:  File "/usr/bin/needs-restarting", line 139, in <module>
:    sys.exit(main(sys.argv))
:  File "/usr/bin/needs-restarting", line 117, in main
:    for fn in get_open_files(pid):
:  File "/usr/bin/needs-restarting", line 84, in get_open_files
:    for line in maps.readlines():
:IOError: [Errno 13] Permission denied
:
:Local variables in innermost frame:
:files: []
:maps: <open file '/proc/1/smaps', mode 'r' at 0x1f52030>
:smaps: '/proc/1/smaps'
:pid: '1'
Comment 1 Jonathan 2011-11-22 07:37:35 EST
Package: yum-utils-1.1.31-2.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
tried running "needs-restarting" as non-root
Comment 2 Joe Zeff 2011-12-24 20:28:52 EST
I tried to run needs-restarting after a system update and it crashed.  It hasn't been working properly on this computer since I "upgraded" from Fedora 14 to Fedora 16.

rating: (null)
Package: yum-utils-1.1.31-2.fc16
Architecture: i686
OS Release: Fedora release 16 (Verne)
Comment 3 Miloslav Trmač 2012-02-10 13:24:44 EST
Just ran the tools as an ordinary user

Package: yum-utils-1.1.31-2.fc16
OS Release: Fedora release 16 (Verne)
Comment 4 Fedora End Of Life 2013-01-16 12:33:30 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Miloslav Trmač 2013-01-16 13:41:33 EST
Same in yum-utils-1.1.31-4.fc17.noarch
Comment 6 Fedora End Of Life 2013-07-03 23:24:58 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Miloslav Trmač 2013-07-04 09:31:26 EDT
No longer crashes with yum-utils-1.1.31-10.fc18.noarch, and seems to produce fairly reasonable output ("fairly" due to the screenful of "Could not open /proc/$pid/smaps" lines).  Thanks!
Comment 8 Fedora End Of Life 2013-08-01 06:55:09 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 9 Kamil Páral 2013-08-01 07:56:25 EDT
It no longer crashes in F19, but it could at least end with a non-zero return code (and an explanatory message would even be better). Changing summary and tagging into rawhide. If it ends with 0 exit code, people might not notice it actually doesn't work, especially when used in scripts.
Comment 10 Fedora Update System 2014-05-22 10:24:22 EDT
yum-utils-1.1.31-22.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-utils-1.1.31-22.fc20
Comment 11 Kyle Pablo 2014-05-22 21:28:54 EDT
Just tested yum-utils-1.1.31-22.fc20 as root and non-root.

As root, no problems.

As non-root I get:

$ needs-restarting --useronly
Traceback (most recent call last):
  File "/usr/bin/needs-restarting", line 178, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/needs-restarting", line 124, in main
    for fn in get_open_files(pid):
  File "/usr/bin/needs-restarting", line 88, in get_open_files
    for line in maps:
IOError: [Errno 13] Permission denied
Comment 12 Jonathan 2014-05-23 03:19:01 EDT
Just some ignorant thoughts of mine. Would it be possible to provide different levels of functionality for root / user? When I use needs-restarting, I don't need a detailed answer that might warrant root privileges, but simply look for a "Yes, some package could use a restart". Could that be provided for user level?
Comment 13 Valentina Mukhamedzhanova 2014-05-23 09:27:18 EDT
Kyle, thank you for testing, I'll update the build.
Comment 14 Valentina Mukhamedzhanova 2014-05-23 10:15:50 EDT
https://admin.fedoraproject.org/updates/yum-utils-1.1.31-23.fc20 must fix the issue from c#11
Comment 15 Kyle Pablo 2014-05-23 11:35:13 EDT
(In reply to Valentina Mukhamedzhanova from comment #13)
> Kyle, thank you for testing, I'll update the build.

Fixed.  : )
Comment 16 Fedora Update System 2014-05-24 19:25:04 EDT
Package yum-utils-1.1.31-23.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-utils-1.1.31-23.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6637/yum-utils-1.1.31-23.fc20
then log in and leave karma (feedback).
Comment 17 Kyle Pablo 2014-05-24 20:32:16 EDT
Still get:

$ needs-restarting -u
Could not open /proc/1515/smaps
Could not open /proc/4783/smaps


with yum-utils-1.1.31-23.fc20
Comment 18 Kyle Pablo 2014-05-27 11:53:56 EDT
(In reply to Jonathan from comment #12)
> Just some ignorant thoughts of mine. Would it be possible to provide
> different levels of functionality for root / user? When I use
> needs-restarting, I don't need a detailed answer that might warrant root
> privileges, but simply look for a "Yes, some package could use a restart".
> Could that be provided for user level?


i agree. This would be a nice feature.  Better yet would be after running 'yum update' it would tell you need to restart or logout/in via cmd line.
Comment 19 Fedora Update System 2014-06-11 12:28:43 EDT
yum-utils-1.1.31-23.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.