Bug 1019791

Summary: slock does not have suid applied
Product: [Fedora] Fedora Reporter: Branislav Blaškovič <bblaskov>
Component: slockAssignee: Petr Šabata <psabata>
Status: CLOSED CURRENTRELEASE QA Contact: Branislav Blaškovič <bblaskov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: psabata
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: slock-1.1-5.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-28 08:01:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Branislav Blaškovič 2013-10-16 12:20:19 UTC
Description of problem:

slock is not installed with o+s permissions. This causes that it cannot read shadow file and fail to start.


Version-Release number of selected component (if applicable):
slock-1.1-4.fc20.x86_64

Steps to Reproduce:
1. start slock

Actual results:
$ slock
slock: cannot retrieve shadow entry (make sure to suid or sgid slock)

Expected results:
slock successfuly locks the screen

Additional info:
This works great on f19.

Modes of /usr/bin/slock:
slock-1.1-3.fc19.x86_64.rpm: -rwsr-xr-x (4755)
slock-1.1-4.fc20.x86_64.rpm: -rwxr-xr-x (0755)

Comment 1 Branislav Blaškovič 2013-10-16 12:33:32 UTC
As a workaround you can run this under root:

# chmod u+s /usr/bin/slock

Comment 2 Petr Šabata 2013-10-17 03:00:11 UTC
This is already done in the Makefile and I can even see it happen in the build.log.  Still, you're right -- the permissions are incorrect.

Comment 3 Petr Šabata 2013-10-17 03:19:14 UTC
This seems to be an intentional mock constraint now.
Setting the bits with %attr solves the issue.

Comment 4 Fedora Update System 2013-10-17 03:38:53 UTC
slock-1.1-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/slock-1.1-5.fc20

Comment 5 Branislav Blaškovič 2013-10-17 13:13:05 UTC
Thank you! 

I built rpm from repo.

$ rpm -q slock
slock-1.1-5.fc20.x86_64

$ ls -l /usr/bin/slock 
-rwsr-xr-x. 1 root root 15344 Oct 17 15:11 /usr/bin/slock

slock works great now.

Comment 6 Branislav Blaškovič 2013-10-18 12:32:15 UTC
Version from updates-testing works great too.

Comment 7 Fedora Update System 2013-11-10 06:43:52 UTC
slock-1.1-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.