File s390-tools-sles15sp1-01-zkey-Include-sbin-into-PATH-when-executing-commands.patch of Package s390-tools.12120

Subject: zkey: Fails to run commands generated by 'zkey cryptsetup'
From: Ingo Franzki <ifranzki@linux.ibm.com>

Description:  zkey: Fails to run commands generated by 'zkey cryptsetup'
Symptom:      Fails to run commands generated by 'zkey cryptsetup'. 
Problem:      When using 'zkey cryptsetup' with --run option the
              execution of the generated commands may fail, when
              the executable to be run is located in '/sbin'.
Solution:     Include /sbin into PATH when executing commands.
Reproduction: Use 'zkey cryptsetup' with option --run on a distribution
              where 'cryptsetup' is located in '/sbin'.
Upstream-ID:  -
Problem-ID:   173155

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
---
 zkey/keystore.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/zkey/keystore.c
+++ b/zkey/keystore.c
@@ -3235,7 +3235,7 @@ static int _keystore_execute_cmd(const c
 {
 	int rc;
 
-	rc = setenv("PATH", "/bin:/usr/bin:/usr/sbin", 1);
+	rc = setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin", 1);
 	if (rc < 0)
 		return rc;
 
openSUSE Build Service is sponsored by