diff options
-rw-r--r-- | p11-kit/conf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/p11-kit/conf.c b/p11-kit/conf.c index 8a328ed..3ec1c36 100644 --- a/p11-kit/conf.c +++ b/p11-kit/conf.c @@ -228,9 +228,15 @@ _p11_conf_load_globals (const char *system_conf, const char *user_conf, goto finished; } - if (mode != CONF_USER_NONE && getauxval (AT_SECURE)) { - p11_debug ("skipping user config in setuid or setgid program"); - mode = CONF_USER_NONE; + if (mode != CONF_USER_NONE) { + if (getauxval (AT_SECURE)) { + p11_debug ("skipping user config in setuid or setgid program"); + mode = CONF_USER_NONE; + } else if (secure_getenv ("P11_KIT_NO_USER_CONFIG")) { + /* This one should be used in RPM %post and equivalent */ + p11_debug ("skipping user config due to P11_NO_USER_CONFIG"); + mode = CONF_USER_NONE; + } } if (mode != CONF_USER_NONE) { |