Revision 2d40564a hw/9pfs/virtio-9p-local.c

b/hw/9pfs/virtio-9p-local.c
257 257
{
258 258
    char buffer[PATH_MAX];
259 259

  
260
    if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {
261
        return -1;
262
    }
263 260
    if (lchown(rpath(fs_ctx, path, buffer), credp->fc_uid,
264 261
                credp->fc_gid) < 0) {
265 262
        /*
......
270 267
            return -1;
271 268
        }
272 269
    }
270

  
271
    if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) {
272
        return -1;
273
    }
273 274
    return 0;
274 275
}
275 276

  

Also available in: Unified diff