Skip to content

Commit 938dbe8

Browse files
committed
Add MS_NOSYMFOLLOW flag
MS_NOSYMFOLLOW (since Linux 5.10) disallows automatic following of symlinks. Added to rust-lang/libc in 0.2.176 See: torvalds/linux@dab741e https://github.com/rust-lang/libc/releases/tag/0.2.176
1 parent e1e630f commit 938dbe8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ targets = [
2828
]
2929

3030
[dependencies]
31-
libc = { version = "=0.2.175", features = ["extra_traits"] }
31+
libc = { version = "=0.2.176", features = ["extra_traits"] }
3232
bitflags = "2.3.3"
3333
cfg-if = "1.0"
3434
pin-utils = { version = "0.1.0", optional = true }

changelog/2683.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added MS_NOSYMFOLLOW flag, a mount option on linux which disallows automatic following of symlinks.

src/mount/linux.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ libc_bitflags!(
2121
MS_MANDLOCK;
2222
/// Directory modifications are synchronous
2323
MS_DIRSYNC;
24+
/// Do not follow symlinks
25+
MS_NOSYMFOLLOW;
2426
/// Do not update access times
2527
MS_NOATIME;
2628
/// Do not update directory access times

0 commit comments

Comments
 (0)