diff options
Diffstat (limited to 'guts/fchmodat.c')
-rw-r--r-- | guts/fchmodat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guts/fchmodat.c b/guts/fchmodat.c index 9804711..78637ee 100644 --- a/guts/fchmodat.c +++ b/guts/fchmodat.c @@ -33,7 +33,7 @@ /* purely for debugging purposes: check whether file * is already in database. */ - msg = pseudo_client_op(OP_STAT, -1, -1, path, &buf); + msg = pseudo_client_op(OP_STAT, 0, -1, -1, path, &buf); if (!msg || msg->result != RESULT_SUCCEED) { pseudo_debug(2, "chmodat to 0%o on %d/%s, ino %llu, new file.\n", mode, dirfd, path, (unsigned long long) buf.st_ino); @@ -54,12 +54,12 @@ */ buf.st_mode = (buf.st_mode & ~07777) | (mode & 07777); - msg = pseudo_client_op(OP_CHMOD, -1, dirfd, path, &buf); + msg = pseudo_client_op(OP_CHMOD, 0, -1, dirfd, path, &buf); if (!msg) { errno = ENOSYS; rc = -1; } else if (msg->result != RESULT_SUCCEED) { - errno = msg->xerrno; + errno = EPERM; rc = -1; } else { rc = 0; |