summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-25 17:18:10 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-02 08:10:17 -0400
commit3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d (patch)
tree73d435414d5d92156a60ed88cb6dfaa35771952c /src/sss_client
parente625a14490d913aeb415a3acecb02af9e57ea233 (diff)
downloadsssd_unused-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.zip
sssd_unused-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.tar.gz
sssd_unused-3c6a4eead4e9186d0ea2e9ac7092f1a7a9e0bf6d.tar.xz
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/sss_client')
-rw-r--r--src/sss_client/pam_sss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index 3de810c..e25792f 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;
}