When a symlink is restored, set its mode to the value from the dump.
This is totally cosmetic, as the kernel ignores the mode on symlinks, but
it's nice to restore to the original.
ok?
Philip
Index: tape.c
===================================================================
RCS file: /cvs/src/sbin/restore/tape.c,v
retrieving revision 1.49
diff -u -p -r1.49 tape.c
--- tape.c 21 Jan 2017 08:31:44 -0000 1.49
+++ tape.c 26 Apr 2018 17:56:00 -0000
@@ -564,6 +564,8 @@ extractfile(char *name)
if (linkit(lnkbuf, name, SYMLINK) == FAIL)
return (FAIL);
(void)lchown(name, uid, gid);
+ (void)fchmodat(AT_FDCWD, name, mode,
+ AT_SYMLINK_NOFOLLOW);
return (GOOD);
}