qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [V7 PATCH 9/9] virtio-9p: Chroot environment for other


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [V7 PATCH 9/9] virtio-9p: Chroot environment for other functions
Date: Fri, 11 Mar 2011 17:12:50 +0000

On Fri, Mar 4, 2011 at 9:25 AM, M. Mohan Kumar <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]