Merge pull request #2514 from lucab/ups/drop-setenv

libostree/sepolicy: get rid of a g_setenv() call
This commit is contained in:
Colin Walters 2022-01-12 06:51:14 -05:00 committed by GitHub
commit 8aeceb9b88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -422,10 +422,6 @@ initable_init (GInitable *initable,
{ {
const char *policy_rootpath = gs_file_get_path_cached (policy_root); const char *policy_rootpath = gs_file_get_path_cached (policy_root);
/* TODO(lucab): get rid of this setenv(), it may be unsafe in a multi-thread context. */
if (!g_setenv ("LIBSELINUX_DISABLE_PCRE_PRECOMPILED", "1", FALSE))
return glnx_throw (error, "Failed to set environment variable LIBSELINUX_DISABLE_PCRE_PRECOMPILED");
if (selinux_set_policy_root (policy_rootpath) != 0) if (selinux_set_policy_root (policy_rootpath) != 0)
return glnx_throw_errno_prefix (error, "selinux_set_policy_root(%s)", policy_rootpath); return glnx_throw_errno_prefix (error, "selinux_set_policy_root(%s)", policy_rootpath);