From 3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 25 Apr 2012 17:18:10 +0200 Subject: PAM_SSS: report error code if write fails clang had reported this as "value of ret is never used", I think it would be nice to report a meaningful error message. --- src/sss_client/pam_sss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c index 3de810c5..e25792fc 100644 --- a/src/sss_client/pam_sss.c +++ b/src/sss_client/pam_sss.c @@ -1209,8 +1209,8 @@ static int send_and_receive(pam_handle_t *pamh, struct pam_items *pi, written = sss_atomic_write_s(fd, pi->selinux_user, len); if (written == -1) { ret = errno; - logger(pamh, LOG_ERR, "writing to SELinux data file " - "failed. %s", tmp_path); + logger(pamh, LOG_ERR, "writing to SELinux data file %s" + "failed [%d]: %s", tmp_path, ret, strerror(ret)); pam_status = PAM_SYSTEM_ERR; goto done; } -- cgit