OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ba7191
)
In cp -a, don't complain if non-root user can't chown, failure is expected.
author
Rob Landley
<rob@landley.net>
Tue, 31 May 2016 22:33:23 +0000
(17:33 -0500)
committer
Rob Landley
<rob@landley.net>
Tue, 31 May 2016 22:33:23 +0000
(17:33 -0500)
toys/posix/cp.c
patch
|
blob
|
history
diff --git
a/toys/posix/cp.c
b/toys/posix/cp.c
index
d21af2f
..
06c537e
100644
(file)
--- a/
toys/posix/cp.c
+++ b/
toys/posix/cp.c
@@
-318,7
+318,7
@@
int cp_node(struct dirtree *try)
rc = fchownat(cfd, catch, try->st.st_uid, try->st.st_gid,
AT_SYMLINK_NOFOLLOW);
else rc = fchown(fdout, try->st.st_uid, try->st.st_gid);
- if (rc) {
+ if (rc
&& !geteuid()
) {
char *pp;
perror_msg("chown '%s'", pp = dirtree_path(try, 0));