]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorTomas Mraz <tm@t8m.info>
Thu, 3 Aug 2006 13:01:22 +0000 (13:01 +0000)
committerTomas Mraz <tm@t8m.info>
Thu, 3 Aug 2006 13:01:22 +0000 (13:01 +0000)
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).

ChangeLog
modules/pam_selinux/pam_selinux.c

index ec8c5f93767e1614f404653edf44574235865b7c..f4901d212226bd1b427ab2779b8ca26513bec77d 100644 (file)
--- 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  <kukuk@thkukuk.de>
 
        * doc/man/pam_fail_delay.3.xml: Fix some Bugs and enhance
index d3b809c96579ce08df1733b2c9124aa0761fef28..5aaec2e74821698def3e4292bf486f35d92a29a6 100644 (file)
@@ -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)