Project

General

Profile

Bug #3782

ksh93's builtin chown fails with numeric ids

Added by Garrett D'Amore about 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2013-05-22
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

When I want to chown a file using numeric ids, which don't exist in the passwd file, the builtin chown falls down badly. However, /usr/bin/chown is fine with it. (So is xpg4/chown)

$ chown -h 433:434 /tmp/x
chown: /tmp/x: cannot change owner and group [Invalid argument]
$ ls -lad /tmp/x
lrwxrwxrwx 1 garrett staff 6 May 20 03:37 /tmp/x -> /tmp/g
$ /usr/bin/chown -h 433:434 /tmp/x
$ ls -lad /tmp/x
$ /usr/xpg4/bin/chown -h 433:437 /tmp/x
$ ls -lad /tmp/x
lrwxrwxrwx 1 433 437 6 May 20 03:37 /tmp/x -> /tmp/g

This busts using the builtin chown. This affects folks who want to use these builtins to get a speed boost (no fork/exec), and are using it to do image building (as I am), where the users don't exist in the system files.

History

#1

Updated by Irek Szczesniak about 6 years ago

Bug passed to upstream. May take a week or two to get feedback because the AST and UWIN projects are currently under lockdown to merge several project branches into the mainline.

Also available in: Atom PDF