Skip to content

Commit

Permalink
ksud: remove permission mode for symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Mar 1, 2024
1 parent 8a59fe1 commit dbe43b1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions userspace/ksud/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,6 @@ pub fn copy_module_files(source: impl AsRef<Path>, destination: impl AsRef<Path>
log::info!("Symlink: {:?} -> {:?}", dest_path, target);
std::os::unix::fs::symlink(target, &dest_path).context("Failed to create symlink")?;
copy_xattrs(&source_path, &dest_path)?;
let metadata =
std::fs::symlink_metadata(&dest_path).context("Failed to read metadata")?;
rustix::fs::chmodat(
rustix::fs::CWD,
&dest_path,
metadata.permissions().mode().into(),
rustix::fs::AtFlags::SYMLINK_NOFOLLOW,
)?;
} else if entry.file_type().is_dir() {
create_dir_all(&dest_path)?;
let metadata = std::fs::metadata(&source_path).context("Failed to read metadata")?;
Expand Down

0 comments on commit dbe43b1

Please sign in to comment.