diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | modules/pam_selinux/pam_selinux.c | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -13,6 +13,9 @@ * modules/pam_succeed_if/pam_succeed_if.8.xml: Document the features. + * modules/pam_selinux/pam_selinux.c (security_label_tty): Don't log + relabelling error when the tty device doesn't exist (ENOENT). + 2006-08-01 Thorsten Kukuk <kukuk@thkukuk.de> * doc/man/pam_fail_delay.3.xml: Fix some Bugs and enhance 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) |