diff options
Diffstat (limited to 'Linux-PAM/modules/pam_namespace/pam_namespace.c')
-rw-r--r-- | Linux-PAM/modules/pam_namespace/pam_namespace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Linux-PAM/modules/pam_namespace/pam_namespace.c b/Linux-PAM/modules/pam_namespace/pam_namespace.c index 73d8e591..d3612f59 100644 --- a/Linux-PAM/modules/pam_namespace/pam_namespace.c +++ b/Linux-PAM/modules/pam_namespace/pam_namespace.c @@ -589,8 +589,9 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name, #ifdef WITH_SELINUX *i_context = NULL; *origcon = NULL; - if ((rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) { - return rc; + if ((idata->flags & PAMNS_SELINUX_ENABLED) && + (rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) { + return rc; } #endif |