local-ldconfig-fsync
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 3 Mar 2018 10:47:56 +0000 (10:47 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sat, 3 Mar 2018 10:47:56 +0000 (10:47 +0000)
Gbp-Pq: Topic any
Gbp-Pq: Name local-ldconfig-fsync.diff

elf/cache.c

index c2c010f97bb23d2b568e6499e5806dac73211da3..9a7e72b79485908b50f060698baea8aded63eeb0 100644 (file)
@@ -455,6 +455,7 @@ save_cache (const char *cache_name)
     }
 
   if (write (fd, strings, total_strlen) != (ssize_t) total_strlen
+      || fsync (fd)
       || close (fd))
     error (EXIT_FAILURE, errno, _("Writing of cache data failed"));