Markus Armbruster 4999f3a8a6 acl: acl_add can't insert before last list element, fix
Watch this:

    $ upstream-qemu -nodefaults -S -vnc :0,acl,sasl -monitor stdio
    QEMU 1.5.50 monitor - type 'help' for more information
    (qemu) acl_add vnc.username drei allow
    acl: added rule at position 1
    (qemu) acl_show vnc.username
    policy: deny
    1: allow drei
    (qemu) acl_add vnc.username zwei allow 1
    acl: added rule at position 2
    (qemu) acl_show vnc.username
    policy: deny
    1: allow drei
    2: allow zwei
    (qemu) acl_add vnc.username eins allow 1
    acl: added rule at position 1
    (qemu) acl_show vnc.username
    policy: deny
    1: allow eins
    2: allow drei
    3: allow zwei

The second acl_add inserts at position 2 instead of 1.

Root cause is an off-by-one in qemu_acl_insert(): when index ==
acl->nentries, it appends instead of inserting before the last list
element.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-21 22:52:50 +04:00
2013-06-14 15:33:10 +01:00
2013-04-18 13:50:53 +02:00
2013-05-12 13:25:55 +04:00
2013-06-10 11:36:12 -05:00
2013-05-28 12:19:02 +02:00
2013-04-08 18:13:10 +02:00
2013-04-08 18:13:10 +02:00
2013-05-03 13:58:09 +02:00
2013-06-11 23:45:43 +04:00
2013-04-18 13:50:53 +02:00
2013-04-08 18:13:10 +02:00
2013-06-15 17:50:21 +00:00
2013-06-17 11:01:14 -04:00
2013-06-20 16:39:52 +02:00
2013-06-20 16:39:52 +02:00
2013-06-06 11:27:05 +02:00
2013-05-29 08:15:35 -05:00
2013-06-14 15:33:10 +01:00
2013-05-03 13:05:49 +02:00
2013-05-18 16:35:12 +04:00
2013-06-14 15:33:12 +01:00
2013-06-21 22:52:50 +04:00
2013-06-06 11:27:05 +02:00
2013-06-06 11:27:05 +02:00
2013-05-01 13:06:07 +02:00
2013-05-03 12:04:40 -05:00
2013-06-21 22:52:50 +04:00
2013-05-20 10:55:18 -05:00
2013-06-21 22:52:49 +04:00
2013-04-08 18:13:10 +02:00
2013-04-08 18:13:10 +02:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%