Skip to content

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Nov 27, 2024

  • When using symbolic permissions with '=', the resulting file permissions weren't right; here's what I found...
  • mod() should be passed the original file to stat(), but it was being passed the new target file after File::Copy::copy() created it
  • Base permissions for "absolute" symbolic permissions (i.e. those set with '=') are zero, so it is not correct to stat() the original file in this case
  • The statement clearing bits in %perms for operator '=' in loop should only clear bits for $who the current iteration looks at
%perl install -m u=rwx,g=rx,o=x comm a/comm # -m 751
%perl install -m u=rwx,g=r comm a/comm # -m 740
%perl install -m 'a=' comm a/comm # -m 0

* When using '=' with 'install -m", the resulting file permissions weren't right; here's what I found...
* mod() should be passed the original file to stat(), but it was being passed the target file after File::Copy::copy() created it
* Base permissions for "absolute" symbolic permissions (i.e. those set with '=') are zero, so it is not correct to stat() the original file in this case
* The statement clearing bits in perms-hash for operator '=' in loop should only clear bits for $who the current iteration looks at

%perl install -m u=rwx,g=rx,o=x comm a/comm # -m 751
%perl install -m u=rwx,g=r comm a/comm # -m 740
%perl perl install -m 'a=' comm a/comm # -m 0
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: install The install program labels Nov 27, 2024
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:14 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing November 27, 2024 01:15 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Nov 27, 2024

Pull Request Test Coverage Report for Build 12041873260

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.7%) to 73.805%

Totals Coverage Status
Change from base Build 12040230006: 0.7%
Covered Lines: 355
Relevant Lines: 481

💛 - Coveralls

@briandfoy briandfoy added Type: bug an existing feature does not work and removed Type: enhancement improve a feature that already exists labels Nov 28, 2024
@briandfoy briandfoy self-assigned this Nov 28, 2024
@briandfoy briandfoy merged commit 19934f9 into briandfoy:master Nov 28, 2024
23 checks passed
@briandfoy
Copy link
Owner

changes: handle symbolic permissions correctly

@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Nov 28, 2024
@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: install The install program Status: released there is a new release with this fix Type: bug an existing feature does not work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants