On Fri, Mar 4, 2011 at 9:25 AM, M. Mohan Kumar <mo...@in.ibm.com> wrote: > @@ -296,8 +357,23 @@ static int local_chmod(FsContext *fs_ctx, const char > *path, FsCred *credp) > { > if (fs_ctx->fs_sm == SM_MAPPED) { > return local_set_xattr(rpath(fs_ctx, path), credp); > - } else if ((fs_ctx->fs_sm == SM_PASSTHROUGH) || > - (fs_ctx->fs_sm == SM_NONE)) { > + } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) { > + int pfd, err, serrno = 0; > + char *tmp_path; > + pfd = get_dirfd(fs_ctx, path); > + if (pfd < 0) { > + return -1; > + } > + tmp_path = qemu_strdup(path); > + err = fchmodat(pfd, basename(tmp_path), credp->fc_mode, 0);
AT_SYMLINK_NOFOLLOW is missing. Stefan