aboutsummaryrefslogtreecommitdiffstats
path: root/guts/fchown.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/fchown.c')
-rw-r--r--guts/fchown.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/guts/fchown.c b/guts/fchown.c
index 4e717ea..433d359 100644
--- a/guts/fchown.c
+++ b/guts/fchown.c
@@ -15,7 +15,7 @@
return -1;
}
if (owner == (uid_t) -1 || group == (gid_t) -1) {
- msg = pseudo_client_op(OP_STAT, fd, -1, NULL, &buf);
+ msg = pseudo_client_op(OP_STAT, 0, fd, -1, NULL, &buf);
/* copy in any existing values... */
if (msg) {
if (msg->result == RESULT_SUCCEED) {
@@ -38,12 +38,12 @@
}
pseudo_debug(2, "fchown, fd %d: %d:%d -> %d:%d\n",
fd, owner, group, buf.st_uid, buf.st_gid);
- msg = pseudo_client_op(OP_FCHOWN, fd, -1, 0, &buf);
+ msg = pseudo_client_op(OP_FCHOWN, 0, fd, -1, 0, &buf);
if (!msg) {
errno = ENOSYS;
rc = -1;
} else if (msg->result != RESULT_SUCCEED) {
- errno = msg->xerrno;
+ errno = EPERM;
rc = -1;
} else {
rc = 0;