mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Use secure_getenv() instead of getenv() for all environment variables
... to avoid vulnerabilities that could occur if set-user-ID or set-group-ID programs accidentally trusted the environment. zkey is usually NOT a set-user-ID or set-group-ID program, but its safer to use secure_getenv() anyway. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
8723dbce04
commit
02aaff72fa
+1
-1
@@ -2894,7 +2894,7 @@ static int open_keystore(void)
|
||||
{
|
||||
char *directory;
|
||||
|
||||
directory = getenv(ENVVAR_ZKEY_REPOSITORY);
|
||||
directory = secure_getenv(ENVVAR_ZKEY_REPOSITORY);
|
||||
if (directory == NULL)
|
||||
directory = DEFAULT_KEYSTORE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user