summaryrefslogtreecommitdiff
path: root/modules/pam_selinux/pam_selinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_selinux/pam_selinux.c')
-rw-r--r--modules/pam_selinux/pam_selinux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/pam_selinux/pam_selinux.c b/modules/pam_selinux/pam_selinux.c
index d3b809c9..5aaec2e7 100644
--- a/modules/pam_selinux/pam_selinux.c
+++ b/modules/pam_selinux/pam_selinux.c
@@ -256,10 +256,11 @@ security_label_tty(pam_handle_t *pamh, char *tty,
if (getfilecon(ptr, &prev_context) < 0)
{
- pam_syslog(pamh, LOG_NOTICE,
+ if(errno != ENOENT)
+ pam_syslog(pamh, LOG_NOTICE,
"Warning! Could not get current context for %s, not relabeling: %m",
ptr);
- return NULL;
+ return NULL;
}
if( security_compute_relabel(usercon,prev_context,SECCLASS_CHR_FILE,
&newdev_context)!=0)