this post was submitted on 25 Feb 2024
17 points (100.0% liked)
Programming
13376 readers
10 users here now
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Little bit unfair as this was already an existing thing that got a new way to be triggered rather than a completely new feature needing code to handle not following symlinks.
To accurately guess you'd need to know that "don't follow symlinks in this particular scenario" already exists and we're just adding an OR to an if statement.
You have misunderstood. No, it wasn't an existing thing. This is the code that implements it. That's the point.
The change to fs/namei.c is the code to handle not following symlinks; the rest is some necessary code to create the option and expose it to userland.
(Edit: Rereading I do see a little better what you were saying - I actually looked it up and the code that “originally” implemented not following symlinks, that you’re saying we're now adding an or statement to activate, was 2 lines to expose the option, 2 lines of white space, and 2 lines to implement not following symlinks).