From 9debe185fcc1f135a81fd474c2abd5d7a73b5be0 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Wed, 22 Jan 2020 19:12:44 +0000 Subject: [PATCH] Remove syncfs fallback for ancient glibc (Debian 7) --- qrexec-lib/unpack.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/qrexec-lib/unpack.c b/qrexec-lib/unpack.c index 171885a..62ccd5b 100644 --- a/qrexec-lib/unpack.c +++ b/qrexec-lib/unpack.c @@ -33,10 +33,6 @@ void send_status_and_crc(int code, const char *last_filename); #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) #endif -#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) -#define HAVE_SYNCFS -#endif - void do_exit(int code, const char *last_filename) { close(0); @@ -213,10 +209,8 @@ void process_one_file(struct file_header *untrusted_hdr) int do_unpack(void) { struct file_header untrusted_hdr; -#ifdef HAVE_SYNCFS int cwd_fd; int saved_errno; -#endif total_bytes = total_files = 0; /* initialize checksum */ @@ -233,14 +227,10 @@ int do_unpack(void) process_one_file(&untrusted_hdr); } -#ifdef HAVE_SYNCFS saved_errno = errno; cwd_fd = open(".", O_RDONLY); if (cwd_fd >= 0 && syncfs(cwd_fd) == 0 && close(cwd_fd) == 0) errno = saved_errno; -#else - sync(); -#endif send_status_and_crc(errno, untrusted_namebuf); return errno;