[libvirt] qemu: Fix dynamic_ownership qemu.conf setting

Message ID a4ce7768e98dfde113d4e6c8a0d7543cc30e5f6e.1443484422.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson Sept. 28, 2015, 11:53 p.m.
Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
the DAC driver:

@@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
                          bool defaultConfined,
                          bool requireConfined,
                          bool dynamicOwnership,
+                         bool privileged,
                          virSecurityManagerDACChownCallback chownCallback)

But argument order is mixed up at the caller, swapping dynamicOwnership
and privileged values. This corrects the argument order

https://bugzilla.redhat.com/show_bug.cgi?id=1266628
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Kletzander Sept. 29, 2015, 4:46 a.m. | #1
On Mon, Sep 28, 2015 at 07:53:42PM -0400, Cole Robinson wrote:
>Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
>the DAC driver:
>
>@@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
>                          bool defaultConfined,
>                          bool requireConfined,
>                          bool dynamicOwnership,
>+                         bool privileged,
>                          virSecurityManagerDACChownCallback chownCallback)
>
>But argument order is mixed up at the caller, swapping dynamicOwnership
>and privileged values. This corrects the argument order
>

I'm pretty sure I noticed this during review. I must've failed to
inform the author because I see no reply to the patch that caused it.

ACK and safe for freeze!

>https://bugzilla.redhat.com/show_bug.cgi?id=1266628
>---
> src/qemu/qemu_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index 7025c51..aff1915 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -431,8 +431,8 @@ qemuSecurityInit(virQEMUDriverPtr driver)
>                                              cfg->allowDiskFormatProbing,
>                                              cfg->securityDefaultConfined,
>                                              cfg->securityRequireConfined,
>-                                             virQEMUDriverIsPrivileged(driver),
>                                              cfg->dynamicOwnership,
>+                                             virQEMUDriverIsPrivileged(driver),
>                                              qemuSecurityChownCallback)))
>             goto error;
>         if (!stack) {
>--
>2.5.0
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Cole Robinson Sept. 29, 2015, 12:28 p.m. | #2
On 09/29/2015 12:46 AM, Martin Kletzander wrote:
> On Mon, Sep 28, 2015 at 07:53:42PM -0400, Cole Robinson wrote:
>> Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
>> the DAC driver:
>>
>> @@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
>>                          bool defaultConfined,
>>                          bool requireConfined,
>>                          bool dynamicOwnership,
>> +                         bool privileged,
>>                          virSecurityManagerDACChownCallback chownCallback)
>>
>> But argument order is mixed up at the caller, swapping dynamicOwnership
>> and privileged values. This corrects the argument order
>>
> 
> I'm pretty sure I noticed this during review. I must've failed to
> inform the author because I see no reply to the patch that caused it.
> 
> ACK and safe for freeze!
> 

Thanks, pushed now

- Cole

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Patch hide | download patch | download mbox

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7025c51..aff1915 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -431,8 +431,8 @@  qemuSecurityInit(virQEMUDriverPtr driver)
                                              cfg->allowDiskFormatProbing,
                                              cfg->securityDefaultConfined,
                                              cfg->securityRequireConfined,
-                                             virQEMUDriverIsPrivileged(driver),
                                              cfg->dynamicOwnership,
+                                             virQEMUDriverIsPrivileged(driver),
                                              qemuSecurityChownCallback)))
             goto error;
         if (!stack) {