From: Tomas Mraz Date: Thu, 3 Aug 2006 13:01:22 +0000 (+0000) Subject: Relevant BUGIDs: X-Git-Tag: Linux-PAM-0_99_6_0~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2442e4e56fdab4840c9f2139679b87828797353b;p=linux-pam Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- * modules/pam_selinux/pam_selinux.c (security_label_tty): Don't log relabelling error when the tty device doesn't exist (ENOENT). --- diff --git a/ChangeLog b/ChangeLog index ec8c5f93..f4901d21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * 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)