diff options
author | Rob Landley <rob@landley.net> | 2015-03-12 14:20:10 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-03-12 14:20:10 -0500 |
commit | 9ff639cef3c2f73ce876c6cab4c4f517e512bf13 (patch) | |
tree | 8941c7ca9db4158771d5a4de4a58702e8c88a4e2 /toys/posix/cp.c | |
parent | b8140d18800e7094cdacb0a61526f46181dc132d (diff) | |
download | toybox-9ff639cef3c2f73ce876c6cab4c4f517e512bf13.tar.gz |
Make install support numeric uid/gids (reported by Kylie McClain).
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r-- | toys/posix/cp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c index 45c93e79..31706630 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -402,8 +402,8 @@ void install_main(void) if (flags & FLAG_v) toys.optflags |= 8; // cp's FLAG_v if (flags & (FLAG_p|FLAG_o|FLAG_g)) toys.optflags |= 512; // cp's FLAG_p - if (TT.user) TT.uid = xgetpwnam(TT.user)->pw_uid; - if (TT.group) TT.gid = xgetgrnam(TT.group)->gr_gid; + if (TT.user) TT.uid = xgetpwnamid(TT.user)->pw_uid; + if (TT.group) TT.gid = xgetgrnamid(TT.group)->gr_gid; TT.callback = install_node; cp_main(); |