! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Patch] Broken xflock4 functionality
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description ToZ editbugs 2015-03-26 16:23:24 CET
Created attachment 6131 
Patch to bypass null/blank LockCommand parameter

Commit http://git.xfce.org/xfce/xfce4-session/commit/?id=e940818853582290af21bf38d73ee26143d500ad breaks xflock4 functionality if the xfconf LockCommand parameter doesn't exist or is a blank entry. The

$lock_cmd >/dev/null 2>&1 && exit

will run a blank (empty string) and then exist, never getting to the other items in the list.

The fix is to prepend to that command a check to see if the variable is blank:

if [ ! -z "$lock_cmd" ]; then
   $lock_cmd >/dev/null 2>&1 && exit
fi  

Patch attached.
Comment 1 Derk te Bokkel 2015-03-27 19:03:25 CET
if xfconf is edited to add /general/LockCommand with a valid locker it works ..
Yes the patch is necessary ..
Comment 2 Eric Koegel editbugs 2015-03-28 04:28:39 CET
Thanks ToZ! Pushed to master in:
commit 495aac78058cd78e2d34505af204e72a1b4f19ac
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Sat Mar 28 06:16:10 2015 +0300

    Xflock: bypass null/blank LockCommand parameter (Bug #11764)
    
    Commit http://git.xfce.org/xfce/xfce4-session/commit/?id=e940818853582290af21bf38d73ee26143d500ad
    breaks xflock4 functionality if the xfconf LockCommand parameter doesn't exist or
    is a blank entry. The
    $lock_cmd >/dev/null 2>&1 && exit
    will run a blank (empty string) and then exist, never getting to the other items
    in the list.
    Bug report and patch provided by ToZ.
http://git.xfce.org/xfce/xfce4-session/commit/?id=495aac78058cd78e2d34505af204e72a1b4f19ac

Bug #11764

Reported by:
ToZ
Reported on: 2015-03-26
Last modified on: 2015-03-28

People

Assignee:
Xfce Bug Triage
CC List:
4 users

Version

Version:
Unspecified

Attachments

Additional information