Revision 70fc55eb hw/virtio-9p-xattr-user.c

b/hw/virtio-9p-xattr-user.c
37 37
{
38 38
    int name_size = strlen(name) + 1;
39 39
    if (strncmp(name, "user.virtfs.", 12) == 0) {
40
        /*
41
         * Don't allow fetch of user.virtfs namesapce
42
         * in case of mapped security
43
         */
44
        return 0;
40

  
41
        /*  check if it is a mapped posix acl */
42
        if (strncmp(name, "user.virtfs.system.posix_acl_", 29) == 0) {
43
            /* adjust the name and size */
44
            name += 12;
45
            name_size -= 12;
46
        } else {
47
            /*
48
             * Don't allow fetch of user.virtfs namesapce
49
             * in case of mapped security
50
             */
51
            return 0;
52
        }
45 53
    }
46 54
    if (!value) {
47 55
        return name_size;

Also available in: Unified diff