diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-01-09 13:10:23 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-01-09 13:10:23 +0100 |
commit | 579937639a4b651719c17e801729b89799a83700 (patch) | |
tree | 5933e66e9b4cb96b75a8993f25c1dbe830dc7b12 /nslcd | |
parent | 6e4d6b88bfcf6407cd8f8bde61c4ddf5e322554f (diff) |
Warn if fd cannot be closed in is_locked()
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1592 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd')
-rw-r--r-- | nslcd/nslcd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c index 4c16a91..4f4d7b9 100644 --- a/nslcd/nslcd.c +++ b/nslcd/nslcd.c @@ -472,10 +472,12 @@ static int is_locked(const char* filename) } if (lockf(fd,F_TEST,0)<0) { - close(fd); + if (close(fd)) + log_log(LOG_WARNING,"problem closing fd: %s",strerror(errno)); return -1; } - close(fd); + if (close(fd)) + log_log(LOG_WARNING,"problem closing fd: %s",strerror(errno)); } return 0; } |