Skip to content

chown: warn when '.' is used as owner:group separator#11438

Merged
cakebaker merged 1 commit intouutils:mainfrom
eyupcanakman:fix/chown-dot-separator-warning-11352
Mar 31, 2026
Merged

chown: warn when '.' is used as owner:group separator#11438
cakebaker merged 1 commit intouutils:mainfrom
eyupcanakman:fix/chown-dot-separator-warning-11352

Conversation

@eyupcanakman
Copy link
Copy Markdown
Contributor

@eyupcanakman eyupcanakman commented Mar 21, 2026

GNU chown emits a diagnostic when '.' is used instead of ':' as the owner:group separator. The uutils version silently accepted it.

Now emits warning: '.' should be ':': '<spec>' to match GNU behavior. Both owner and group are still applied correctly when the dot separator is used.

Closes #11352

@eyupcanakman eyupcanakman force-pushed the fix/chown-dot-separator-warning-11352 branch from 20cc0f4 to 1b32857 Compare March 21, 2026 06:45
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 22, 2026

Merging this PR will improve performance by 13.59%

⚡ 1 improved benchmark
✅ 299 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory cp_recursive_deep_tree[(120, 4)] 699.2 KB 615.6 KB +13.59%

Comparing eyupcanakman:fix/chown-dot-separator-warning-11352 (3c4d72e) with main (ac72aa8)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

let gid = parse_gid(group, spec)?;
return Ok((uid, gid));
}
show_warning!("'.' should be ':': {}", spec.quote());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the translate!() macro

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/misc/io-errors is no longer failing!
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Congrats! The gnu test tests/csplit/csplit-heap is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/io-errors is no longer failing!
Congrats! The gnu test tests/csplit/csplit-heap is now passing!

When the spec contains '.' but no ':', emit a warning matching GNU
coreutils behavior and re-parse with '.' as separator so both owner
and group are applied.

Closes uutils#11352
@eyupcanakman eyupcanakman force-pushed the fix/chown-dot-separator-warning-11352 branch from 958bd70 to 3c4d72e Compare March 25, 2026 18:23
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.

@cakebaker cakebaker merged commit f6451c7 into uutils:main Mar 31, 2026
163 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks for your PR!

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.

chown: warning message

3 participants