summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-03 10:41:50 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-03 13:26:41 +0200
commitbebeea7ed99394c4061810ed15121bd0f5ac4964 (patch)
tree2024d0e9daa93b9874300890275190157ce8381c /src/tools
parent726e335681428614c2909b9c2987286a05afb982 (diff)
downloadsssd-bebeea7ed99394c4061810ed15121bd0f5ac4964.tar.gz
sssd-bebeea7ed99394c4061810ed15121bd0f5ac4964.tar.bz2
sssd-bebeea7ed99394c4061810ed15121bd0f5ac4964.zip
Return errno, not -1 on failure in files.c
https://fedorahosted.org/sssd/ticket/1862
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/files.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/files.c b/src/tools/files.c
index 10fd6fe4..186f18b9 100644
--- a/src/tools/files.c
+++ b/src/tools/files.c
@@ -703,6 +703,7 @@ copy_dir(struct copy_ctx *cctx,
* reset these bits. */
ret = fchmod(dest_dir_fd, mode);
if (ret == -1) {
+ ret = errno;
DEBUG(SSSDBG_OP_FAILURE,
("Error setting mode of '%s': %s",
dest_dir_path, strerror(ret)));