Skip to content

Commit

Permalink
Merge pull request coreos#4894 from cgwalters/dir-uidgid-symlink-meta
Browse files Browse the repository at this point in the history
passwd: Don't traverse symlinks when querying metadata
  • Loading branch information
jmarrero authored Apr 2, 2024
2 parents cce4cee + 16f4917 commit 8caf689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/passwd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ fn dir_contains_uid_gid(dir: &Dir, uid: &Option<Uid>, gid: &Option<Gid>) -> Resu
let subdir = dir.open_dir(dir_entry.file_name())?;
dir_contains_uid_gid(&subdir, uid, gid)?
} else {
let metadata = dir.metadata(dir_entry.file_name())?;
let metadata = dir_entry.metadata()?;
compare_uid_gid(metadata, uid, gid)
};

Expand Down

0 comments on commit 8caf689

Please sign in to comment.