From 2442e4e56fdab4840c9f2139679b87828797353b Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 3 Aug 2006 13:01:22 +0000 Subject: 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). --- modules/pam_selinux/pam_selinux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/pam_selinux') 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) -- cgit v1.2.3