diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-04-25 17:18:10 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-02 08:10:17 -0400 |
commit | 3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d (patch) | |
tree | 73d435414d5d92156a60ed88cb6dfaa35771952c /src | |
parent | e625a14490d913aeb415a3acecb02af9e57ea233 (diff) | |
download | sssd-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.tar.gz sssd-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.tar.bz2 sssd-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/sss_client/pam_sss.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |