summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-07-09 17:56:26 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-09 18:40:34 +0200
commit93760585cc6a9b403ede0211f517adfba713d5c9 (patch)
treec886f830b60c83adec43a00501f807ebdd001687
parent6b57784f0f175275fd900eca21c77415e3a5ea52 (diff)
downloadsssd-93760585cc6a9b403ede0211f517adfba713d5c9.tar.gz
sssd-93760585cc6a9b403ede0211f517adfba713d5c9.tar.xz
sssd-93760585cc6a9b403ede0211f517adfba713d5c9.zip
PAM: Test right variable after calling sss_atomic_read_s
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r--src/sss_client/pam_sss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index 908ab128e..d2502d13d 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -507,7 +507,7 @@ static errno_t display_pw_reset_message(pam_handle_t *pamh,
errno = 0;
total_len = sss_atomic_read_s(fd, msg_buf, stat_buf.st_size);
- if (ret == -1) {
+ if (total_len == -1) {
ret = errno;
D(("read failed [%d][%s].", ret, strerror(ret)));
goto done;