diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2014-07-09 17:56:26 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-09 18:40:34 +0200 |
commit | 93760585cc6a9b403ede0211f517adfba713d5c9 (patch) | |
tree | c886f830b60c83adec43a00501f807ebdd001687 | |
parent | 6b57784f0f175275fd900eca21c77415e3a5ea52 (diff) | |
download | sssd-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.c | 2 |
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; |