summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-27 06:46:04 +0000
committerguenther <guenther@openbsd.org>2018-04-27 06:46:04 +0000
commit0635dc36b64a5edb9bf4ffd1256fc0007e77fb2c (patch)
treea89c04db23c9e78d2f4391552d6c26572e8c0ba8
parentThe i.MX8M has the same quirk as the i.MX6SX, where the CAP1 register (diff)
downloadwireguard-openbsd-0635dc36b64a5edb9bf4ffd1256fc0007e77fb2c.tar.xz
wireguard-openbsd-0635dc36b64a5edb9bf4ffd1256fc0007e77fb2c.zip
Restore mode on symlinks
ok deraadt@
-rw-r--r--sbin/restore/tape.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index 78511e2aa48..8c0708adca9 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.49 2017/01/21 08:31:44 krw Exp $ */
+/* $OpenBSD: tape.c,v 1.50 2018/04/27 06:46:04 guenther Exp $ */
/* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */
/*
@@ -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);
}