From c5fdaba07b5f965edca0a57d9c3cd8f8bbabc155 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Mar 2018 16:12:41 -0500 Subject: [PATCH] src/libadacl.c: don't try to close file descriptor zero. --- src/libadacl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libadacl.c b/src/libadacl.c index f00a804..d924322 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -968,11 +968,11 @@ int apply_default_acl_ex(const char* path, if (new_acl_unmasked != (acl_t)NULL) { acl_free(new_acl_unmasked); } - if (fd >= 0 && close(fd) == CLOSE_ERROR) { + if (fd > 0 && close(fd) == CLOSE_ERROR) { perror("apply_default_acl_ex (close fd)"); result = ACL_ERROR; } - if (parent_fd >= 0 && close(parent_fd) == CLOSE_ERROR) { + if (parent_fd > 0 && close(parent_fd) == CLOSE_ERROR) { perror("apply_default_acl_ex (close parent_fd)"); result = ACL_ERROR; } -- 2.44.2