summaryrefslogtreecommitdiff
path: root/modules/pam_selinux
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2006-08-03 13:01:22 +0000
committerTomas Mraz <tm@t8m.info>2006-08-03 13:01:22 +0000
commit2442e4e56fdab4840c9f2139679b87828797353b (patch)
tree9bfaf966cc14861f1dd2a8608de1b8544a365ff6 /modules/pam_selinux
parent455fa431f054f3ef537335bb43a0f88f717e912d (diff)
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).
Diffstat (limited to 'modules/pam_selinux')
-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)