From: Paul Eggert Date: Tue, 23 Nov 2010 20:57:47 +0000 (-0800) Subject: tar: work around FreeBSD symlink incompatibility with POSIX X-Git-Tag: debian/1.25-3~1 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=2f1a7b3a1616f92c78e9b89203b0b358e1e67053;p=debian%2Ftar tar: work around FreeBSD symlink incompatibility with POSIX * src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for FreeBSD. Problem reported by Christian Weisgerber in . --- diff --git a/src/extract.c b/src/extract.c index 6711f873..c52c9ce8 100644 --- a/src/extract.c +++ b/src/extract.c @@ -609,6 +609,9 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made) switch (e) { case ELOOP: + /* With open ("symlink", O_NOFOLLOW|...), POSIX says errno == ELOOP, + but FreeBSD through at least 8.1 uses errno == EMLINK. */ + case EMLINK: if (! regular || old_files_option != OVERWRITE_OLD_FILES || dereference_option) break;