#4107 sss_client/idmap/common_ex.c: fix sss_nss_timedlock() to return errno
Closed 4 years ago by atikhonov. Opened 4 years ago by miztake.
SSSD/ miztake/sssd prototype  into  master

@@ -73,7 +73,7 @@ 

  

      ret = clock_gettime(CLOCK_REALTIME, &starttime);

      if (ret != 0) {

-         return ret;

+         return errno;

      }

      endtime.tv_sec = starttime.tv_sec + SEC_FROM_MSEC(timeout_ms);

      endtime.tv_nsec = starttime.tv_nsec + NSEC_FROM_MSEC(timeout_ms);
@@ -83,6 +83,7 @@ 

      if (ret == 0) {

          ret = clock_gettime(CLOCK_REALTIME, &endtime);

          if (ret != 0) {

+             ret = errno;

              sss_nss_unlock();

              return ret;

          }

sss_nss_timedloc() should return errno, but returns -1 if clock_gettime(2) fails.
Fix sss_nss_timedlock() to return errno if clock_gettime(2) fails.

Hi,

thank you for the patch. I wonder if you can send it to https://github.com/SSSD/sssd/ as well? This is our preferred place for pull-request since automatic tests are run there for every new pull-request.

bye,
Sumit

Patch makes sense and LGTM.

Running CI/covscan... (but most probably I will only check results after weekend)

Thank you for your comment and review.

I sent the pull request to https://github.com/SSSD/sssd/ as well.
In the future, when I send a new pull request, I will send it to github.

I sent the pull request to https://github.com/SSSD/sssd/ as well.

PR https://github.com/SSSD/sssd/pull/917 was accepted.

Won't you mind closing it here?

PR https://github.com/SSSD/sssd/pull/917 was accepted.
Won't you mind closing it here?

There is no problem closing this PR.
Thank you for your cooperation.

Pull-Request has been closed by atikhonov

4 years ago
Metadata