diff --git a/src/cache.c b/src/cache.c index 7e73db5..fc6d674 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1090,7 +1090,7 @@ dav_open(int *fd, dav_node *node, int flags, pid_t pid, pid_t pgid, uid_t uid, if (create_dir_cache_file(node) != 0) return EIO; node->atime = time(NULL); - return open_file(fd, node, O_RDWR, pid, pgid, uid); + return open_file(fd, node, O_RDONLY, pid, pgid, uid); } int ret = 0; diff --git a/src/dav_coda.c b/src/dav_coda.c index 38fcb51..36d02c3 100644 --- a/src/dav_coda.c +++ b/src/dav_coda.c @@ -219,7 +219,7 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, case CODA_OPEN: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_OPEN:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_CLOSE: @@ -229,7 +229,7 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, case CODA_IOCTL: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_IOCTL:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_GETATTR: @@ -261,7 +261,7 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, case CODA_LINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_LINK:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_RENAME: { @@ -296,13 +296,13 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, case CODA_SYMLINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_SYMLINK:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_READLINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_READLINK:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_FSYNC: { @@ -318,14 +318,14 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, case CODA_VGET: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_VGET:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_OPEN_BY_PATH: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "CODA_OPEN_BY_PATH:"); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; case CODA_STATFS: @@ -350,7 +350,7 @@ dav_coda_loop(int device, size_t bufsize, time_t idle_time, if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "UNKNOWN CODA CALL %u", ih->opcode); - oh->result = ENOTSUP; + oh->result = ENOSYS; len = sizeof(struct coda_out_hdr); break; } diff --git a/src/dav_fuse.c b/src/dav_fuse.c index 4ffe5c6..4295581 100644 --- a/src/dav_fuse.c +++ b/src/dav_fuse.c @@ -235,13 +235,13 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, case FUSE_READLINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_READLINK:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_SYMLINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_SYMLINK:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_MKNOD: @@ -284,7 +284,7 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, case FUSE_LINK: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_LINK:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_OPEN: @@ -317,7 +317,7 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, case FUSE_SETXATTR: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_GETXATTR:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_GETXATTR: @@ -329,7 +329,7 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, case FUSE_REMOVEXATTR: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_REMOVEXATTR:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_FLUSH: @@ -354,7 +354,7 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, case FUSE_FSYNCDIR: if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_FSYNCDIR:"); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; case FUSE_ACCESS: @@ -367,7 +367,7 @@ dav_fuse_loop(int device, size_t bufsize, time_t idle_time, if (debug) syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "UNKNOWN FUSE CALL %i", ih->opcode); - oh->error = -ENOTSUP; + oh->error = -ENOSYS; oh->len = sizeof(struct fuse_out_header); break; }