aboutsummaryrefslogtreecommitdiffstats
path: root/guts/fchmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/fchmod.c')
-rw-r--r--guts/fchmod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/guts/fchmod.c b/guts/fchmod.c
index 663a026..b479e8d 100644
--- a/guts/fchmod.c
+++ b/guts/fchmod.c
@@ -12,13 +12,13 @@
return -1;
}
buf.st_mode = (buf.st_mode & ~07777) | (mode & 07777);
- msg = pseudo_client_op(OP_FCHMOD, fd, -1, 0, &buf);
+ msg = pseudo_client_op(OP_FCHMOD, 0, fd, -1, 0, &buf);
real_fchmod(fd, PSEUDO_FS_MODE(mode));
if (!msg) {
errno = ENOSYS;
rc = -1;
} else if (msg->result != RESULT_SUCCEED) {
- errno = msg->xerrno;
+ errno = EPERM;
rc = -1;
} else {
errno = save_errno;