Skip to content

Conversation

@naoNao89
Copy link
Contributor

@naoNao89 naoNao89 commented Nov 5, 2025

Fixes #9134

install -m4755 failed to set special permission bits because chown strips them for security. Added second chmod call after chown and improved error handling with libc::chmod for proper special bit support. Updated callers to handle io::Error and added localized error messages. and tests included.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@naoNao89 naoNao89 force-pushed the fix-install-setuid branch 7 times, most recently from 6d3cf3b to 370c1e7 Compare November 5, 2025 19:16
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Special permission bits were being lost when install chowned files, since
chown inherently strips setuid/setgid bits for security. This changes the
install command to apply a second chmod after chown to preserve those bits.

The fix:
- Uses libc::chmod for proper special bit support
- Updates error handling with io::Error conversion
- Adds comprehensive test coverage
- Maintains behavior for non-special permissions
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@naoNao89 naoNao89 closed this by deleting the head repository Nov 6, 2025
@naoNao89 naoNao89 reopened this Nov 7, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 7, 2025

CodSpeed Performance Report

Merging #9150 will improve performances by 3.86%

Comparing naoNao89:fix-install-setuid (02f294e) with main (677fd95)1

Summary

⚡ 2 improvements
✅ 123 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
du_human_balanced_tree[(5, 4, 10)] 10.5 ms 10.1 ms +3.86%
du_max_depth_balanced_tree[(6, 4, 10)] 33.3 ms 32.4 ms +2.57%

Footnotes

  1. No successful run was found on main (8983b90) during the generation of this report, so 677fd95 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setuid bits are not set when using install

1 participant