diff options
author | Tomas Mraz <tm@t8m.info> | 2006-08-03 13:01:22 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2006-08-03 13:01:22 +0000 |
commit | 2442e4e56fdab4840c9f2139679b87828797353b (patch) | |
tree | 9bfaf966cc14861f1dd2a8608de1b8544a365ff6 /modules/pam_selinux/pam_selinux.c | |
parent | 455fa431f054f3ef537335bb43a0f88f717e912d (diff) | |
download | pam-2442e4e56fdab4840c9f2139679b87828797353b.tar.gz pam-2442e4e56fdab4840c9f2139679b87828797353b.tar.bz2 pam-2442e4e56fdab4840c9f2139679b87828797353b.zip |
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/pam_selinux.c')
-rw-r--r-- | modules/pam_selinux/pam_selinux.c | 5 |
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) |