Oops -- I will look into that. It appears there were some changes (from suid to sgid) in slock, when I bumped it from 0.9 to 1.0; I'll do some testing, find a fix, and push an update. Thanks!
Posted after 9 hours 17 minutes 27 seconds:
Ok, I figured out what happened -- the Makefile for slock runs 'chmod u+s' on slock when you run 'make install'. However, I just ran 'make' and then copied the binary into a package without running 'make install' (the source code only generates one file when you compile it).
The fix for now (for locking the screen as guest) is:
Code: Select all
su
(enter root password)
chmod u+s /usr/bin/slock
exit
And then guest can run slock.
This sets the suid sticky bit. I was hoping to be able to use guid but it doesn't appear to work. I'll compare the source code to the patch I found online (submitted by a debian dev to allow guid) and see if I can get that working, and I'll see about a gui warning screen as well.
Posted after 3 days 8 hours 10 minutes 3 seconds:
OK, I've prepared a fix. I wrote a slackbuild for slock which runs 'make install', so suid is now set at package build-time (still unable to get this working with guid). I also wrote a script with a gtkdialog warning screen, which will popup when a user locks the screen with slock. That dialog has a checkbox for 'do not show this message again', which generates a file at ~/.slock_no_warn, so the warning screen can be easily disabled. If the user is not saving changes, they will be asked if they want to generate a module, which will place ~/.slock_no_warn for ALL users on the system (root authentication required).
To put this in effect, I have moved /usr/bin/slock to /usr/bin/slock-binary, then set /usr/bin/slock as a symlink to /opt/porteus-scripts/xfce/start-slock, which is where the gtkdialog is started, and then 'slock-binary' is called at the end. I also commented out the line in xflock4 that turns of dpms, as I'm forcing it off inside 'start-slock' instead.
Download the fix here:
32-bit:
http://porteus-xfce.googlecode.com/file ... 120723.xzm
64-bit:
http://porteus-xfce.googlecode.com/file ... 120723.xzm
place the module in /porteus/modules, and activate (or reboot). Then lock the screen with 'slock' at the command line, or from the xfce panel (in the menu of the 'user' button on the far right).
I would really appreciate some testing and feedback on this one before I have it added to the updates section on the official repo. This application should work in any desktop.
Note: I thought about putting this warning on a 30 second timer, such that if a user chose to lock their screen after a period of inactivity, and walked away, the warning would pop up, but their screen would still lock after a bit (securing their system); however, I've not added such a feature, as I figure it's better to make sure they see the warning the first time. Otherwise,they are liable to have the screen lock up on them when they go inactive, and be unable to recover their system. I'm curious to know what users think of this.