OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cp: set rc properly
[android-x86/external-toybox.git]
/
toys
/
posix
/
cp.c
diff --git
a/toys/posix/cp.c
b/toys/posix/cp.c
index
6e035f7
..
0dd63a7
100644
(file)
--- a/
toys/posix/cp.c
+++ b/
toys/posix/cp.c
@@
-315,7
+315,7
@@
int cp_node(struct dirtree *try)
// permission bits already correct for mknod and don't apply to symlink
// If we can't get a filehandle to the actual object, use racy functions
if (fdout == AT_FDCWD)
// permission bits already correct for mknod and don't apply to symlink
// If we can't get a filehandle to the actual object, use racy functions
if (fdout == AT_FDCWD)
- fchownat(cfd, catch, try->st.st_uid, try->st.st_gid,
+
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 && !geteuid()) {
AT_SYMLINK_NOFOLLOW);
else rc = fchown(fdout, try->st.st_uid, try->st.st_gid);
if (rc && !geteuid()) {