local-ldconfig-fsync
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
Gbp-Pq: Topic any
Gbp-Pq: Name local-ldconfig-fsync.diff

elf/cache.c

index a76f89281dcbf5c932cdc0e37d2e6515678f3510..5af97c8088ed8234daf675631b9c4637886844d8 100644 (file)
@@ -449,6 +449,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"));