fs: Enable link security restrictions by default
authorBen Hutchings <ben@decadent.org.uk>
Fri, 2 Nov 2012 05:32:06 +0000 (05:32 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 12 Aug 2025 03:28:04 +0000 (05:28 +0200)
Bug-Debian: https://bugs.debian.org/609455
Forwarded: not-needed

This reverts commit 561ec64ae67ef25cac8d72bb9c4bfc955edfd415
('VFS: don't do protected {sym,hard}links by default').

Gbp-Pq: Topic debian
Gbp-Pq: Name fs-enable-link-security-restrictions-by-default.patch

fs/namei.c

index 6795600c5738a56740bdeb2b4ec33f29545d918a..284a614bbb7d3d2db2884917432d2c06b4dff36a 100644 (file)
@@ -1034,8 +1034,8 @@ static inline void put_link(struct nameidata *nd)
                path_put(&last->link);
 }
 
-static int sysctl_protected_symlinks __read_mostly;
-static int sysctl_protected_hardlinks __read_mostly;
+static int sysctl_protected_symlinks __read_mostly = 1;
+static int sysctl_protected_hardlinks __read_mostly = 1;
 static int sysctl_protected_fifos __read_mostly;
 static int sysctl_protected_regular __read_mostly;