Bug 1242826 - lensfun-update-data: Root privileges needed
Summary: lensfun-update-data: Root privileges needed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lensfun
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL: https://sourceforge.net/p/lensfun/bug...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-14 08:59 UTC by Jan "Yenya" Kasprzak
Modified: 2015-07-30 00:51 UTC (History)
2 users (show)

Fixed In Version: lensfun-0.3.0-6.fc22
Clone Of:
Environment:
Last Closed: 2015-07-30 00:51:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan "Yenya" Kasprzak 2015-07-14 08:59:13 UTC
Description of problem:
lensfun-update-data tries to download the new data, but then fails with the
following error message:

Fatal: Root privileges needed for updating the database.

It _is_ running as root, I tried "setenforce 0" as well.
I ran strace on it, and there is no failed syscall with EPERM or EACCESS.
It calls geteuid(), getuid(), getegid() and getgid(), which all return zero.
The end of the strace looks like this:

19546 connect(4, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("176.199.175.106")}, 16) = 0
19546 sendto(4, "GET /lensfun-db/versions.json HT"..., 145, 0, NULL, 0) = 145
19546 recvfrom(4, "HTTP/1.1 200 OK\r\nDate: Tue, 14 J"..., 8192, 0, NULL, NULL) = 276
19546 close(4)                          = 0
19546 write(1, "Fatal: Root privileges needed fo"..., 57) = 57
19546 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x3bfd010430}, {0x3bff9536d0, [], SA_RESTORER, 0x3bfd010430}, 8) = 0
19546 munmap(0x7f8ff0956000, 135168)    = 0
19546 close(3)                          = 0
19546 exit_group(2)                     = ?
19546 +++ exited with 2 +++

So it looks like a bug, not a permission denial.

Version-Release number of selected component (if applicable):
lensfun-tools-0.3.0-4.fc22.x86_64
lensfun-0.3.0-4.fc22.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. su
2. yum -y install lensfun-tools
3. lensfun-update-data

Actual results:
# lensfun-update-data
Reading http://lensfun.sourceforge.net/db/versions.json …
Reading http://wilson.bronger.org/lensfun-db/versions.json …
Fatal: Root privileges needed for updating the database.
# echo $?
2

Expected results:
The lensfun database should be updated.

Additional info:

Comment 1 Jan "Yenya" Kasprzak 2015-07-14 09:58:35 UTC
Looking at the code, it calls python getpass.getuser(), which according to the documentation relies on environment variables instead of the real state of things:

https://docs.python.org/2/library/getpass.html

This is present even in the latest upstream release, so I have taken it there:

https://sourceforge.net/p/lensfun/bugs/30/

Comment 2 Fedora Update System 2015-07-14 14:34:41 UTC
lensfun-0.3.0-6.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/lensfun-0.3.0-6.fc22

Comment 3 Fedora Update System 2015-07-16 02:36:03 UTC
Package lensfun-0.3.0-6.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lensfun-0.3.0-6.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11644/lensfun-0.3.0-6.fc22
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-07-30 00:51:08 UTC
lensfun-0.3.0-6.fc22 has been pushed to the Fedora 22 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.